https://github.com/diku-dk/sml-parse
Standard ML Parser Combinator Library
https://github.com/diku-dk/sml-parse
smlpkg
Last synced: 5 months ago
JSON representation
Standard ML Parser Combinator Library
- Host: GitHub
- URL: https://github.com/diku-dk/sml-parse
- Owner: diku-dk
- License: mit
- Created: 2021-03-19T18:41:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T20:25:15.000Z (almost 2 years ago)
- Last Synced: 2025-01-31T23:57:55.509Z (over 1 year ago)
- Topics: smlpkg
- Language: Standard ML
- Homepage:
- Size: 32.2 KB
- Stars: 15
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sml-parse [](https://github.com/diku-dk/sml-parse/actions)
Standard ML Parser Combinator Library and Scan Utilities.
## Overview of MLB files
- `lib/github.com/diku-dk/sml-parse/scan-util.mlb`:
- **signature** [`SCAN_UTIL`](lib/github.com/diku-dk/sml-parse/SCAN_UTIL.sig)
- **structure** `ScanUtil` :> `SCAN_UTIL`
- `lib/github.com/diku-dk/sml-parse/parse.mlb`:
- **signature** [`REGION`](lib/github.com/diku-dk/sml-parse/REGION.sig)
- **signature** [`PARSE`](lib/github.com/diku-dk/sml-parse/PARSE.sig)
- **structure** `Region` :> `REGION`
- **structure** `Parse` :> `PARSE`
- `lib/github.com/diku-dk/sml-parse/char_token.mlb`:
- **signature** [`CHAR_TOKEN`](lib/github.com/diku-dk/sml-parse/CHAR_TOKEN.sig)
- **structure** `CharToken` :> `CHAR_TOKEN`
- `lib/github.com/diku-dk/sml-parse/simple_token.mlb`:
- **signature** [`SIMPLE_TOKEN`](lib/github.com/diku-dk/sml-parse/SIMPLE_TOKEN.sig)
- **structure** `SimpleToken` :> `SIMPLE_TOKEN`
## Use of the package
This library is set up to work well with the SML package manager
[smlpkg](https://github.com/diku-dk/smlpkg). To use the package, in
the root of your project directory, execute the command:
```
$ smlpkg add github.com/diku-dk/sml-parse
```
This command will add a _requirement_ (a line) to the `sml.pkg` file in your
project directory (and create the file, if there is no file `sml.pkg`
already).
To download the library into the directory
`lib/github.com/diku-dk/sml-parse` (along with other necessary
libraries), execute the command:
```
$ smlpkg sync
```
You can now reference the `mlb`-file using relative paths from within
your project's `mlb`-files.
Notice that you can choose either to treat the downloaded package as
part of your own project sources (vendoring) or you can add the
`sml.pkg` file to your project sources and make the `smlpkg sync`
command part of your build process.
## Try it!
The parser combinator library works with either
[MLton](http://mlton.org) or [MLKit](http://elsman.com/mlkit/).
Now write
$ smlpkg sync
Then simply write `make test` in your shell.
To use the MLKit as a compiler, write instead:
$ MLCOMP=mlkit make clean test
## Authors
Copyright (c) 2015-2021 Martin Elsman, Martin Dybdal, University of
Copenhagen.