This is a sample interactive calculator built using ML-Yacc and ML-Lex.

To construct it, first use ML-Yacc on the file "calc.grm" to construct
the files "calc_grm.sml" and "_calc_grm.sml".  This can be done by
loading ML-Yacc and typing "ParseGen.parseGen "calc.grm"".  Then
construct the lexer by using ML-Lex on the file calc.lex.
("LexGen.lexGen "calc.lex").

To load it into Harlequin MLWorks, in the GUI open the project yacccalc.mlp
in the project workspace tool and compile and load the targets using
Project > Compile Target Sources and Project > Load Targets.
This will build the calculator structure automatically.

The end result of loading these files is a structure Calc containing a
function named parse.  The calculator can be invoked by applying that
function to a value of type unit.  The calculator reads from the
standard input.  There is no attempt to fix input errors since this
is an interactive parser.

The calculator reads a sequence of expressions from the standard input
and prints the value of each expression after reading the expression.
Expressions must be separated by semicolons.  An expression is not
evaluated until the semicolon is encountered.  The calculator
terminates when an end-of-file is encountered.

