X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b999409e09db9adfbc7a80569c4e7a8cb0587adf..0fe9720964da510a2b359af390a3053aace65f9f:/src/muscle-tab.c diff --git a/src/muscle-tab.c b/src/muscle-tab.c index 4b268983..86363f50 100644 --- a/src/muscle-tab.c +++ b/src/muscle-tab.c @@ -398,7 +398,12 @@ muscle_percent_variable_update (char const *variable, location variable_loc) const conversion_type conversion[] = { { "api.push_pull", "api.push-pull", }, - { "lr.keep_unreachable_states", "lr.keep-unreachable-states", }, + { "api.tokens.prefix", "api.token.prefix", }, + { "lex_symbol", "api.token.constructor", }, + { "location_type", "api.location.type", }, + { "lr.default-reductions", "lr.default-reduction", }, + { "lr.keep-unreachable-states", "lr.keep-unreachable-state", }, + { "lr.keep_unreachable_states", "lr.keep-unreachable-state", }, { "namespace", "api.namespace", }, }; char const *res = variable; @@ -416,23 +421,17 @@ muscle_percent_variable_update (char const *variable, location variable_loc) } void -muscle_percent_define_insert (char const *variable, location variable_loc, +muscle_percent_define_insert (char const *var, location variable_loc, char const *value, muscle_percent_define_how how) { - char const *name; - char const *loc_name; - char const *syncline_name; - char const *how_name; - - /* Permit certain names with underscores for backward compatibility. */ - variable = muscle_percent_variable_update (variable, variable_loc); - - name = UNIQSTR_CONCAT ("percent_define(", variable, ")"); - loc_name = UNIQSTR_CONCAT ("percent_define_loc(", variable, ")"); - syncline_name = + /* Backward compatibility. */ + char const *variable = muscle_percent_variable_update (var, variable_loc); + char const *name = UNIQSTR_CONCAT ("percent_define(", variable, ")"); + char const *loc_name = UNIQSTR_CONCAT ("percent_define_loc(", variable, ")"); + char const *syncline_name = UNIQSTR_CONCAT ("percent_define_syncline(", variable, ")"); - how_name = UNIQSTR_CONCAT ("percent_define_how(", variable, ")"); + char const *how_name = UNIQSTR_CONCAT ("percent_define_how(", variable, ")"); /* Command-line options are processed before the grammar file. */ if (how == MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE @@ -610,8 +609,8 @@ muscle_percent_define_check_values (char const * const *values) quote (*variablep), quote_n (1, value)); i += SUB_INDENT; for (values = variablep + 1; *values; ++values) - complain_indent (&loc, complaint, &i, _("accepted value: %s"), - quote (*values)); + complain_indent (&loc, complaint | no_caret, &i, + _("accepted value: %s"), quote (*values)); } else {