More fixes related to last two patches.
authorJoel E. Denny <jdenny@clemson.edu>
Tue, 25 Aug 2009 23:41:49 +0000 (19:41 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Wed, 26 Aug 2009 00:34:28 +0000 (20:34 -0400)
commitd5eb0826afb8ede89bfe314671f2b37db55bd817
treea101e23f9c055c54adb619ba31d2d07df777a31b
parent1fa303077dee822a501002089f81c60fd3f5988d
More fixes related to last two patches.

* data/c.m4 (b4_table_value_equals): Comment that YYID must be
defined.
* data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Fix
yytable comments: zero indicates syntax error not default
action.
* data/glr.c (yyis_pact_ninf): Rename to...
(yypact_value_is_default): ... this.
(yyisDefaultedState): Update for rename.
(yyis_table_ninf): Rename to...
(yytable_value_is_error): ... this, and check for value zero
besides just YYTABLE_NINF.
(yygetLRActions): Check for default value from yypact.  It
appears that this check is always performed before this function
is invoked, and so adding the check here is probably redundant.
However, the code may evolve after this subtlety is forgotten.
Also, update for rename to yytable_value_is_error.  Because that
macro now checks for zero, a different but equivalent branch of
the if-then-else here is evaluated.
(yyreportSyntaxError): Update for rename to
yytable_value_is_error.  The zero condition was mishandled
before.
(yyrecoverSyntaxError): Update for renames.  No behavioral
changes.
* data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
New function.
(yy_table_value_is_error_): New function.
(parse): Use new functions where possible.  No behavioral
changes.
(yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
The zero condition was mishandled before.
* data/yacc.c (yyis_pact_ninf): Rename to...
(yypact_value_is_default): ... this.
(yyis_table_ninf): Rename to...
(yytable_value_is_error): ... this, and check for value zero
besides just YYTABLE_NINF.
(yysyntax_error): Update for rename to yytable_value_is_error.
The zero condition was mishandled before.
(yyparse): Update for renames.  No behavioral changes.
* src/tables.h: Improve comments about yypact, yytable, etc.
more.  Most importantly, say yytable value of zero means syntax
error not default action.
(cherry picked from commit f2b30bdf3713e6fa9fafd0fc6caed68e38248ebc)

Conflicts:

data/bison.m4
data/lalr1.cc
data/lalr1.java
data/yacc.c
src/parse-gram.c
src/parse-gram.h
ChangeLog
data/c.m4
data/glr.c
data/lalr1.cc
data/lalr1.java
data/yacc.c
src/parse-gram.c
src/parse-gram.h
src/tables.h