]> git.saurik.com Git - bison.git/commitdiff
* data/lalr1.cc (b4_parse_param_decl_1): New.
authorAkim Demaille <akim@epita.fr>
Mon, 27 Sep 2004 07:45:09 +0000 (07:45 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 27 Sep 2004 07:45:09 +0000 (07:45 +0000)
(b4_parse_param_decl): Use it to have different names bw attribute
and argument names.
(b4_cc_constructor_call): Likewise.

ChangeLog
data/lalr1.cc

index e61781c724703c5c659183b2dc14e3995b85719d..8b8c125efe61fdadb6b7c20331726796d68d5b66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-09-27  Akim Demaille  <akim@epita.fr>
+
+       * data/lalr1.cc (b4_parse_param_decl_1): New.
+       (b4_parse_param_decl): Use it to have different names bw attribute
+       and argument names.
+       (b4_cc_constructor_call): Likewise.
+
 2004-09-24  Akim Demaille  <akim@epita.fr>
 
        * src/parse-gram.y (add_param): Strip the leading and trailing
 2004-09-24  Akim Demaille  <akim@epita.fr>
 
        * src/parse-gram.y (add_param): Strip the leading and trailing
index 8ff462a91f3fec6b4902a743f72e209c71f1ec23..00090e7a02898b383e0b8022608814709e9c72f6 100644 (file)
@@ -83,13 +83,22 @@ m4_define([b4_constructor],
 
 # b4_parse_param_decl
 # -------------------
 
 # b4_parse_param_decl
 # -------------------
-#  Constructor's extra arguments.
+# Extra formal arguments of the constructor.
+# Change the parameter names from "foo" into "foo_yyarg", so that
+# there is no collision bw the user chosen attribute name, and the
+# argument name in the constructor.
 m4_define([b4_parse_param_decl],
 m4_define([b4_parse_param_decl],
-          [m4_ifset([b4_parse_param], [, b4_c_ansi_formals(b4_parse_param)])])
+[m4_ifset([b4_parse_param],
+          [, m4_map_sep([b4_parse_param_decl_1], [, ], [b4_parse_param])])])
+
+m4_define([b4_parse_param_decl_1],
+[$1_yyarg])
+
+
 
 # b4_parse_param_cons
 # -------------------
 
 # b4_parse_param_cons
 # -------------------
-#  constructor's extra initialisations.
+# Extra initialisations of the constructor.
 m4_define([b4_parse_param_cons],
           [m4_ifset([b4_parse_param],
                    [,
 m4_define([b4_parse_param_cons],
           [m4_ifset([b4_parse_param],
                    [,
@@ -98,11 +107,11 @@ m4_define([b4_cc_constructor_calls],
          [m4_map_sep([b4_cc_constructor_call], [,
       ], [$@])])
 m4_define([b4_cc_constructor_call],
          [m4_map_sep([b4_cc_constructor_call], [,
       ], [$@])])
 m4_define([b4_cc_constructor_call],
-         [$2($2)])
+         [$2 ($2_yyarg)])
 
 # b4_parse_param_vars
 # -------------------
 
 # b4_parse_param_vars
 # -------------------
-#  Extra instance variables.
+# Extra instance variables.
 m4_define([b4_parse_param_vars],
           [m4_ifset([b4_parse_param],
                    [
 m4_define([b4_parse_param_vars],
           [m4_ifset([b4_parse_param],
                    [