mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Actually handle the yytable zero value correctly this time.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Don't
mention zero values in the YYTABLE comments.
* data/glr.c (yytable_value_is_error): Don't check for zero
value.
* data/lalr1.cc (yy_table_value_is_error_): Likewise.
* data/yacc.c (yytable_value_is_error): Likewise.
* data/lalr1.java (yy_table_value_is_error_): Likewise.
(yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
* src/tables.h: In header comments, explain why it's useless to
check for a zero value in yytable.
(cherry picked from commit aa0cb40d61)
Conflicts:
data/bison.m4
data/lalr1.java
This commit is contained in:
@@ -442,7 +442,7 @@ static const ]b4_int_type_for([b4_pgoto])[ yypgoto[] =
|
||||
|
||||
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
||||
positive, shift that token. If negative, reduce the rule which
|
||||
number is the opposite. If zero or YYTABLE_NINF, syntax error. */
|
||||
number is the opposite. If YYTABLE_NINF, syntax error. */
|
||||
#define YYTABLE_NINF ]b4_table_ninf[
|
||||
static const ]b4_int_type_for([b4_table])[ yytable[] =
|
||||
{
|
||||
@@ -1031,8 +1031,7 @@ yydefaultAction (yyStateNum yystate)
|
||||
}
|
||||
|
||||
#define yytable_value_is_error(yytable_value) \
|
||||
(]b4_table_value_equals([[table]], [[yytable_value]], [b4_table_ninf])[ \
|
||||
|| ]b4_table_value_equals([[table]], [[yytable_value]], [[0]])[)
|
||||
]b4_table_value_equals([[table]], [[yytable_value]], [b4_table_ninf])[
|
||||
|
||||
/** Set *YYACTION to the action to take in YYSTATE on seeing YYTOKEN.
|
||||
* Result R means
|
||||
|
||||
Reference in New Issue
Block a user