+/** If the \a variable name is obsolete, return the name to use,
+ * otherwise \a variable. If the \a value is obsolete, update it too.
+ *
+ * Allocates the returned value. */
+static
+char *
+muscle_percent_variable_update (char const *variable, location variable_loc,
+ char const **value)
+{
+ typedef struct
+ {
+ const char *obsolete;
+ const char *updated;
+ } conversion_type;
+ const conversion_type conversion[] =
+ {
+ { "api.push_pull", "api.push-pull", },
+ { "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", },
+ { "stype", "api.value.type", },
+ { "variant=", "api.value.type=variant", },
+ { "variant=true", "api.value.type=variant", },
+ { NULL, NULL, }
+ };
+ conversion_type const *c;
+ for (c = conversion; c->obsolete; ++c)