mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
variables: simplify the upgrade of namespace into api.namespace.
This patch simplifies "variables: rename namespace as api.namespace",
commit 6750106107.
Suggested by Joel E. Denny in
http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
* src/muscle-tab.c (muscle_percent_variable_update): New.
(muscle_percent_define_insert): Use it in replacement of the
previous tr invocation.
Remove variable_tr, no longer needed.
* data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
Remove.
* data/c++.m4: No longer handle namespace -> api.namespace.
* tests/input.at (%define backward compatibility): Check that
namespace is treated as api.namespace.
This commit is contained in:
@@ -27,14 +27,7 @@ m4_include(b4_pkgdatadir/[c.m4])
|
||||
b4_percent_define_default([[parser_class_name]], [[parser]])
|
||||
b4_percent_define_default([[location_type]], [[location]])
|
||||
b4_percent_define_default([[filename_type]], [[std::string]])
|
||||
|
||||
# api.namespace defaults to namespace, and then to b4_prefix.
|
||||
b4_percent_define_ifdef([api.namespace],
|
||||
[],
|
||||
[b4_percent_define_ifdef([namespace],
|
||||
[b4_percent_define_copy([namespace], [api.namespace])],
|
||||
[b4_percent_define_default([api.namespace],
|
||||
m4_defn([b4_prefix]))])])
|
||||
b4_percent_define_default([[api.namespace]], m4_defn([b4_prefix]))
|
||||
|
||||
b4_percent_define_default([[global_tokens_and_yystype]], [[false]])
|
||||
b4_percent_define_default([[define_location_comparison]],
|
||||
|
||||
Reference in New Issue
Block a user