mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 22:33:03 +00:00
Some code and documentation improvements.
* data/c.m4 (b4_table_value_equals): New macro to capture some repeated code. * data/glr.c (yyis_pact_ninf): Use it here. (yyis_table_ninf): Likewise. (yyreportSyntaxError): Improve internal comments. * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c. Use it everywhere possible. (yyis_table_ninf): Likewise. (yysyntax_error): Improve internal comments. * data/lalr1.cc (yysyntax_error_): Likewise. * data/lalr1.java (yysyntax_error): Likewise. * src/tables.h: Improve comments about yypact, yytable, etc.
This commit is contained in:
@@ -735,7 +735,8 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
StringBuffer res;
|
||||
|
||||
/* Start YYX at -YYN if negative to avoid negative indexes in
|
||||
YYCHECK. */
|
||||
YYCHECK. In other words, skip the first -YYN actions for this
|
||||
state because they are default actions. */
|
||||
int yyxbegin = yyn < 0 ? -yyn : 0;
|
||||
|
||||
/* Stay within bounds of both yycheck and yytname. */
|
||||
|
||||
Reference in New Issue
Block a user