%define variables: support value changes in deprecation

* src/muscle-tab.c (define_directive): Be robust to "assignment"
containing '='.
(muscle_percent_variable_update): Upgrade "variant" to "api.value.type".
Support such upgrade patterns.
Adjust callers.

* data/bison.m4: Use api.value.type for variants.
* tests/c++.at: Adjust tests.
This commit is contained in:
Akim Demaille
2012-12-16 10:20:46 +01:00
parent 53f8e4096d
commit bc6038978f
3 changed files with 66 additions and 19 deletions

View File

@@ -821,13 +821,12 @@ m4_percent_define_default([[api.token.prefix]], [[]])
# b4_parse_assert_if([IF-ASSERTIONS-ARE-USED], [IF-NOT])
# b4_parse_trace_if([IF-DEBUG-TRACES-ARE-ENABLED], [IF-NOT])
# b4_token_ctor_if([IF-YYLEX-RETURNS-A-TOKEN], [IF-NOT])
# b4_variant_if([IF-VARIANT-ARE-USED], [IF-NOT])
# ----------------------------------------------
b4_percent_define_if_define([token_ctor], [api.token.constructor])
b4_percent_define_if_define([locations]) # Whether locations are tracked.
b4_percent_define_if_define([parse.assert])
b4_percent_define_if_define([parse.trace])
b4_percent_define_if_define([variant])
# b4_bison_locations_if([IF-TRUE])
# --------------------------------
@@ -854,6 +853,15 @@ b4_define_flag_if([error_verbose])
b4_error_verbose_if([m4_define([b4_token_table_flag], [1])])
# b4_variant_if([IF-VARIANT-ARE-USED], [IF-NOT])
# ----------------------------------------------
b4_percent_define_if_define([variant])
m4_case(b4_percent_define_get([[api.value.type]]),
[variant], [m4_define([b4_variant_flag], [[1]])],
[m4_define([b4_variant_flag], [[0]])])
b4_define_flag_if([variant])
## ----------------------------------------------------------- ##
## After processing the skeletons, check that all the user's ##
## %define variables and %code qualifiers were used by Bison. ##