]> git.saurik.com Git - bison.git/commitdiff
skeletons: b4_args -> b4_join to prepare forthcoming changes
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 2 Aug 2012 12:24:15 +0000 (14:24 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Thu, 2 Aug 2012 13:32:50 +0000 (15:32 +0200)
* data/bison.m4 (b4_args, _b4_args): Rename as...
(b4_join, _b4_join): these.
* data/c++.m4, data/lalr1.cc, data/variant.hh: Adjust.

data/bison.m4
data/c++.m4
data/lalr1.cc
data/variant.hh

index f2126ef40b0fb081e0ea44df332757c2d953246c..42a548dae0617a44b2259e209f037a9ffbf22285 100644 (file)
@@ -206,23 +206,23 @@ m4_define([b4_subtract],
            [m4_eval([$1 - $2])],
            [($1) - ($2)])])
 
-# b4_args(ARG1, ...)
-# _b4_args(ARG1, ...)
+# b4_join(ARG1, ...)
+# _b4_join(ARG1, ...)
 # -------------------
 # Join with comma, skipping empty arguments.
-# b4_args calls itself recursively until it sees the first non-empty
-# argument, then calls _b4_args which prepends each non-empty argument
+# b4_join calls itself recursively until it sees the first non-empty
+# argument, then calls _b4_join which prepends each non-empty argument
 # with a comma.
