[MLton] can mlbasis rename the top-level?

Matthew Fluet fluet@cs.cornell.edu
Tue, 6 Sep 2005 17:22:30 -0400 (EDT)


> Hmmm.  Combining Vesa's suggestion with the requirement for having the
> MLB lexer handle things, what about:
>
>  <basdec> --> "_sml" <program> "_end"
>
> Actually, we could even do
>
>  <basdec> --> "sml" <program> "_end"
>
> since all that matters is being able to pick out "_end".

The "_end" looks ugly to me.  I'd go the extra mile with the MLB lexer 
counting SML blocks in <program>; it's close to what is done counting 
nested SML comments, though you need to accumulate the whole string.

Another, reason to use "{<{" and "}>}" is that there is some hope of 
(easily) combining that with sml-mode and Vesa's mlb mode.  I know Norman 
Ramsey's noweb emacs mode allows you to shift into the mode of the 
embedded language, and I'm pretty sure that it would be easier with clear 
delimiters instead of requiring Emacs to do the SML tokenization and 
block counting to determine when to leave SML mode