The SML# installer will compile and install smlyacc and smllex commands, which are used to generate the SML# system. These commands generates the following SML# source files.
command | input file | generated files | Contents |
---|---|---|---|
smlyacc | .grm | .grm.sml | A Parser Program |
.grm.sig | Parser’s Token signature | ||
.grm.desc | LR automaton state descriptions | ||
smllex | .lex | .lex.sml | A Lexical analyzer |
smlyacc command only takes an input file name .grm. The output file name can be specified with the following environment variable:
SMLYACC_OUTPUT=
The specification of the output file includes its suffix (.sml). With this environment variable is set, smlyacc generates the token signature at the top of the output file.
smllex command only takes an input file name .lex. The output file name can be specified with the following environment variable:
SMLLEX_OUTPUT=
The specification of the output file includes its suffix (.sml).