-m4_define([b4_args],
+m4_define([b4_join],
 [m4_if([$#$1],
        [1], [],
        [m4_ifval([$1],
                  [$1[]_$0(m4_shift($@))],
                  [$0(m4_shift($@))])])])
 
-# _b4_args(ARGS1, ...)
+# _b4_join(ARGS1, ...)
 # --------------------
-m4_define([_b4_args],
+m4_define([_b4_join],
 [m4_if([$#$1],
        [1], [],
        [m4_ifval([$1], [, $1])[]$0(m4_shift($@))])])
index 62374be15b34904dd111602517d2229ada21ca47..4a7169c321fcb71c146340513c98d03acc7b1369 100644 (file)
@@ -158,7 +158,7 @@ m4_define([b4_public_types_declare],
 
       /// Constructor.]b4_locations_if([
       inline symbol_base_type (const location_type& l)])[;
-      inline symbol_base_type (]b4_args(
+      inline symbol_base_type (]b4_join(
         [const semantic_type& v],
         b4_locations_if([const location_type& l]))[);
 
@@ -186,12 +186,12 @@ m4_define([b4_public_types_declare],
       inline symbol_type ();
 
       /// Constructor for tokens with semantic value.
-      inline symbol_type (]b4_args([token_type t],
+      inline symbol_type (]b4_join([token_type t],
                                    [const semantic_type& v],
                                    b4_locations_if([const location_type& l]))[);
 
       /// Constructor for valueless tokens.
-      inline symbol_type (]b4_args([token_type t],
+      inline symbol_type (]b4_join([token_type t],
                                    b4_locations_if([const location_type& l]))[);
 
       /// The symbol type.
@@ -235,7 +235,7 @@ m4_define([b4_public_types_define],
 
   template <typename Exact>
   inline
-  ]b4_parser_class_name[::symbol_base_type<Exact>::symbol_base_type (]b4_args(
+  ]b4_parser_class_name[::symbol_base_type<Exact>::symbol_base_type (]b4_join(
           [const semantic_type& v],
           b4_locations_if([const location_type& l]))[)
     : value(v)]b4_locations_if([
@@ -276,7 +276,7 @@ m4_define([b4_public_types_define],
   }
 
   inline
-  ]b4_parser_class_name[::symbol_type::symbol_type (]b4_args(
+  ]b4_parser_class_name[::symbol_type::symbol_type (]b4_join(
                 [token_type t],
                 b4_locations_if([const location_type& l]))[)
     : super_type (]b4_locations_if([l])[)
@@ -285,7 +285,7 @@ m4_define([b4_public_types_define],
   }
 
   inline
-  ]b4_parser_class_name[::symbol_type::symbol_type (]b4_args(
+  ]b4_parser_class_name[::symbol_type::symbol_type (]b4_join(
                  [token_type t],
                  [const semantic_type& v],
                  b4_locations_if([const location_type& l]))[)
index 8cf20430ea30ea5f185c5e42762eb5d3db261a8b..b3e46e953049579b8f6aaa4ed23ee63786370c37 100644 (file)
@@ -269,7 +269,7 @@ b4_location_define])])])[
       inline stack_symbol_type ();
 
       /// Constructor.
-      inline stack_symbol_type (]b4_args([state_type s],
+      inline stack_symbol_type (]b4_join([state_type s],
                                          [const semantic_type& v],
                                          b4_locations_if([const location_type& l]))[);
 
@@ -509,7 +509,7 @@ m4_if(b4_prefix, [yy], [],
   {
   }
 
-  ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (]b4_args(
+  ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (]b4_join(
                  [state_type s],
                  [const semantic_type& v],
                  b4_locations_if([const location_type& l]))[)
@@ -575,13 +575,13 @@ m4_if(b4_prefix, [yy], [],
     if (m)
       YY_SYMBOL_PRINT (m, sym);
 ]b4_variant_if(
-[[    yystack_.push (stack_symbol_type (]b4_args(
+[[    yystack_.push (stack_symbol_type (]b4_join(
                     [s],
                     [semantic_type()],
                     b4_locations_if([sym.location]))[));
     ]b4_symbol_variant([[yystos_[s]]], [[yystack_[0].value]],
                        [build], [sym.value])],
-[[    yystack_.push (stack_symbol_type (]b4_args(
+[[    yystack_.push (stack_symbol_type (]b4_join(
                       [s],
                       [sym.value],
                       b4_locations_if([sym.location]))[));]])[
@@ -593,7 +593,7 @@ m4_if(b4_prefix, [yy], [],
     if (m)
       YY_SYMBOL_PRINT (m, s);
 ]b4_variant_if(
-[[    yystack_.push (stack_symbol_type (]b4_args(
+[[    yystack_.push (stack_symbol_type (]b4_join(
                        [s.state],
                        [semantic_type()],
                        b4_locations_if([s.location]))[));
@@ -852,7 +852,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
     if (!yyerrstatus_)
       {
         ++yynerrs_;
-        error (]b4_args(b4_locations_if([yyla.location]),
+        error (]b4_join(b4_locations_if([yyla.location]),
                         [[yysyntax_error_ (yystack_[0].state,
                                            yyempty ? yyempty_ : yyla.type)]])[);
       }
@@ -967,7 +967,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
   void
   ]b4_parser_class_name[::error (const syntax_error& yyexc)
   {
-    error (]b4_args(b4_locations_if([yyexc.location]),
+    error (]b4_join(b4_locations_if([yyexc.location]),
                     [[yyexc.what()]])[);
   }
 
index 5895b297cfc0c3b5feae0a1b4fbaa3d8dc65b29d..65f0026e9ca174de2378446247af79fb4be6f7e1 100644 (file)
@@ -233,7 +233,7 @@ m4_define([b4_symbol_constructor_declare_],
 [    static inline
     symbol_type
     make_[]b4_symbol_([$1], [id]) (dnl
-b4_args(b4_symbol_if([$1], [has_type],
+b4_join(b4_symbol_if([$1], [has_type],
                      [const b4_symbol([$1], [type])& v]),
         b4_locations_if([const location_type& l])));
 
@@ -257,11 +257,11 @@ m4_define([b4_symbol_constructor_define_],
 [b4_symbol_if([$1], [is_token], [b4_symbol_if([$1], [has_id],
 [  b4_parser_class_name::symbol_type
   b4_parser_class_name::make_[]b4_symbol_([$1], [id]) (dnl
-b4_args(b4_symbol_if([$1], [has_type],
+b4_join(b4_symbol_if([$1], [has_type],
                      [const b4_symbol([$1], [type])& v]),
         b4_locations_if([const location_type& l])))
   {
-    return symbol_type (b4_args([token::b4_symbol([$1], [id])],
+    return symbol_type (b4_join([token::b4_symbol([$1], [id])],
                                 b4_symbol_if([$1], [has_type], [v]),
                                 b4_locations_if([l])));
   }