mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
yacc.c: prefer YYSYMBOL_YYERROR to YYSYMBOL_error
* data/skeletons/bison.m4 (b4_symbol_sid): Map "error" to YYSYMBOL_YYERROR. * data/skeletons/yacc.c: Adjust.
This commit is contained in:
16
TODO
16
TODO
@@ -53,22 +53,6 @@ would actually also make the following point gracefully handled (status of
|
||||
YYERRCODE, YYUNDEFTOK, etc.). Possibly we could also define YYEMPTY (twice:
|
||||
as a token and as a symbol). And YYEOF.
|
||||
|
||||
It seems to work well. Yet we have a weird case: the "error" token:
|
||||
|
||||
enum yysymbol_type_t
|
||||
{
|
||||
YYSYMBOL_YYEMPTY = -2,
|
||||
YYSYMBOL_YYEOF = 0,
|
||||
YYSYMBOL_error = 1,
|
||||
YYSYMBOL_YYUNDEF = 2,
|
||||
YYSYMBOL_YYACCEPT = 61,
|
||||
...
|
||||
|
||||
YYSYMBOL_error looks weird. We should maybe rename this as
|
||||
"YYSYMBOL_YYERROR", even though it should not be confonded with the YYERROR
|
||||
macro.
|
||||
|
||||
|
||||
** Consistency
|
||||
YYUNDEFTOK is an internal symbol number, as YYTERROR.
|
||||
But YYERRCODE is an external token number.
|
||||
|
||||
Reference in New Issue
Block a user