MLYacc is an LALR parser generator for StandardML. This repository publish MLYacc to be used from Poly/ML, and this is ported from MLYacc implementation bundled in MLton.
To build mlyacc-polyml
, run the mlyacc-polyml
target or mlyacc-polyml-nodocs
if you do not need documents.
$ make mlyacc-polyml
To install mlyacc-polyml
and mlyacc-lib-1.0.0.poly
, run the install
target.
$ make install
By default, executables and binaries are installed to /usr/local/polyml/{bin,lib}
.
You can specify the installation location by using the PREFIX
variable.
$ make install PREFIX=~/.sml/polyml/5.8.1
If you do not want to install documents, run the install-nodocs
target.
$ make install-nodocs
mlyacc-polyml
take a .grm
file and generates .grm.sml
, .grm.sig
and .grm.desc
files.
For example, you pass ml.grm
to this program, ml.grm.sml
, ml.grm.sig
and ml.grm.desc
will be generated.
$ ./bin/mlyacc-polyml ml.grm
1 shift/reduce conflict
$ ls ml.grm.*
ml.grm.desc ml.grm.sig ml.grm.sml
These generated files depend on mlyacc-lib
.
That library can be loaded as follows:
$ poly
> PolyML.loadModule "/usr/local/polyml/lib/mlyacc-lib-1.0.0.poly";
signature ARG_LEXER = ..
See doc/mlyacc-polyml.pdf
for details which is generated by the docs target.
To run unit tets, run the test
target.
$ make test
To generate a document of mlyacc-polyml, run the docs
target.
This target generates mlyacc-polyml.pdf
to the doc
directory.
$ make docs
see LICENSE file for details.