(Duplicate representation of merged trees): Add casts to pacify g++.
[bison.git] / data / lalr1.cc
index e492173a40dd3edfeaa6990a0c2ca567e2c97222..a8e570cc8a82d219cf53c630c0dd20df105aacb0 100644 (file)
@@ -149,11 +149,19 @@ b4_syncline([@oline@], [@ofile@])[
 # define YYDEBUG ]b4_debug[
 #endif
 
-/* Enabling verbose error message.  */
-#ifndef YYERROR_VERBOSE
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
 # define YYERROR_VERBOSE ]b4_error_verbose[
 #endif
 
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE ]b4_token_table[
+#endif
+
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 ]m4_ifdef([b4_stype],
 [b4_syncline([b4_stype_line], [b4_filename])
@@ -321,7 +329,7 @@ namespace yy
     /// For a rule, its RHS length.
     static const ]b4_int_type_for([b4_r2])[ yyr2_[];
 
-#if YYDEBUG || YYERROR_VERBOSE
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
     /// For a symbol, its name in clear.
     static const char* const yytname_[];
 #endif
@@ -871,11 +879,11 @@ yyabortlab:
 
 yyreturn:
   if (yylooka_ != yyeof_ && yylooka_ != yyempty_)
-    yydestruct_ ("Error: discarding lookahead", yyilooka_, &yylval, &yylloc);
+    yydestruct_ ("Cleanup: discarding lookahead", yyilooka_, &yylval, &yylloc);
 
   while (yystate_stack_.height () != 1)
     {
-      yydestruct_ ("Error: popping",
+      yydestruct_ ("Cleanup: popping",
                   yystos_[yystate_stack_[0]],
                   &yysemantic_stack_[0],
                   &yylocation_stack_[0]);
@@ -938,7 +946,7 @@ yy::]b4_parser_class_name[::yyreport_syntax_error_ ()
                   {
                     message += (!count++) ? ", expecting " : " or ";
                    message += yytnamerr_ (yytname_[x]);
-                 }
+                 }
             }
        }
       else
@@ -1030,7 +1038,7 @@ yy::]b4_parser_class_name[::yyr2_[] =
   ]b4_r2[
 };
 
-#if YYDEBUG || YYERROR_VERBOSE
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at \a yyntokens_, nonterminals. */
 const char*