hlex The tools needed to create a lexer from a lexical grammar in Haskell. You can see an example language in the documentation.