mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 22:33:03 +00:00
api.token.prefix: use code values
* data/bison.m4: Remove useless (and incorrect: m4_* instead of b4_*) default assignment to api.token.prefix. Check that api.token.prefix is assigned code. * tests/input.at (%define code variables): New test. * NEWS, doc/bison.texi, tests/c++.at, tests/calc.at, * tests/java.at, tests/local.at: Adjust to use braces.
This commit is contained in:
@@ -1434,6 +1434,31 @@ AT_BISON_CHECK([[Input.y]], [1], [],
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
## ------------------------ ##
|
||||
## %define code variables. ##
|
||||
## ------------------------ ##
|
||||
|
||||
AT_SETUP([["%define" code variables]])
|
||||
|
||||
m4_pushdef([AT_TEST],
|
||||
[AT_DATA([input.y],
|
||||
[[%define api.token.prefix ]$1[
|
||||
%%
|
||||
start: %empty;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.y]], [0], [],
|
||||
[[input.y:1.9-24: warning: %define variable 'api.token.prefix' requires '{...}' values [-Wdeprecated]
|
||||
]])
|
||||
])
|
||||
|
||||
AT_TEST(["abc"])
|
||||
AT_TEST([abcde])
|
||||
m4_popdef([AT_TEST])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ------------------------ ##
|
||||
## %define enum variables. ##
|
||||
## ------------------------ ##
|
||||
|
||||
Reference in New Issue
Block a user