* data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"

in yydestruct diagnostic, since it might not be an error.
Problem reported by Joel Denny near end of
<http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
* data/lalr1cc (yyerturn): Likewise.
* data/yacc.c (yyreturn): Likewise.
* tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
This commit is contained in:
Paul Eggert
2005-08-22 02:31:10 +00:00
parent eab522e49a
commit dd5f2af2bd
5 changed files with 25 additions and 6 deletions

View File

@@ -2169,7 +2169,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
yyreturn:
if (yytoken != YYEOF && yytoken != YYEMPTY)
yydestruct ("Error: discarding lookahead",
yydestruct ("Cleanup: discarding lookahead",
yytoken, yylvalp]b4_location_if([, yyllocp])[);
/* If the stack is well-formed, pop the stack until it is empty,
@@ -2183,7 +2183,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
{
yyGLRState *yys = yystates[0];
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
)[ yydestruct ("Error: popping",
)[ yydestruct ("Cleanup: popping",
yystos[yys->yylrState],
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
yystates[0] = yys->yypred;