]> git.saurik.com Git - bison.git/commitdiff
maint: fix syntax-check issues
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 28 Jan 2013 16:17:12 +0000 (17:17 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 28 Jan 2013 16:46:13 +0000 (17:46 +0100)
* cfg.mk: Ignore strcmp in local.at.
* tests/conflicts.at: Use AT_PARSER_CHECK.
* tests/regression.at: Preserve the exit status of the generated parsers.

* tests/local.mk ($(TESTSUITE)): Map @tb@ to a tabulation.
* tests/c++.at, tests/input.at, tests/regression.at: Use @tb@.
* cfg.mk: (space-tab): There are no longer exceptions.

cfg.mk
tests/c++.at
tests/conflicts.at
tests/input.at
tests/local.mk
tests/regression.at

diff --git a/cfg.mk b/cfg.mk
index a79566d3fda8f11879cc1d98fe2a7f303c49c601..7fbad01b3e9f33f23ced316c1a3cca3c8cc08930 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -172,9 +172,8 @@ $(call exclude,                                                             \
   prohibit_doubled_word=^tests/named-refs.at$$                          \
   prohibit_magic_number_exit=^doc/bison.texi$$                         \
   prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$     \
-  prohibit_strcmp=^doc/bison\.texi$$                                   \
+  prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$                   \
   prohibit_tab_based_indentation=\.(am|mk)$$|^djgpp/|^\.git            \
   require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$           \
-  space_tab=^tests/(input|c\+\+)\.at$$                                 \
   unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$)    \
 )
index b72954a2332dca43726c780e850188adf093daf1..874d64005b363ba780e5c854cc94252dc3b9b818 100644 (file)
@@ -395,6 +395,7 @@ void
 ]AT_MAIN_DEFINE[
 ]])
 
+
 AT_BISON_CHECK([[-o input.cc input.y]])
 
 m4_if([$#], [1],
@@ -413,8 +414,8 @@ AT_SETUP([[Absolute namespace references]])
 AT_TEST([[::foo]])
 AT_TEST([[::foo::bar]])
 AT_TEST([[::foo::bar::baz]])
-AT_TEST([[     ::foo]])
-AT_TEST([[      ::foo::bar]])
+AT_TEST([[@tb@::foo]])
+AT_TEST([[  @tb@ ::foo::bar]])
 AT_TEST([[  ::foo::bar::baz]])
 AT_CLEANUP
 
index 7828cdf0d8e2253ad09941587d4c78c79295bbff..8633d8d42cce3c5cdbdd0cafb6f05791dc9f91a2 100644 (file)
@@ -80,7 +80,7 @@ int main (void)
 
 AT_FULL_COMPILE([input])
 
-AT_CHECK([./input])
+AT_PARSER_CHECK([./input])
 
 AT_BISON_OPTION_POPDEFS
 
index 8184b03e6cb609df3a0a2651dbb8875168ebfc74..4d7308c107d6b86331b3b0dd054eea5d6e7f6d45 100644 (file)
@@ -1513,22 +1513,22 @@ AT_BISON_CHECK([[input.y]], [1], [],
 
 AT_CHECK_NAMESPACE_ERROR([[]],
                          [[namespace reference is empty]])
-AT_CHECK_NAMESPACE_ERROR([[                            ]],
+AT_CHECK_NAMESPACE_ERROR([[ @tb@@tb@  @tb@ @tb@]],
                          [[namespace reference is empty]])
 AT_CHECK_NAMESPACE_ERROR([[foo::::bar]],
                          [[namespace reference has consecutive "::"]])
-AT_CHECK_NAMESPACE_ERROR([[foo::       ::bar]],
+AT_CHECK_NAMESPACE_ERROR([[foo:: @tb@::bar]],
                          [[namespace reference has consecutive "::"]])
 AT_CHECK_NAMESPACE_ERROR([[::::bar]],
                          [[namespace reference has consecutive "::"]])
 AT_CHECK_NAMESPACE_ERROR([[:: ::bar]],
                          [[namespace reference has consecutive "::"]])
-AT_CHECK_NAMESPACE_ERROR([[foo::bar::  ::]],
+AT_CHECK_NAMESPACE_ERROR([[foo::bar::@tb@::]],
                          [[namespace reference has consecutive "::"]],
                          [[namespace reference has a trailing "::"]])
 AT_CHECK_NAMESPACE_ERROR([[foo::bar::]],
                          [[namespace reference has a trailing "::"]])
-AT_CHECK_NAMESPACE_ERROR([[foo::bar::  ]],
+AT_CHECK_NAMESPACE_ERROR([[foo::bar:: @tb@]],
                          [[namespace reference has a trailing "::"]])
 AT_CHECK_NAMESPACE_ERROR([[::]],
                          [[namespace reference has a trailing "::"]])
index ede62aa71a366768855b1a93f4519481a15c47e7..7bc8b78996d77a67e5ce052b14b6b496cbb76515 100644 (file)
@@ -72,6 +72,7 @@ AUTOTESTFLAGS = -I $(top_srcdir)/tests
 $(TESTSUITE): $(TESTSUITE_AT)
        $(AM_V_GEN) \
          $(AUTOTEST) $(AUTOTESTFLAGS) $(srcdir)/tests/testsuite.at -o $@.tmp
+       $(AM_V_at)$(PERL) -pi -e 's/\@tb\@/\t/g' $@.tmp
        $(AM_V_at)mv $@.tmp $@
 
 
index 418faf056a1b2a30e00f3b3c60292124337956af..02840bb3e95ae01ab9d8e05bc1186e948b644c17 100644 (file)
@@ -1545,7 +1545,7 @@ AT_DATA_GRAMMAR([input.y],
 %parse-param { int x }
 // Spaces, tabs, and new lines.
 %parse-param { @&t@
-        int y   @&t@
+@tb@ int y@tb@ @&t@
          @&t@
  @&t@
 }
@@ -1573,7 +1573,7 @@ yyparse (int x, int y)
 int
 main (void)
 {
-  return !!yyparse(1, 2);
+  return yyparse(1, 2);
 }
 ]])