From: Theophile Ranquet Date: Fri, 28 Dec 2012 12:32:14 +0000 (+0100) Subject: carets: activate by default X-Git-Tag: v2.7.90~180 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/9c4788b7ee33cf142775a827f67bb9747ba1d2ca 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. --- diff --git a/src/getargs.c b/src/getargs.c index 0d43186f..3e196e31 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -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; diff --git a/tests/input.at b/tests/input.at index 44a24770..f9ed33d2 100644 --- a/tests/input.at +++ b/tests/input.at @@ -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 -:1: previous definition +: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" ^^^ -:2: previous definition +: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]], [], -[[:1: error: %define variable 'unused-d' is not used -:2: error: %define variable 'unused-f' is not used +[[:2: error: %define variable 'unused-d' is not used +: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]], [], -[[:1: error: %define variable 'parse.lac.es-capacity-initial' is not used +[[:2: error: %define variable 'parse.lac.es-capacity-initial' is not used ]]) AT_BISON_CHECK([[-Dparse.lac.memory-trace=full input.y]], [[1]], [], -[[:1: error: %define variable 'parse.lac.memory-trace' is not used +[[: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], [:1]) -AT_TEST([%name-prefix "bar"], [-Dapi.prefix=foo], [:1]) +AT_TEST([], [-Dapi.prefix=foo -p bar], [:2]) +AT_TEST([%name-prefix "bar"], [-Dapi.prefix=foo], [:2]) AT_TEST([%define api.prefix foo], [-p bar], [input.y:1.9-18]) m4_popdef([AT_TEST]) diff --git a/tests/local.at b/tests/local.at index c2916065..b7d75afc 100644 --- a/tests/local.at +++ b/tests/local.at @@ -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])