[MLton-user] bug with path variables in mlb files

John Reppy jhr at cs.uchicago.edu
Tue Nov 6 03:36:57 PST 2007


It appears that a path variable like $(SML3D_LIB) is not considered a  
valid token by
mlton.  Using mlton-20070826 on Mac OS X/Intel, when I run

   /usr/local/bin/mlton ... -mlb-path-map /Users/jhr/Work/sml3d/src/ 
sml3d-path-map ... main.mlb ...

and I get syntax errors:

   Error: main.mlb 7.3.
     Illegal token.
   Error: main.mlb 7.4.
     Illegal token.
   Error: main.mlb 7.14.
     Illegal token.
   Error: main.mlb 8.3.
     Illegal token.
   Error: main.mlb 8.4.
     Illegal token.
   Error: main.mlb 8.14.
     Illegal token.
   Error: main.mlb 9.3.
     Illegal token.
   Error: main.mlb 9.4.
     Illegal token.
   Error: main.mlb 7.5.
     Syntax error: deleting  ID FILE ID.
   Error: main.mlb 9.14.
     Illegal token.
   Error: main.mlb 9.5.
     Syntax error: inserting  FUNCTOR.
   compilation aborted: elaborate reported errors

where the lines in question are

     $(SML3D_LIB)/math/math.mlb
     $(SML3D_LIB)/glut/glut.mlb
     $(SML3D_LIB)/util/util.mlb

changing the variable to SMLXD_LIB fixes the problem, but it seems like
a silly restriction.

Note also that the http://mlton.org/MLBasisSyntaxAndSemantics page  
does not
actually specify what the lexical conventions for MLBasis files are.

	- John




More information about the MLton-user mailing list