ml.lex/ml.grm

Stephen Weeks MLton@sourcelight.com
Mon, 20 Nov 2000 12:10:43 -0800 (PST)


> I also have the problem that when I do a fresh make nj-mlton in src/mlton,
> I get errors in the ml.lex and ml.grm produced files (I need to add in
> some  type int = Int.t  declaration and change some strings to Char
> vectors).  Do I need to use the mlton version of ml-lex/yacc to produce
> the right files?

Yes.  The MLton version of lex/yacc produces slightly different output than the
SML/NJ output.  The output should work with SML/NJ and MLton.  The output
produced by SML/NJ lex/yacc will not work with MLton because we use 32 bit
integers everywhere and there are references to toplevel functions (like
String.size) which use 31 bit ints.

Any ideas for how to report a better error message or avoid this confusion would
be appreciated.