+ { "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)
+ {
+ char const *eq = strchr (c->obsolete, '=');
+ if (eq
+ ? (!strncmp (c->obsolete, variable, eq - c->obsolete)
+ && STREQ (eq + 1, *value))
+ : STREQ (c->obsolete, variable))
+ {
+ char *old = define_directive (c->obsolete, *value);
+ char *upd = define_directive (c->updated, *value);
+ deprecated_directive (&variable_loc, old, upd);
+ free (old);
+ free (upd);
+ char *res = xstrdup (c->updated);
+ {
+ char *eq2 = strchr (res, '=');
+ if (eq2)
+ {
+ *eq2 = '\0';
+ *value = eq2 + 1;
+ }
+ }
+ return res;
+ }