mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
c++: variants: don't leak the lookahead in error recovery
During error recovery, when discarding the lookeahead, we don't destroy it, which is caught by parse.assert assertions. Reported by Antonio Silva Correia. With an analysis and suggested patch from Michel d'Hooge. <http://savannah.gnu.org/support/?108481> * tests/c++.at (Variants): Strengthen the test to try syntax errors with discarded lookahead.
This commit is contained in:
@@ -901,6 +901,7 @@ b4_dollar_popdef])[]dnl
|
||||
else if (!yyempty)
|
||||
{
|
||||
yy_destroy_ ("Error: discarding", yyla);
|
||||
yyla.clear ();
|
||||
yyempty = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user