]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
* data/m4sugar/m4sugar.m4 (_m4_map): New macro.
[bison.git] / data / lalr1.cc
index 558d23746537c4fbd3b77fe46592c09e49b7e225..01fbcd0fe3ab3fb7f25e3f3e1848e66e5124966e 100644 (file)
@@ -30,7 +30,7 @@ m4_if(b4_defines_flag, 0, [],
 b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
              [2002, 2003, 2004, 2005])
 dnl FIXME: This is wrong, we want computed header guards.
-dnl FIXME: I don\'t know why the macros are missing now. :(
+dnl FIXME: I do not know why the macros are missing now. :(
 [
 #ifndef PARSER_HEADER_H
 # define PARSER_HEADER_H
@@ -411,12 +411,12 @@ void
 yy::]b4_parser_class_name[::yysymprint_ (int yytype,
                          const semantic_type* yyvaluep, const location_type* yylocationp)
 {
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yyvaluep;
-  (void) yylocationp;
   /* Backward compatibility, but should be removed eventually. */
   std::ostream& cdebug_ = *yycdebug_;
-  (void) cdebug_;
+
+  /* Suppress unused-variable warnings.  */
+  if (false)
+    yysymprint_ (yytype + !&cdebug_, yyvaluep, yylocationp);
 
   *yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
             << ' ' << yytname_[yytype] << " ("
@@ -435,10 +435,9 @@ void
 yy::]b4_parser_class_name[::yydestruct_ (const char* yymsg,
                          int yytype, semantic_type* yyvaluep, location_type* yylocationp)
 {
-  /* Pacify ``unused variable'' warnings.  */
-  (void) yymsg;
-  (void) yyvaluep;
-  (void) yylocationp;
+  /* Suppress unused-variable warnings.  */
+  if (false)
+    yydestruct_ (yymsg, yytype, yyvaluep, yylocationp);
 
   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
@@ -1015,7 +1014,7 @@ const yy::]b4_parser_class_name[::token_number_type yy::]b4_parser_class_name[::
 
 ]b4_epilogue
 dnl
-@output stack.hh
+@output b4_dir_prefix[]stack.hh
 b4_copyright([stack handling for Bison C++ parsers], [2002, 2003, 2004, 2005])[
 
 #ifndef BISON_STACK_HH