Lexical analysis is the problem of segmenting input into words and recognizing different classes of words. ml-lex uses regular expressions to describe classes of words. It transforms a simple declarative language specification into an efficient SML program for analyzing that language. . Install this package if you want to produce a lexer in Standard ML.