mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +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:
@@ -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