mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
invoked, yydestruct the lookahead. * tests/calc.at (Calculator $1): Update the expected lengths of traces: there is an added line for the discarded lookahead. * doc/bison.texinfo (Destructor Decl): Some rewording. Define "discarded" symbols.
This commit is contained in:
@@ -1209,6 +1209,9 @@ yyacceptlab:
|
||||
| yyabortlab -- YYABORT comes here. |
|
||||
`-----------------------------------*/
|
||||
yyabortlab:
|
||||
YY_SYMBOL_PRINT ("Error: discarding lookahead", yytoken, &yylval, &yylloc);
|
||||
yydestruct (yytoken, &yylval]b4_location_if([, &yylloc])[);
|
||||
yychar = YYEMPTY;
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user