mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
muscle: check more cases of %define variables with code values
* data/bison.m4 (b4_percent_define_check_kind): Fix overquotation. (api.location.type, api.position.type): Check they have code values here. * data/c++.m4 (api.location.type): No longer checked here. (parser_class_name): Check it here. * data/java.m4 (api.value.type, init_throws, lex_throws, parser_class_name) (throws, annotations, extends, implements): Check they have code values. * doc/bison.texi: Fix every incorrect occurrence of %define. Document the additional syntax for %define: code values. Document the additional syntax for -D/-F: string and code values. * tests/calc.at, tests/headers.at, tests/input.at, tests/java.at, * tests/local.at: Fix dependencies.
This commit is contained in:
@@ -1422,8 +1422,8 @@ AT_SETUP([["%define" Boolean variables]])
|
||||
|
||||
AT_DATA([Input.y],
|
||||
[[%language "Java"
|
||||
%define public "maybe"
|
||||
%define parser_class_name "Input"
|
||||
%define public maybe
|
||||
%define parser_class_name {Input}
|
||||
%%
|
||||
start: %empty;
|
||||
]])
|
||||
@@ -1453,9 +1453,9 @@ start: TOK;
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[input.yy]], [0], [],
|
||||
[[input.yy:4.9-18: warning: %define variable 'api.prefix' requires '{...}' values [-Wdeprecated]
|
||||
[[input.yy:2.9-25: warning: %define variable 'api.location.type' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:4.9-18: warning: %define variable 'api.prefix' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:5.9-24: warning: %define variable 'api.token.prefix' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:2.9-25: warning: %define variable 'api.location.type' requires '{...}' values [-Wdeprecated]
|
||||
input.yy:3.9-21: warning: %define variable 'api.namespace' requires '{...}' values [-Wdeprecated]
|
||||
]])
|
||||
])
|
||||
@@ -1857,10 +1857,10 @@ AT_BISON_CHECK([[$2 input.y]], [[1]], [[]],
|
||||
]])
|
||||
])
|
||||
|
||||
AT_TEST([%define api.prefix foo %name-prefix "bar"], [], [input.y:1.9-18])
|
||||
AT_TEST([], [-Dapi.prefix=foo -p bar], [<command line>:2])
|
||||
AT_TEST([%name-prefix "bar"], [-Dapi.prefix=foo], [<command line>:2])
|
||||
AT_TEST([%define api.prefix foo], [-p bar], [input.y:1.9-18])
|
||||
AT_TEST([%define api.prefix {foo} %name-prefix "bar"], [], [input.y:1.9-18])
|
||||
AT_TEST([], [-Dapi.prefix={foo} -p bar], [<command line>:2])
|
||||
AT_TEST([%name-prefix "bar"], [-Dapi.prefix={foo}], [<command line>:2])
|
||||
AT_TEST([%define api.prefix {foo}], [-p bar], [input.y:1.9-18])
|
||||
|
||||
m4_popdef([AT_TEST])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user