mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
diagnostics: improve the accuracy for %error-verbose
Avoid duplicate warnings about %error-verbose, once for deprecation, another for duplicate. Keep only the duplicate warning for the second occurrence of %error-verbose. This will help removal fixits. * src/scan-gram.l (%error-verbose): Return as a PERCENT_ERROR_VERBOSE token. * src/parse-gram.y (do_error_verbose): New. Use it. * src/muscle-tab.c (muscle_percent_variable_update): Handle pseudo variables such as %error-verbose.
This commit is contained in:
@@ -446,6 +446,8 @@ muscle_percent_variable_update (char const *variable,
|
||||
} conversion_type;
|
||||
const conversion_type conversion[] =
|
||||
{
|
||||
{ "%error-verbose", "parse.error=verbose", muscle_keyword },
|
||||
{ "%error_verbose", "parse.error=verbose", muscle_keyword },
|
||||
{ "abstract", "api.parser.abstract", muscle_keyword },
|
||||
{ "annotations", "api.parser.annotations", muscle_code },
|
||||
{ "api.push_pull", "api.push-pull", muscle_keyword },
|
||||
@@ -477,7 +479,9 @@ muscle_percent_variable_update (char const *variable,
|
||||
: STREQ (c->obsolete, variable))
|
||||
{
|
||||
/* Generate the deprecation warning. */
|
||||
*old = define_directive (c->obsolete, kind, *value);
|
||||
*old = c->obsolete[0] == '%'
|
||||
? xstrdup (c->obsolete)
|
||||
: define_directive (c->obsolete, kind, *value);
|
||||
*upd = define_directive (c->updated, c->kind, *value);
|
||||
/* Update the variable and its value. */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user