]> 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 1a2777e9ce9eaccd5fadbdf69a102f061271a5b4..6174e824edeb507beb4d33f60ae74cbfbd6d7367 100644 (file)
@@ -398,7 +398,7 @@ m4_if(b4_prefix, [yy], [],
 b4_percent_code_get[]dnl
 
 [#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* FIXME: INFRINGES ON USER NAME SPACE */
 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -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;