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:
Joel E. Denny
2009-08-26 02:40:38 -04:00
parent d5eb0826af
commit e4bcae3c5a
9 changed files with 184 additions and 164 deletions

View File

@@ -535,7 +535,7 @@ do { \
inline bool
]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == 0 || yyvalue == yytable_ninf_;
return yyvalue == yytable_ninf_;
}
int
@@ -937,8 +937,7 @@ b4_error_verbose_if([, int tok])[)
/* 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. */
const ]b4_int_type(b4_table_ninf, b4_table_ninf) b4_parser_class_name::yytable_ninf_ = b4_table_ninf[;
const ]b4_int_type_for([b4_table])[
]b4_parser_class_name[::yytable_[] =