Add a number of additional error cases in the grammar. Enable bison's extended error reporting, to get better messages about the context of errors and the expected (but not found) tokens at errors. Improve the printing of these by providing an implementation of yytnamerr that rewrites things like "TOKEN_MUL_ASSIGN" to "*=" in error messages. Print the source location (using Error() when yyerror() is called; wiring this up seems to require no longer building a 'pure parser' but having yylloc as a global, which in turn led to having to update all of the uses of it (which previously accessed it as a pointer). Updated a number of tests_errors for resulting changesin error text.
87 B
87 B