Switch to C++ exceptions for lexer/parser error handling. Teach the lexer/parser to fail on unexpected input.