mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
carets: activate by default
* src/getargs.c (feature_flag): Here. * tests/local.at (AT_BISON_CHECK_, AT_BISON_CHECK_NO_XML): Deactivate carets for the testsuite, by default. * tests/input.at: Adjust the locations for command line definitions.
This commit is contained in:
@@ -46,7 +46,7 @@ bool yacc_flag; /* for -y */
|
||||
bool nondeterministic_parser = false;
|
||||
bool glr_parser = false;
|
||||
|
||||
int feature_flag = feature_none;
|
||||
int feature_flag = feature_caret;
|
||||
int report_flag = report_none;
|
||||
int trace_flag = trace_none;
|
||||
|
||||
|
||||
@@ -1240,7 +1240,7 @@ start: ;
|
||||
]])
|
||||
AT_BISON_CHECK([[-Dvar=cmd-d input-dg.y]], [[1]], [],
|
||||
[[input-dg.y:1.9-11: error: %define variable 'var' redefined
|
||||
<command line>:1: previous definition
|
||||
<command line>:2: previous definition
|
||||
]])
|
||||
|
||||
AT_DATA([[input-dg.y]],
|
||||
@@ -1252,7 +1252,7 @@ AT_BISON_CHECK([[-fcaret -Dvar=cmd-d input-dg.y]], [[1]], [],
|
||||
[[input-dg.y:1.9-11: error: %define variable 'var' redefined
|
||||
%define var "gram"
|
||||
^^^
|
||||
<command line>:2: previous definition
|
||||
<command line>:3: previous definition
|
||||
]])
|
||||
|
||||
AT_DATA([[input-unused.y]],
|
||||
@@ -1260,8 +1260,8 @@ AT_DATA([[input-unused.y]],
|
||||
start: ;
|
||||
]])
|
||||
AT_BISON_CHECK([[-Dunused-d -Funused-f input-unused.y]], [[1]], [],
|
||||
[[<command line>:1: error: %define variable 'unused-d' is not used
|
||||
<command line>:2: error: %define variable 'unused-f' is not used
|
||||
[[<command line>:2: error: %define variable 'unused-d' is not used
|
||||
<command line>:3: error: %define variable 'unused-f' is not used
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1582,11 +1582,11 @@ start: ;
|
||||
# parse.lac.* options are useless if LAC isn't actually activated.
|
||||
AT_BISON_CHECK([[-Dparse.lac.es-capacity-initial=1 input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:1: error: %define variable 'parse.lac.es-capacity-initial' is not used
|
||||
[[<command line>:2: error: %define variable 'parse.lac.es-capacity-initial' is not used
|
||||
]])
|
||||
AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]],
|
||||
[[1]], [],
|
||||
[[<command line>:1: error: %define variable 'parse.lac.memory-trace' is not used
|
||||
[[<command line>:2: error: %define variable 'parse.lac.memory-trace' is not used
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1644,8 +1644,8 @@ 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>:1])
|
||||
AT_TEST([%name-prefix "bar"], [-Dapi.prefix=foo], [<command line>:1])
|
||||
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])
|
||||
|
||||
@@ -478,7 +478,7 @@ AT_BISON_CHECK_NO_XML($@)])
|
||||
# --------------------------------------------------
|
||||
# Low-level macro to run bison once.
|
||||
m4_define([AT_BISON_CHECK_],
|
||||
[AT_CHECK(AT_QUELL_VALGRIND[[ bison ]]$@)])
|
||||
[AT_CHECK(AT_QUELL_VALGRIND[[ bison -fno-caret ]]$@)])
|
||||
|
||||
|
||||
# AT_BISON_CHECK_WARNINGS(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
|
||||
@@ -529,7 +529,7 @@ fi]dnl
|
||||
# when a tortured grammar's XML is known to be too large for xsltproc to
|
||||
# handle.
|
||||
m4_define([AT_BISON_CHECK_NO_XML],
|
||||
[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison ]]$@)
|
||||
[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison -fno-caret ]]$@)
|
||||
AT_BISON_CHECK_WARNINGS($@)])
|
||||
|
||||
# AT_BISON_CHECK_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
|
||||
|
||||
Reference in New Issue
Block a user