clearly deprecate %name-prefix

* src/scan-gram.l (%name-prefix): Issue a deprecation warning.

* tests/calc.at, tests/headers.at, tests/input.at, tests/java.at,
* tests/javapush.at, tests/local.at: Adjust expectations.
Or disable -Wdeprecated.

* doc/bison.texi: Document that %name-prefix is replaced by %define
api.prefix.
This commit is contained in:
Akim Demaille
2019-01-02 19:09:56 +01:00
parent 9ec93d4e34
commit b90675e67a
9 changed files with 63 additions and 49 deletions

12
NEWS
View File

@@ -19,8 +19,16 @@ GNU Bison NEWS
** Deprecated features
The use of the %error-verbose directive is deprecated in favor of "%define
parse.error verbose" since Bison 3.0, but no warning was issued.
The %error-verbose directive is deprecated in favor of '%define
parse.error verbose' since Bison 3.0, but no warning was issued.
The '%name-prefix "xx"' directive is deprecated in favor of '%define
api.prefix {xx}' since Bison 3.0, but no warning was issued. These
directives are slightly different, you might need to adjust your code.
%name-prefix renames only symbols with external linkage, while api.prefix
also renames types and macros, including @code{YYDEBUG},
@code{YYTOKENTYPE}, @code{yytokentype}, @code{YYSTYPE}, @code{YYLTYPE},
etc.
The following variables have been renamed for consistency. Backward
compatibility is ensured, but upgrading is recommended.