isabelle_lex-yacc/mlyacc-polyml
2026-05-10 19:00:07 +01:00
..
doc Merge commit 'df6a49f2e3730be38140b9f5a3303e1068403053' as 'mlyacc-polyml' 2026-03-12 08:31:00 +00:00
examples Cleanup: removed files not used by Isabelle/PIDE integrated ml-yacc. 2026-05-10 19:00:07 +01:00
mlyacc-lib Cleanup: removed files not used by Isabelle/PIDE integrated ml-yacc. 2026-05-10 19:00:07 +01:00
src Cleanup: removed files not used by Isabelle/PIDE integrated ml-yacc. 2026-05-10 19:00:07 +01:00
test Merge commit 'df6a49f2e3730be38140b9f5a3303e1068403053' as 'mlyacc-polyml' 2026-03-12 08:31:00 +00:00
.gitignore Merge commit 'df6a49f2e3730be38140b9f5a3303e1068403053' as 'mlyacc-polyml' 2026-03-12 08:31:00 +00:00
LICENSE Merge commit 'df6a49f2e3730be38140b9f5a3303e1068403053' as 'mlyacc-polyml' 2026-03-12 08:31:00 +00:00
Readme.md Merge commit 'df6a49f2e3730be38140b9f5a3303e1068403053' as 'mlyacc-polyml' 2026-03-12 08:31:00 +00:00

MLYacc for Poly/ML

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.

Requires

  • Poly/ML
  • pdflatex (for docs)
  • (optional) mllex-polyml
  • (optional) mlyacc-polyml

Build

To build mlyacc-polyml, run the mlyacc-polyml target or mlyacc-polyml-nodocs if you do not need documents.

$ make mlyacc-polyml

Install

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

Use

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.

Test

To run unit tets, run the test target.

$ make test

Document

To generate a document of mlyacc-polyml, run the docs target. This target generates mlyacc-polyml.pdf to the doc directory.

$ make docs

License

see LICENSE file for details.