CM-Yacc: A parser generator for Standard ML and Haskell
Standard ML Haskell Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
hs/Util
Makefile
README.md
automaton.sml
cmyacc-hs.mlb
cmyacc.mlb
cmyacc.smackspec
codegen-hs.sml
codegen.sig
codegen.sml
export-smlnj-hs.sml
export-smlnj.sml
glue-hs.sml
glue.sml
go-hs.sml
go.sml
lexer-hs.sml
lexer.sig
lexer.sml
lexmain.cmlex
lexmain.cmlex.sml
main.sml
make-automaton.sig
make-automaton.sml
parsemain-hs.cmyacc
parsemain-hs.cmyacc.sml
parsemain.cmyacc
parsemain.cmyacc.sml
parser-hs.sml
parser.sig
parser.sml
process.sig
process.sml
sources-generic.cm
sources-generic.mlb
sources-hs.cm
sources.cm
syntax.sml
token-hs.sml
token.sml
write-automaton.sig
write-automaton.sml

README.md

CM-Yacc: A parser generator for Standard ML and Haskell

Installing

CM-Yacc should be installed through Smackage, an ML package manager (see http://github.com/standardml/smackage).

$ smackage 
$ smackage get cmyacc
$ smackage make cmyacc (this will just display the various options)

To install CM-Yacc (for Standard ML)

$ smackage make cmyacc mlton (or smlnj or win+smlnj)
$ smackage make cmyacc install
$ cmyacc
Error: not enough input files
Usage: cmyacc file.cmyacc [-o file.sml]
(Default output file is file.cmyacc.sml)

To install CM-Yacc-HS (for Haskell)

$ smackage make cmyacc mlton+hs (or smlnj+hs or win+smlnj+hs)
$ smackage make cmyacc install+hs
$ cmyacc
Error: not enough input files
Usage: cmyacc-hs file.cmyacc [-o file.hs]
(Default output file is file.cmyacc.hs)

It is possible to install CM-Yacc without Smackage: just make sure that CM-Lib v1 (see http://github.com/standardml/cmlib) is installed somewhere on your system, and change the reference to $SMACKAGE/cmlib/v1 in sources-generic.cm and/or the reference to $(SMACKAGE)/cmlib/v1 in sources-generic.mlb to point to the directory where CMlib lives.