mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +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
|
* 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++
|
** Macros in C++
|
||||||
There are many macros that should obey api.prefix: YY_CPLUSPLUS, YY_MOVE,
|
There are many macros that should obey api.prefix: YY_CPLUSPLUS, YY_MOVE,
|
||||||
etc.
|
etc.
|
||||||
|
|||||||
@@ -1483,7 +1483,7 @@ yyglrReduce (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
|
|||||||
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
||||||
YY_DPRINTF ((stderr,
|
YY_DPRINTF ((stderr,
|
||||||
"Parse on stack %ld rejected by rule %d (line %d).\n",
|
"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)
|
if (yyflag != yyok)
|
||||||
return yyflag;
|
return yyflag;
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yylhsNonterm (yyrule), &yysval, &yyloc);
|
YY_SYMBOL_PRINT ("-> $$ =", yylhsNonterm (yyrule), &yysval, &yyloc);
|
||||||
@@ -1510,7 +1510,7 @@ yyglrReduce (yyGLRStack* yystackp, YYPTRDIFF_T yyk, yyRuleNum yyrule,
|
|||||||
YY_DPRINTF ((stderr,
|
YY_DPRINTF ((stderr,
|
||||||
"Reduced stack %ld by rule %d (line %d); action deferred. "
|
"Reduced stack %ld by rule %d (line %d); action deferred. "
|
||||||
"Now in state %d.\n",
|
"Now in state %d.\n",
|
||||||
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule - 1],
|
YY_CAST (long, yyk), yyrule - 1, yyrline[yyrule],
|
||||||
yynewLRState));
|
yynewLRState));
|
||||||
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
|
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
|
||||||
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
|
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
|
||||||
|
|||||||
@@ -1899,7 +1899,7 @@ Now at end of input.
|
|||||||
Stack 0 Entering state 7
|
Stack 0 Entering state 7
|
||||||
Now at end of input.
|
Now at end of input.
|
||||||
Splitting off stack 1 from 0.
|
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
|
Stack 1 Entering state 2
|
||||||
Now at end of input.
|
Now at end of input.
|
||||||
Reduced stack 0 by rule 1 (line 26); action deferred. Now in state 2.
|
Reduced stack 0 by rule 1 (line 26); action deferred. Now in state 2.
|
||||||
|
|||||||
Reference in New Issue
Block a user