]> git.saurik.com Git - bison.git/blobdiff - data/glr.cc
Merge remote-tracking branch 'origin/maint'
[bison.git] / data / glr.cc
index 67258eea1cc983885e451188f67c944ef4b4e997..9a9d7764b06ba71f130daeddc9351c6ead09f52a 100644 (file)
@@ -94,7 +94,8 @@ m4_append([b4_post_prologue],
 
 b4_c_ansi_function_decl([yyerror],
     [static void],
 
 b4_c_ansi_function_decl([yyerror],
     [static void],
-    [[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
+    [[const b4_namespace_ref::b4_parser_class_name::location_type *yylocationp],
+                        [yylocationp]],
     b4_parse_param,
     [[const char* msg], [msg]])])
 
     b4_parse_param,
     [[const char* msg], [msg]])])
 
@@ -108,7 +109,8 @@ m4_append([b4_epilogue],
 
 ]b4_c_ansi_function_def([yyerror],
     [static void],
 
 ]b4_c_ansi_function_def([yyerror],
     [static void],
-    [[b4_namespace_ref::b4_parser_class_name::location_type *yylocationp], [yylocationp]],
+    [[const b4_namespace_ref::b4_parser_class_name::location_type *yylocationp],
+                        [yylocationp]],
     b4_parse_param,
     [[const char* msg], [msg]])[
 {
     b4_parse_param,
     [[const char* msg], [msg]])[
 {
@@ -146,11 +148,14 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
 
   inline void
   ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
 
   inline void
   ]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
-                           const semantic_type* yyvaluep, const location_type* yylocationp)
+                           const semantic_type* yyvaluep,
+                           const location_type* yylocationp)
   {
   {
-    /* Pacify ``unused variable'' warnings.  */
-    YYUSE (yyvaluep);
     YYUSE (yylocationp);
     YYUSE (yylocationp);
+    YYUSE (yyvaluep);
+    std::ostream& yyoutput = debug_stream ();
+    std::ostream& yyo = yyoutput;
+    YYUSE (yyo);
     switch (yytype)
       {
 ]b4_symbol_foreach([b4_symbol_printer])dnl
     switch (yytype)
       {
 ]b4_symbol_foreach([b4_symbol_printer])dnl
@@ -162,7 +167,8 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
 
   void
   ]b4_parser_class_name[::yy_symbol_print_ (int yytype,
 
   void
   ]b4_parser_class_name[::yy_symbol_print_ (int yytype,
-                           const semantic_type* yyvaluep, const location_type* yylocationp)
+                           const semantic_type* yyvaluep,
+                           const location_type* yylocationp)
   {
     *yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
                << ' ' << yytname[yytype] << " ("
   {
     *yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
                << ' ' << yytname[yytype] << " ("
@@ -220,8 +226,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
 
 /* C++ GLR parser skeleton written by Akim Demaille.  */
 
 
 /* C++ GLR parser skeleton written by Akim Demaille.  */
 
-#ifndef PARSER_HEADER_H
-# define PARSER_HEADER_H
+]b4_cpp_guard_open([b4_spec_defines_file])[
 
 ]b4_percent_code_get([[requires]])[
 
 
 ]b4_percent_code_get([[requires]])[
 
@@ -312,16 +317,6 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
     std::ostream* yycdebug_;
 #endif
 
     std::ostream* yycdebug_;
 #endif
 
-    /// \brief Reclaim the memory associated to a symbol.
-    /// \param yymsg        Why this token is reclaimed.
-    /// \param yytype       The symbol type.
-    /// \param yyvaluep     Its semantic value.
-    /// \param yylocationp  Its location.
-    inline void yydestruct_ (const char* yymsg,
-                             int yytype,
-                             semantic_type* yyvaluep,
-                             location_type* yylocationp);
-
 ]b4_parse_param_vars[
   };
 
 ]b4_parse_param_vars[
   };
 
@@ -337,8 +332,6 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]],
 #endif
 
 ]b4_namespace_close[
 #endif
 
 ]b4_namespace_close[
-
-]b4_percent_code_get([[provides]])[]dnl
-
-[#endif /* ! defined PARSER_HEADER_H */]
-m4_divert_pop(0)
+]b4_percent_code_get([[provides]])[
+]b4_cpp_guard_close([b4_spec_defines_file])[
+]m4_divert_pop(0)