mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-10-28 10:26:35 +00:00
glr: fix ambiguity reports.
Fix a regression introduced in commit
783aa653f4.
* tests/glr-regression.at (Ambiguity reports): New.
* data/glr.c (yyreportTree): Fix an offset error.
This commit is contained in:
1 parent
d4fca42763
commit
a6b2f4fc02
2 files changed
+119
-2
No files matched your search
+2
-2
@@ -1727,10 +1727,10 @@ yyreportTree (yySemanticOption* yyx, int yyindent)
|
||||
{
|
||||
if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
|
||||
YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
|
||||
yytokenName (yystos[yystates[yyi-1]->yylrState]));
|
||||
yytokenName (yystos[yystates[yyi]->yylrState]));
|
||||
else
|
||||
YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
|
||||
yytokenName (yystos[yystates[yyi-1]->yylrState]),
|
||||
yytokenName (yystos[yystates[yyi]->yylrState]),
|
||||
(unsigned long int) (yystates[yyi-1]->yyposn + 1),
|
||||
(unsigned long int) yystates[yyi]->yyposn);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user