The Lexer for Haskell in Haskell

This is a list of modules that are part of the Lexer for Haskell in Haskell i.e., the regular expression compiler, the lexical grammar from section 9.2 of the revised Haskell 98 report (Dec 2002) and some additional handwritten Haskell modules.

See also the talk Lexer for Haskell in Haskell, but note that the implementation has been updated more often than the talk, so they are probably not completely in sync.

Handwritten lexer parts

  1. HsLexerPass1
  2. HsLayoutPre
  3. HsLexer
  4. HsLexUtils

Haskell Lexer specification and generator

The lexer generator was originally developed with HBC, so some library modules from HBC are included.

Directory ../lib

  1. MUtils
  2. OpTypes

Directory ../tests/HbcLibraries

  1. OrdMap
  2. Trace

Directory Lexer

  1. HsTokens

Directory LexerGen

  1. CompileRegExp
  2. DetMachineToHaskell2
  3. DFA
  4. Main{-LexerGen/HsLexerGen.hs-}
  5. LexerGen2
  6. Minimalize
  7. PPrint
  8. RegExp
  9. RegExpOps

Directory LexerSpec

  1. HaskellChars
  2. HaskellLexicalSyntax