]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
lalr1.cc: don't discard non-existent lookahead on syntax error.
[bison.git] / data / lalr1.cc
index 9e0d522bd44557a9f63da6eff2ca076326e2be48..6174e824edeb507beb4d33f60ae74cbfbd6d7367 100644 (file)
@@ -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;