[MLton-user] Separable front end?

Adam Chlipala adamc at hcoop.net
Tue Feb 20 20:20:31 PST 2007


Konrad Slind wrote:
>   I'm interested in porting large quantities of SML source to
> Scheme. As a first step, I was planning on using an existing
> ML front end to lex and parse into (untyped) abstract syntax trees.
> Generating Scheme should then be quite simple. Does mlton
> provide a way to get access to such syntax trees?
>
I don't know about MLton, but SML/NJ provides most pieces of the 
compiler as separately-usable libraries.  In this project:
    http://smlweb.sourceforge.net/
I use the SML/NJ libraries to not just parse SML sources, but also 
type-check/elaborate them.  I can't really advise on the details of how 
this works at the moment, since it's been a while since I worked on that 
project, but the code is there to serve as an example.



More information about the MLton-user mailing list