Rewritten lexer and parser.