mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr.c: fix line numbers in logs
* data/skeletons/glr.c (yyglrReduce): Fix line numbers. * tests/glr-regression.at: Fix expectations.
This commit is contained in:
6
TODO
6
TODO
@@ -1,4 +1,10 @@
|
||||
* Soon
|
||||
** glr
|
||||
There is no test with "Parse on stack %ld rejected by rule %d" in it.
|
||||
|
||||
** yyrline etc.
|
||||
Clarify that rule numbers in the skeletons are 1-based.
|
||||
|
||||
** Macros in C++
|
||||
There are many macros that should obey api.prefix: YY_CPLUSPLUS, YY_MOVE,
|
||||
etc.
|
||||
|
||||
@@ -1483,7 +1483,7 @@ yyglrReduce (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
|
||||
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
||||
YY_DPRINTF ((stderr,
|
||||
"Parse on stack %ld rejected by rule %d (line %d).\n",
|
||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1]));
|
||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule]));
|
||||
if (yyflag != yyok)
|
||||
return yyflag;
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yylhsNonterm (yyrule), &yysval, &yyloc);
|
||||
@@ -1510,7 +1510,7 @@ yyglrReduce (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
|
||||
YY_DPRINTF ((stderr,
|
||||
"Reduced stack %ld by rule %d (line %d); action deferred. "
|
||||
"Now in state %d.\n",
|
||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1],
|
||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule],
|
||||
yynewLRState));
|
||||
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
|
||||
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
|
||||
|
||||
@@ -1899,7 +1899,7 @@ Now at end of input.
|
||||
Stack 0 Entering state 7
|
||||
Now at end of input.
|
||||
Splitting off stack 1 from 0.
|
||||
Reduced stack 1 by rule 2 (line 26); action deferred. Now in state 2.
|
||||
Reduced stack 1 by rule 2 (line 27); action deferred. Now in state 2.
|
||||
Stack 1 Entering state 2
|
||||
Now at end of input.
|
||||
Reduced stack 0 by rule 1 (line 26); action deferred. Now in state 2.
|
||||
|
||||
Reference in New Issue
Block a user