Complete lexer and parser, including test cases.