]> git.saurik.com Git - bison.git/commitdiff
carets: activate by default
authorTheophile Ranquet <ranquet@lrde.epita.fr>
Fri, 28 Dec 2012 12:32:14 +0000 (13:32 +0100)
committerTheophile Ranquet <ranquet@lrde.epita.fr>
Fri, 11 Jan 2013 18:11:21 +0000 (19:11 +0100)
* 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.

src/getargs.c
tests/input.at
tests/local.at

index 0d43186f23c2713573e79368b12044216df0b117..3e196e3105671eacb3ddb99dd0e6fb2917412a24 100644 (file)
@@ -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;
 
index 44a2477010a44b1b3f83b1e0f80c7ad7ddb14d45..f9ed33d2c222abf0f6f677915fdc10baddaa8b02 100644 (file)
@@ -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])
index c2916065e3f364423b18106d49381549a8220f3e..b7d75afcf2ab1637cf3fe19367a69572c0b77b5f 100644 (file)
@@ -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])