A version of lex in SML/NJ which outputs a lexical analyser in SML/NJ.
ftp://research.att.com/dist/ml/75.tools.tar.Z.