Specifying the lexer

The Haskell lexer is specified in Haskell!

The Haskell code is a fairly direct transcription of specification in the Haskell Report.