Code gen for lexer.