bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] carets: activate by default


From: Theophile Ranquet
Subject: [PATCH 1/3] carets: activate by default
Date: Fri, 11 Jan 2013 13:59:42 +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  |  2 +-
 tests/input.at | 16 ++++++++--------
 tests/local.at |  4 ++--
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/getargs.c b/src/getargs.c
index 0d43186..3e196e3 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 44a2477..f9ed33d 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
-<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])
diff --git a/tests/local.at b/tests/local.at
index c291606..b7d75af 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])
-- 
1.8.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]