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

View File

@@ -84,7 +84,9 @@ AT_DATA_GRAMMAR([input.y],
exp: %empty;
]])
AT_BISON_CHECK([--defines -o input.c input.y])
AT_BISON_CHECK([--defines -o input.c input.y], [], [],
[[input.y:11.1-12: warning: deprecated directive: '%name-prefix', use '%define api.prefix' [-Wdeprecated]
]])
# YYLTYPE should be defined, and MY_LLOC declared.
AT_DATA([caller.c],