mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* 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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -83,13 +83,22 @@ m4_define([b4_constructor],
|
||||
|
||||
# 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_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
|
||||
# -------------------
|
||||
# constructor's extra initialisations.
|
||||
# Extra initialisations of the constructor.
|
||||
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],
|
||||
[$2($2)])
|
||||
[$2 ($2_yyarg)])
|
||||
|
||||
# b4_parse_param_vars
|
||||
# -------------------
|
||||
# Extra instance variables.
|
||||
# Extra instance variables.
|
||||
m4_define([b4_parse_param_vars],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user