mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
* 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:
18
ChangeLog
18
ChangeLog
@@ -1,5 +1,23 @@
|
|||||||
2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
|
2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
* src/files.c: Remove obsolete FIXME comment.
|
||||||
|
|
||||||
|
* data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
|
||||||
|
with the other templates, and to fix bogus run-on messages such
|
||||||
|
as the one reported at the end of
|
||||||
|
<http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
|
||||||
|
All callers changed to avoid the newline.
|
||||||
|
(yyprocessOneStack): Output two lines rather than one, to accommodate
|
||||||
|
the above change. This changes the debug output format slightly.
|
||||||
|
|
||||||
* data/glr.c (yyresolveValue): Fix redundant parse tree problem
|
* data/glr.c (yyresolveValue): Fix redundant parse tree problem
|
||||||
reported by Joel E. Denny in
|
reported by Joel E. Denny in
|
||||||
<http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
|
<http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
|
||||||
|
|||||||
@@ -2169,7 +2169,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
|
|||||||
|
|
||||||
yyreturn:
|
yyreturn:
|
||||||
if (yytoken != YYEOF && yytoken != YYEMPTY)
|
if (yytoken != YYEOF && yytoken != YYEMPTY)
|
||||||
yydestruct ("Error: discarding lookahead",
|
yydestruct ("Cleanup: discarding lookahead",
|
||||||
yytoken, yylvalp]b4_location_if([, yyllocp])[);
|
yytoken, yylvalp]b4_location_if([, yyllocp])[);
|
||||||
|
|
||||||
/* If the stack is well-formed, pop the stack until it is empty,
|
/* 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];
|
yyGLRState *yys = yystates[0];
|
||||||
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
|
]b4_location_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
|
||||||
)[ yydestruct ("Error: popping",
|
)[ yydestruct ("Cleanup: popping",
|
||||||
yystos[yys->yylrState],
|
yystos[yys->yylrState],
|
||||||
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
|
&yys->yysemantics.yysval]b4_location_if([, &yys->yyloc])[);
|
||||||
yystates[0] = yys->yypred;
|
yystates[0] = yys->yypred;
|
||||||
|
|||||||
@@ -879,11 +879,11 @@ yyabortlab:
|
|||||||
|
|
||||||
yyreturn:
|
yyreturn:
|
||||||
if (yylooka_ != yyeof_ && yylooka_ != yyempty_)
|
if (yylooka_ != yyeof_ && yylooka_ != yyempty_)
|
||||||
yydestruct_ ("Error: discarding lookahead", yyilooka_, &yylval, &yylloc);
|
yydestruct_ ("Cleanup: discarding lookahead", yyilooka_, &yylval, &yylloc);
|
||||||
|
|
||||||
while (yystate_stack_.height () != 1)
|
while (yystate_stack_.height () != 1)
|
||||||
{
|
{
|
||||||
yydestruct_ ("Error: popping",
|
yydestruct_ ("Cleanup: popping",
|
||||||
yystos_[yystate_stack_[0]],
|
yystos_[yystate_stack_[0]],
|
||||||
&yysemantic_stack_[0],
|
&yysemantic_stack_[0],
|
||||||
&yylocation_stack_[0]);
|
&yylocation_stack_[0]);
|
||||||
|
|||||||
@@ -1383,11 +1383,11 @@ yyexhaustedlab:
|
|||||||
|
|
||||||
yyreturn:
|
yyreturn:
|
||||||
if (yychar != YYEOF && yychar != YYEMPTY)
|
if (yychar != YYEOF && yychar != YYEMPTY)
|
||||||
yydestruct ("Error: discarding lookahead",
|
yydestruct ("Cleanup: discarding lookahead",
|
||||||
yytoken, &yylval]b4_location_if([, &yylloc])[);
|
yytoken, &yylval]b4_location_if([, &yylloc])[);
|
||||||
while (yyssp != yyss)
|
while (yyssp != yyss)
|
||||||
{
|
{
|
||||||
yydestruct ("Error: popping",
|
yydestruct ("Cleanup: popping",
|
||||||
yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
|
yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
|
||||||
YYPOPSTACK;
|
YYPOPSTACK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ sed '/^Starting/d
|
|||||||
/^Reducing/d
|
/^Reducing/d
|
||||||
/^Shifting/d
|
/^Shifting/d
|
||||||
/^state/d
|
/^state/d
|
||||||
|
/^Cleanup:/d
|
||||||
/^Error:/d
|
/^Error:/d
|
||||||
/^Next/d
|
/^Next/d
|
||||||
/^Discarding/d
|
/^Discarding/d
|
||||||
|
|||||||
Reference in New Issue
Block a user