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:
Akim Demaille
2019-01-13 13:13:21 +01:00
parent 8580b268c3
commit ba469451d8
4 changed files with 33 additions and 18 deletions

View File

@@ -263,7 +263,7 @@ eqopt ({sp}=)?
/* Deprecated since Bison 3.0 (2013-07-25), but the warning is
issued only since Bison 3.3. */
"%error-verbose" DEPRECATED ("%define parse.error verbose");
"%error-verbose" RETURN_VALUE (PERCENT_ERROR_VERBOSE, uniqstr_new (yytext));
/* Deprecated since Bison 2.6 (2012-07-19), but the warning is
issued only since Bison 3.3. */
@@ -271,7 +271,7 @@ eqopt ({sp}=)?
/* Deprecated since Bison 2.7.90, 2012. */
"%default"[-_]"prec" DEPRECATED ("%default-prec");
"%error"[-_]"verbose" DEPRECATED ("%define parse.error verbose");
"%error"[-_]"verbose" RETURN_VALUE (PERCENT_ERROR_VERBOSE, uniqstr_new (yytext));
"%expect"[-_]"rr" DEPRECATED ("%expect-rr");
"%file-prefix"{eqopt} DEPRECATED ("%file-prefix");
"%fixed"[-_]"output"[-_]"files" DEPRECATED ("%fixed-output-files");