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:
@@ -1055,6 +1055,17 @@ AT_BISON_CHECK([[input.y]], [1], [],
|
||||
[[input.y:1.9-34: invalid value for %define Boolean variable `lr.keep-unreachable-states'
|
||||
]])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%define namespace "foo"
|
||||
%define api.namespace "foo"
|
||||
%%
|
||||
start: ;
|
||||
]])
|
||||
AT_BISON_CHECK([[input.y]], [1], [],
|
||||
[[input.y:2.9-21: %define variable `api.namespace' redefined
|
||||
input.y:1.9-17: previous definition
|
||||
]])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%define foo_bar "baz"
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user