Lexer generator implementations (still to review)