mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
glr: display line numbers in traces
Suggested by Lars Maier. * data/skeletons/glr.c: Also display rule locations when rules are deferred, and rejected.
This commit is contained in:
3
THANKS
3
THANKS
@@ -95,8 +95,9 @@ Kees Zeelenberg kzlg@users.sourceforge.net
|
||||
Keith Browne kbrowne@legato.com
|
||||
Ken Moffat zarniwhoop@ntlworld.com
|
||||
Kiyoshi Kanazawa yoi_no_myoujou@yahoo.co.jp
|
||||
Laurent Mascherpa laurent.mascherpa@epita.fr
|
||||
Lars Maier lars.maier@tefax.net
|
||||
László Várady laszlo.varady93@gmail.com
|
||||
Laurent Mascherpa laurent.mascherpa@epita.fr
|
||||
Lie Yan lie.yan@kaust.edu.sa
|
||||
Magnus Fromreide magfr@lysator.liu.se
|
||||
Marc Autret autret_m@epita.fr
|
||||
|
||||
@@ -1442,8 +1442,9 @@ yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
|
||||
YYRESULTTAG yyflag = yydoAction (yystackp, yyk, yyrule, &yysval]b4_locuser_args([&yyloc])[);
|
||||
if (yyflag == yyerr && yystackp->yysplitPoint != YY_NULLPTR)
|
||||
{
|
||||
YYDPRINTF ((stderr, "Parse on stack %ld rejected by rule #%d.\n",
|
||||
(long) yyk, yyrule - 1));
|
||||
YYDPRINTF ((stderr,
|
||||
"Parse on stack %ld rejected by rule %d (line %d).\n",
|
||||
(long) yyk, yyrule - 1, yyrline[yyrule - 1]));
|
||||
}
|
||||
if (yyflag != yyok)
|
||||
return yyflag;
|
||||
@@ -1469,9 +1470,9 @@ yyglrReduce (yyGLRStack* yystackp, ptrdiff_t yyk, yyRuleNum yyrule,
|
||||
yyupdateSplit (yystackp, yys);
|
||||
yynewLRState = yyLRgotoState (yys->yylrState, yylhsNonterm (yyrule));
|
||||
YYDPRINTF ((stderr,
|
||||
"Reduced stack %ld by rule #%d; action deferred. "
|
||||
"Reduced stack %ld by rule %d (line %d); action deferred. "
|
||||
"Now in state %d.\n",
|
||||
(long) yyk, yyrule - 1, yynewLRState));
|
||||
(long) yyk, yyrule - 1, yyrline[yyrule - 1], yynewLRState));
|
||||
for (yyi = 0; yyi < yystackp->yytops.yysize; yyi += 1)
|
||||
if (yyi != yyk && yystackp->yytops.yystates[yyi] != YY_NULLPTR)
|
||||
{
|
||||
|
||||
@@ -1711,10 +1711,10 @@ Reading a token: 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; action deferred. Now in state 2.
|
||||
Reduced stack 1 by rule 2 (line 24); action deferred. Now in state 2.
|
||||
Stack 1 Entering state 2
|
||||
Now at end of input.
|
||||
Reduced stack 0 by rule #1; action deferred. Now in state 2.
|
||||
Reduced stack 0 by rule 1 (line 24); action deferred. Now in state 2.
|
||||
Merging stack 0 into stack 1.
|
||||
Stack 1 Entering state 2
|
||||
Now at end of input.
|
||||
|
||||
Reference in New Issue
Block a user