glr2.cc: get rid of the yyerror scaffolding

The yyerror stand-alone function was used to bounce from glr.c's call
to yyerror to glr.cc's parser.error.  Now that glr.c is out of the
way, just directly use parser.error.

* data/skeletons/glr2.cc (yyerror): Remove.
Adjust callers.
(b4_yyerror_args, b4_lyyerror_args, b4_pure_formals): Remove.
Now unused.
This commit is contained in:
Akim Demaille
2020-09-05 07:37:34 +02:00
parent 38abe1e1b7
commit f3f7f6e1dc
2 changed files with 20 additions and 55 deletions

7
TODO
View File

@@ -187,6 +187,13 @@ It should be a member of the parser object, see lalr1.cc. Let the parser
object decide what the debug stream is, rather than open coding std::cerr.
And use YYCDEBUG rather than YY_DEBUG_STREAM.
*** Avoid pointers
There are many places where pointers should be replaced with references.
*** Use proper type names
Don't use YYSTYPE and YYLTYPE but parser::semantic_type and
parser::location_type. Undefine YYSTYPE and YYLTYPE.
* Chains
** Unit rules / Injection rules (Akim Demaille)
Maybe we could expand unit rules (or "injections", see