mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
lalr1.cc: don't discard non-existent lookahead on syntax error.
* data/lalr1.cc (parser::parse): Check yyempty first. * tests/c++.at (Syntax error discarding no lookahead): New test group.
This commit is contained in:
@@ -876,7 +876,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
/* Return failure if at end of input. */
|
||||
if (yyla.type == yyeof_)
|
||||
YYABORT;
|
||||
else
|
||||
else if (!yyempty)
|
||||
{
|
||||
yy_destroy_ ("Error: discarding", yyla);
|
||||
yyempty = true;
|
||||
|
||||
Reference in New Issue
Block a user