bison-patches
[Top][All Lists]
Advanced

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

Re: FYI: Ship and install bison.xsl


From: Joel E. Denny
Subject: Re: FYI: Ship and install bison.xsl
Date: Sat, 15 Dec 2007 15:53:58 -0500 (EST)

On Sun, 18 Nov 2007, Joel E. Denny wrote:

> On Sat, 17 Nov 2007, Joel E. Denny wrote:
> 
> > On Wed, 14 Nov 2007, Akim Demaille wrote:
> > 
> > > It might be time to write some (simple) tests of the XML output.  If I
> > > have some time I will, but...
> > 
> > We might consider adding a maintainer-xml-check similar to 
> > maintainer-push-check.  That is, we might test the XSLT output against the 
> > --report and --graph output for all grammars in the test suite.  Of 
> > course, this would not help with xml2xhtml.xsl, so it would definitely 
> > need its own test cases.
> > 
> > I'm sure we could come up with something in M4 to make this happen.  
> > Unfortunately, the "Big triangle" and "Big horizontal" torture tests never 
> > complete on my system when testing xml2dot.xsl, so we would want to be 
> > able to specify that certain test cases be skipped.
> 
> Using the following patch, here's what I've been doing to test 
> xml2text.xsl and xml2dot.xsl:
> 
>   BISON_TEST_XML=1 ./testsuite 1-156 159-
> 
> M4 seems like a cleaner approach, but maybe we can salvage some of this 
> patch.

Here's an uncommitted patch that implements maintainer-xml-check with a 
new macro named AT_BISON_CHECK.  It also uses AT_BISON_CHECK to replace 
the ugly AT_CHECK rewrite from testsuite.at.

What should we do about xsltproc detection?  Should we just mention 
xsltproc in README-hacking and assume every maintainer will have it in his 
PATH?  Should we check for it in configure.ac using AC_PATH_PROG?  The 
patch below does not do the latter.

Index: ChangeLog
===================================================================
RCS file: /sources/bison/bison/ChangeLog,v
retrieving revision 1.1762
diff -p -u -r1.1762 ChangeLog
--- ChangeLog   15 Dec 2007 02:08:01 -0000      1.1762
+++ ChangeLog   15 Dec 2007 20:35:01 -0000
@@ -1,3 +1,44 @@
+2007-12-15  Joel E. Denny  <address@hidden>
+
+       Automate regression testing of the XML/XSLT implementation.  Discussed
+       starting at
+       <don't-know-since-list-archives-are-not-responding>.
+       * Makefile.am (maintainer-xml-check): New phony target invoking...
+       * tests/Makefile.am (maintainer-xml-check): ... this new phony target
+       invoking make maintainer-check with BISON_TEST_XML=1.
+       * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
+       not to report leaked memory when Bison is expected to have a non-zero
+       exit status and (2) to compare XML/XSLT output with --graph and
+       --report=all output for every working grammar when BISON_TEST_XML=1.
+       (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
+       (AT_BISON_CHECK_XML): New.
+       (AT_QUELL_VALGRIND): New.
+       * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
+       (AT_CHECK): ... don't redefine this since this was the old way to
+       quell Valgrind.
+       * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
+       AT_BISON_CHECK invocations.
+       * tests/c++.at: Likewise.
+       * tests/calc.at: Likewise.
+       * tests/conflicts.at: Likewise.
+       * tests/cxx-type.at: Likewise.
+       * tests/existing.at: Likewise.
+       * tests/glr-regression.at: Likewise.
+       * tests/headers.at: Likewise.
+       * tests/input.at: Likewise.
+       * tests/java.at: Likewise.
+       * tests/output.at: Likewise.
+       * tests/push.at: Likewise.
+       * tests/reduce.at: Likewise.
+       * tests/regression.at: Likewise.
+       * tests/sets.at: Likewise.
+       * tests/skeletons.at: Likewise.
+       * tests/synclines.at: Likewise.
+       * tests/torture.at: Likewise.
+       (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
+       tends to hang xsltproc.
+       (Big horizontal): Likewise.
+
 2007-12-08  Joel E. Denny  <address@hidden>
 
        In XML output, remove redundant class attribute on symbol element.
Index: Makefile.am
===================================================================
RCS file: /sources/bison/bison/Makefile.am,v
retrieving revision 1.48
diff -p -u -r1.48 Makefile.am
--- Makefile.am 15 Aug 2007 20:21:19 -0000      1.48
+++ Makefile.am 15 Dec 2007 20:35:01 -0000
@@ -38,3 +38,7 @@ maintainer-check:
 .PHONY: maintainer-push-check
 maintainer-push-check:
        cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
+
+.PHONY: maintainer-xml-check
+maintainer-xml-check:
+       cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
Index: tests/Makefile.am
===================================================================
RCS file: /sources/bison/bison/tests/Makefile.am,v
retrieving revision 1.48
diff -p -u -r1.48 Makefile.am
--- tests/Makefile.am   15 Aug 2007 20:21:32 -0000      1.48
+++ tests/Makefile.am   15 Dec 2007 20:35:01 -0000
@@ -97,3 +97,7 @@ maintainer-check: maintainer-check-posix
 .PHONY: maintainer-push-check
 maintainer-push-check:
        BISON_USE_PUSH_FOR_PULL=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check
+
+.PHONY: maintainer-xml-check
+maintainer-xml-check:
+       BISON_TEST_XML=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check
Index: tests/actions.at
===================================================================
RCS file: /sources/bison/bison/tests/actions.at,v
retrieving revision 1.81
diff -p -u -r1.81 actions.at
--- tests/actions.at    15 Aug 2007 20:21:32 -0000      1.81
+++ tests/actions.at    15 Dec 2007 20:35:02 -0000
@@ -74,7 +74,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -d -v -o input.c input.y])
+AT_BISON_CHECK([-d -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 0,
 [[0123456789
@@ -152,7 +152,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -d -v -o input.c input.y], 0)
+AT_BISON_CHECK([-d -v -o input.c input.y], 0)
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 0,
 [[15
@@ -368,9 +368,9 @@ main (int argc, const char *argv[])
 ]])
 
 AT_LALR1_CC_IF(
-  [AT_CHECK([bison -o input.cc input.y])
+  [AT_BISON_CHECK([-o input.cc input.y])
    AT_COMPILE_CXX([input])],
-  [AT_CHECK([bison -o input.c input.y])
+  [AT_BISON_CHECK([-o input.c input.y])
    AT_COMPILE([input])])
 
 
@@ -663,7 +663,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 1,
 [[<> destructor for 'd' @ 4.
@@ -788,7 +788,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 1,
 [[<*>/<field2>/e destructor.
@@ -923,7 +923,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input$1.c input$1.y])
+AT_BISON_CHECK([-o input$1.c input$1.y])
 AT_COMPILE([input$1])
 AT_PARSER_CHECK([./input$1], 0,
 [[<]]kind[[> for 'E' @ 1.
@@ -1023,7 +1023,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], [1], [],
 [[Starting parse
@@ -1134,7 +1134,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 
 AT_CLEANUP
@@ -1202,7 +1202,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y], 0,,
+AT_BISON_CHECK([-o input.c input.y], 0,,
 [[input.y:33.3-23: warning: unset value: $$
 input.y:30.3-35.37: warning: unused value: $3
 ]])
@@ -1296,7 +1296,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o input.c input.y]])
+AT_BISON_CHECK([[-o input.c input.y]])
 AT_COMPILE([[input]])
 
 AT_CLEANUP])
Index: tests/c++.at
===================================================================
RCS file: /sources/bison/bison/tests/c++.at,v
retrieving revision 1.5
diff -p -u -r1.5 c++.at
--- tests/c++.at        8 Oct 2007 10:09:07 -0000       1.5
+++ tests/c++.at        15 Dec 2007 20:35:02 -0000
@@ -42,7 +42,7 @@ yy::parser::error (const location& l, co
 }
 ]])
 
-AT_CHECK([bison -o input.cc input.yy], 0)
+AT_BISON_CHECK([-o input.cc input.yy], 0)
 
 AT_DATA([Doxyfile],
 [# The PROJECT_NAME tag is a single word (or a sequence of words
@@ -148,7 +148,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o input.cc input.y]])
+AT_BISON_CHECK([[-o input.cc input.y]])
 
 m4_if([$#], [1],
 [AT_COMPILE_CXX([[input]], [[input.cc]])
Index: tests/calc.at
===================================================================
RCS file: /sources/bison/bison/tests/calc.at,v
retrieving revision 1.109
diff -p -u -r1.109 calc.at
--- tests/calc.at       29 Oct 2007 17:36:39 -0000      1.109
+++ tests/calc.at       15 Dec 2007 20:35:02 -0000
@@ -455,9 +455,9 @@ AT_BISON_OPTION_PUSHDEFS([$1])
 AT_DATA_CALC_Y([$1])
 
 AT_SKEL_CC_IF(
-  [AT_CHECK([bison -o calc.cc calc.y])
+  [AT_BISON_CHECK([-o calc.cc calc.y])
    AT_COMPILE_CXX([calc])],
-  [AT_CHECK([bison -o calc.c calc.y])
+  [AT_BISON_CHECK([-o calc.c calc.y])
    AT_COMPILE([calc])])
 
 # Test the priorities.
Index: tests/conflicts.at
===================================================================
RCS file: /sources/bison/bison/tests/conflicts.at,v
retrieving revision 1.39
diff -p -u -r1.39 conflicts.at
--- tests/conflicts.at  10 Nov 2007 03:42:36 -0000      1.39
+++ tests/conflicts.at  15 Dec 2007 20:35:02 -0000
@@ -36,7 +36,7 @@ exp: e 'e';
 e: 'e' | /* Nothing. */;
 ]])
 
-AT_CHECK([bison -o input.c input.y], 0, [],
+AT_BISON_CHECK([-o input.c input.y], 0, [],
 [[input.y:4.9: warning: rule useless in parser due to conflicts: e: /* empty */
 ]])
 
@@ -94,7 +94,7 @@ main (int argc, const char *argv[])
 ]])
 
 # Specify the output files to avoid problems on different file systems.
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 
 AT_PARSER_CHECK([./input '0<0'])
@@ -132,7 +132,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison -o input.c --report=all input.y], 0, [],
+AT_BISON_CHECK([-o input.c --report=all input.y], 0, [],
 [input.y: conflicts: 1 shift/reduce
 ])
 
@@ -240,7 +240,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison -o input.c --report=all input.y])
+AT_BISON_CHECK([-o input.c --report=all input.y])
 
 # Check the contents of the report.
 AT_CHECK([cat input.output], [],
@@ -362,7 +362,7 @@ id : '0';
 %%
 ]])
 
-AT_CHECK([bison -o input.c --report=all input.y], 0, [],
+AT_BISON_CHECK([-o input.c --report=all input.y], 0, [],
 [[input.y: conflicts: 1 reduce/reduce
 input.y:4.6-8: warning: rule useless in parser due to conflicts: id: '0'
 ]])
@@ -479,7 +479,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison -o input.c input.y], 1, [],
+AT_BISON_CHECK([-o input.c input.y], 1, [],
 [input.y: conflicts: 1 shift/reduce
 input.y: expected 0 shift/reduce conflicts
 ])
@@ -499,7 +499,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_CLEANUP
 
 
@@ -516,7 +516,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison -o input.c input.y], 1, [],
+AT_BISON_CHECK([-o input.c input.y], 1, [],
 [input.y: conflicts: 1 shift/reduce
 input.y: expected 2 shift/reduce conflicts
 ])
@@ -536,7 +536,7 @@ program: a 'a' | a a;
 a: 'a';
 ]])
 
-AT_CHECK([bison -o input.c input.y], 1, [],
+AT_BISON_CHECK([-o input.c input.y], 1, [],
 [input.y: conflicts: 1 reduce/reduce
 input.y: expected 0 reduce/reduce conflicts
 ])
@@ -563,7 +563,7 @@ e:   e '+' e
    ;
 ]])
 
-AT_CHECK([bison -o input.c input.y], 0, [],
+AT_BISON_CHECK([-o input.c input.y], 0, [],
 [[input.y: conflicts: 4 shift/reduce
 ]])
 AT_CLEANUP
@@ -589,7 +589,7 @@ e:   e '+' e %prec '+'
    ;
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_CLEANUP
 
 
@@ -613,7 +613,7 @@ e:   e '+' e
    ;
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_CLEANUP
 
 
@@ -665,7 +665,7 @@ reported_conflicts:
 
 ]])
 
-AT_CHECK([[bison --report=all input.y]], 0, [],
+AT_BISON_CHECK([[--report=all input.y]], 0, [],
 [[input.y: conflicts: 1 shift/reduce, 1 reduce/reduce
 input.y:12.5-20: warning: rule useless in parser due to conflicts: 
resolved_conflict: 'a' unreachable1
 input.y:20.5-20: warning: rule useless in parser due to conflicts: 
unreachable1: 'a' unreachable2
@@ -817,7 +817,7 @@ AT_DATA([[input-keep.y]],
 ]])
 AT_CHECK([[cat input.y >> input-keep.y]])
 
-AT_CHECK([[bison input-keep.y]], 0, [],
+AT_BISON_CHECK([[input-keep.y]], 0, [],
 [[input-keep.y: conflicts: 2 shift/reduce, 2 reduce/reduce
 input-keep.y:22.4: warning: rule useless in parser due to conflicts: 
unreachable1: /* empty */
 input-keep.y:26.16: warning: rule useless in parser due to conflicts: 
unreachable2: /* empty */
@@ -858,7 +858,7 @@ empty_c1: %prec 'c' ;
 empty_c2: %prec 'c' ;
 empty_c3: %prec 'd' ;
 ]])
-AT_CHECK([[bison --report=all -o input.c input.y]], 0, [], [ignore])
+AT_BISON_CHECK([[--report=all -o input.c input.y]], 0, [], [ignore])
 AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 1$/p']], 0,
 [[state 0
 
@@ -934,7 +934,7 @@ empty_c2: %prec 'c' ;
 empty_c3: %prec 'c' ;
 ]])
 
-AT_CHECK([[bison --report=all -o input.c input.y]], 0, [], [ignore])
+AT_BISON_CHECK([[--report=all -o input.c input.y]], 0, [], [ignore])
 AT_CHECK([[cat input.output | sed -n '/^state 0$/,/^state 1$/p']], 0,
 [[state 0
 
Index: tests/cxx-type.at
===================================================================
RCS file: /sources/bison/bison/tests/cxx-type.at,v
retrieving revision 1.36
diff -p -u -r1.36 cxx-type.at
--- tests/cxx-type.at   29 Oct 2007 17:36:39 -0000      1.36
+++ tests/cxx-type.at   15 Dec 2007 20:35:02 -0000
@@ -345,7 +345,7 @@ z + q;
 This is total garbage, but it should be ignored.
 ]])
 
-AT_CHECK([bison -o types.c types.y], 0, [], ignore)
+AT_BISON_CHECK([-o types.c types.y], 0, [], ignore)
 AT_COMPILE([types])
 AT_BISON_OPTION_POPDEFS
 ])
Index: tests/existing.at
===================================================================
RCS file: /sources/bison/bison/tests/existing.at,v
retrieving revision 1.15
diff -p -u -r1.15 existing.at
--- tests/existing.at   15 Dec 2007 02:08:02 -0000      1.15
+++ tests/existing.at   15 Dec 2007 20:35:02 -0000
@@ -351,7 +351,7 @@ comma       : ',' opt_nls
 # Pass plenty of options, to exercise plenty of code, even if we
 # don't actually check the output.  But SEGV is watching us, and
 # so might do dmalloc.
-AT_CHECK([[bison --verbose --defines input.y]])
+AT_BISON_CHECK([[--verbose --defines input.y]])
 
 AT_CLEANUP
 
@@ -953,7 +953,7 @@ ARGUMENT_LIST   :       EXPRESSION
 # Pass plenty of options, to exercise plenty of code, even if we
 # don't actually check the output.  But SEGV is watching us, and
 # so might do dmalloc.
-AT_CHECK([[bison --verbose --defines input.y]], 0, [],
+AT_BISON_CHECK([[--verbose --defines input.y]], 0, [],
 [[input.y: conflicts: 78 shift/reduce, 10 reduce/reduce
 ]])
 
@@ -1518,7 +1518,7 @@ expr:
 # Pass plenty of options, to exercise plenty of code, even if we
 # don't actually check the output.  But SEGV is watching us, and
 # so might do dmalloc.
-AT_CHECK([[bison --verbose --defines input.y]], 0, [],
+AT_BISON_CHECK([[--verbose --defines input.y]], 0, [],
 [[input.y:453.11-48: warning: rule useless in parser due to conflicts: path: 
ORDINAL LAST object_type relative_path
 ]])
 
Index: tests/glr-regression.at
===================================================================
RCS file: /sources/bison/bison/tests/glr-regression.at,v
retrieving revision 1.45
diff -p -u -r1.45 glr-regression.at
--- tests/glr-regression.at     29 Oct 2007 17:36:39 -0000      1.45
+++ tests/glr-regression.at     15 Dec 2007 20:35:03 -0000
@@ -93,7 +93,7 @@ yylex (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr1.c glr-regr1.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr1.c glr-regr1.y]], 0, [],
 [glr-regr1.y: conflicts: 1 shift/reduce
 ])
 AT_COMPILE([glr-regr1])
@@ -211,7 +211,7 @@ main (int argc, char **argv)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr2a.c glr-regr2a.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr2a.c glr-regr2a.y]], 0, [],
 [glr-regr2a.y: conflicts: 2 shift/reduce
 ])
 AT_COMPILE([glr-regr2a])
@@ -325,7 +325,7 @@ int main(int argc, char* argv[]) {
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr3.c glr-regr3.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr3.c glr-regr3.y]], 0, [],
 [glr-regr3.y: conflicts: 1 shift/reduce, 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr3])
@@ -429,7 +429,7 @@ yyerror (char const *msg)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr4.c glr-regr4.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr4.c glr-regr4.y]], 0, [],
 [glr-regr4.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr4])
@@ -502,7 +502,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr5.c glr-regr5.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr5.c glr-regr5.y]], 0, [],
 [glr-regr5.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr5])
@@ -567,7 +567,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr6.c glr-regr6.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr6.c glr-regr6.y]], 0, [],
 [glr-regr6.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr6])
@@ -659,7 +659,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr7.c glr-regr7.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr7.c glr-regr7.y]], 0, [],
 [glr-regr7.y: conflicts: 2 reduce/reduce
 ])
 AT_COMPILE([glr-regr7])
@@ -757,7 +757,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr8.c glr-regr8.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr8.c glr-regr8.y]], 0, [],
 [glr-regr8.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr8])
@@ -840,7 +840,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr9.c glr-regr9.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr9.c glr-regr9.y]], 0, [],
 [glr-regr9.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr9])
@@ -907,7 +907,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr10.c glr-regr10.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr10.c glr-regr10.y]], 0, [],
 [glr-regr10.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr10])
@@ -976,7 +976,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr11.c glr-regr11.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr11.c glr-regr11.y]], 0, [],
 [glr-regr11.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr11])
@@ -1107,7 +1107,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr12.c glr-regr12.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr12.c glr-regr12.y]], 0, [],
 [glr-regr12.y: conflicts: 1 shift/reduce, 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr12])
@@ -1236,7 +1236,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr13.c glr-regr13.y]], 0, [], [])
+AT_BISON_CHECK([[-o glr-regr13.c glr-regr13.y]], 0, [], [])
 AT_COMPILE([glr-regr13])
 
 AT_PARSER_CHECK([[./glr-regr13]], 0,
@@ -1452,7 +1452,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr14.c glr-regr14.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr14.c glr-regr14.y]], 0, [],
 [glr-regr14.y: conflicts: 3 reduce/reduce
 ])
 AT_COMPILE([glr-regr14])
@@ -1556,7 +1556,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr15.c glr-regr15.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr15.c glr-regr15.y]], 0, [],
 [glr-regr15.y: conflicts: 2 reduce/reduce
 ])
 AT_COMPILE([glr-regr15])
@@ -1625,7 +1625,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr16.c glr-regr16.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr16.c glr-regr16.y]], 0, [],
 [glr-regr16.y: conflicts: 1 reduce/reduce
 ])
 AT_COMPILE([glr-regr16])
@@ -1712,7 +1712,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr17.c glr-regr17.y]], 0, [],
+AT_BISON_CHECK([[-o glr-regr17.c glr-regr17.y]], 0, [],
 [glr-regr17.y: conflicts: 3 reduce/reduce
 ])
 AT_COMPILE([glr-regr17])
@@ -1778,7 +1778,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o glr-regr18.c glr-regr18.y]], 1, [],
+AT_BISON_CHECK([[-o glr-regr18.c glr-regr18.y]], 1, [],
 [glr-regr18.y:26.18-24: result type clash on merge function `merge': <type2> 
!= <type1>
 glr-regr18.y:25.18-24: previous declaration
 glr-regr18.y:27.13-19: result type clash on merge function `merge': <type3> != 
<type2>
Index: tests/headers.at
===================================================================
RCS file: /sources/bison/bison/tests/headers.at,v
retrieving revision 1.19
diff -p -u -r1.19 headers.at
--- tests/headers.at    15 Aug 2007 20:21:33 -0000      1.19
+++ tests/headers.at    15 Dec 2007 20:35:03 -0000
@@ -34,7 +34,7 @@ AT_DATA([input.y],
 exp: {};
 ])
 
-AT_CHECK([bison --defines input.y])
+AT_BISON_CHECK([--defines input.y])
 
 AT_CLEANUP
 
@@ -65,7 +65,7 @@ dummy:;
 #include <$1.h>
 ])
 
-AT_CHECK([bison --defines=$1.h --output=y.tab.c $1.y])
+AT_BISON_CHECK([--defines=$1.h --output=y.tab.c $1.y])
 
 AT_COMPILE([y.tab.o], [-I. -c y.tab.c])
 
@@ -109,7 +109,7 @@ my_error (const char *msg)
 exp:;
 ])
 
-AT_CHECK([bison --defines -o input.c input.y])
+AT_BISON_CHECK([--defines -o input.c input.y])
 
 # YYLTYPE should be defined, and MY_LLOC declared.
 AT_DATA([caller.c],
Index: tests/input.at
===================================================================
RCS file: /sources/bison/bison/tests/input.at,v
retrieving revision 1.84
diff -p -u -r1.84 input.at
--- tests/input.at      29 Oct 2007 17:36:39 -0000      1.84
+++ tests/input.at      15 Dec 2007 20:35:03 -0000
@@ -32,7 +32,7 @@ exp: { $$ = $1 ; };
 exp: { @$ = @1 ; };
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:2.13-14: integer out of range: `$1'
 input.y:3.13-14: integer out of range: address@hidden'
 ]])
@@ -57,7 +57,7 @@ exp: foo { $$; } foo { $2; } foo
    ;
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:5.12-13: $$ for the midrule at $2 of `exp' has no declared type
 input.y:5.24-25: $2 of `exp' has no declared type
 input.y:5.6-32: warning: type clash on default action: <bar> != <>
@@ -117,7 +117,7 @@ l: INT | INT { $<integer>$ = $<integer>1
 _AT_UNUSED_VALUES_DECLARATIONS])
 )
 
-AT_CHECK([bison]m4_ifval($2, [ --warnings=midrule-values ])[ input.y], [0], [],
+AT_BISON_CHECK(m4_ifval($2, [ --warnings=midrule-values ])[ input.y], [0], [],
 [[input.y:11.10-32: warning: unset value: $]$[
 input.y:11.10-32: warning: unused value: $]1[
 input.y:11.10-32: warning: unused value: $]3[
@@ -204,7 +204,7 @@ start: ;
 %printer { destroy ($$); } <>;
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:1.13-29: redeclaration for default tagged %destructor
 input.y:1.13-29: previous declaration
 input.y:2.10-26: redeclaration for default tagged %printer
@@ -255,7 +255,7 @@ start: ;
 %printer { destroy ($$); } <field2> <field1>;
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:4.13-29: %destructor redeclaration for <field1>
 input.y:1.13-29: previous declaration
 input.y:4.13-29: %destructor redeclaration for <field1>
@@ -294,7 +294,7 @@ end: { } ;
 tagged: { } ;
 ]])
 
-AT_CHECK([bison input.y], [0], [],
+AT_BISON_CHECK([input.y], [0], [],
 [[input.y:6.8-45: warning: unset value: $$
 input.y:6.8-45: warning: unused value: $2
 input.y:7.6-8: warning: unset value: $$
@@ -311,7 +311,7 @@ end: { } ;
 tagged: { } ;
 ]])
 
-AT_CHECK([bison input.y], [0], [],
+AT_BISON_CHECK([input.y], [0], [],
 [[input.y:6.8-45: warning: unused value: $4
 input.y:8.9-11: warning: unset value: $$
 ]])
@@ -335,7 +335,7 @@ start: end end { $1; } ;
 end: { }  ;
 ]])
 
-AT_CHECK([bison input.y], [0], [],
+AT_BISON_CHECK([input.y], [0], [],
 [[input.y:6.8-22: warning: unset value: $$
 input.y:6.8-22: warning: unused value: $2
 input.y:7.6-8: warning: unset value: $$
@@ -367,7 +367,7 @@ AT_DATA([input.y],
 exp: foo;
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:8.7-11: %type redeclaration for foo
 input.y:3.7-11: previous declaration
 input.y:10.13-17: %destructor redeclaration for foo
@@ -393,7 +393,7 @@ AT_SETUP([Torturing the Scanner])
 
 
 AT_DATA([input.y], [])
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:1.1: syntax error, unexpected end of file
 ]])
 
@@ -401,7 +401,7 @@ AT_CHECK([bison input.y], [1], [],
 AT_DATA([input.y],
 [{}
 ])
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:1.1-2: syntax error, unexpected {...}
 ]])
 
@@ -537,7 +537,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -d -v -o input.c input.y])
+AT_BISON_CHECK([-d -v -o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 AT_COMPILE([main.o], [-c main.c])
 AT_COMPILE([input], [input.o main.o])
@@ -568,7 +568,7 @@ exp: "MY TOKEN";
 %%
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 
 AT_CLEANUP
 
@@ -584,7 +584,7 @@ AT_DATA_GRAMMAR([input.y],
 %%
 empty_file:;
 ]])
-AT_CHECK([bison -o input.c input.y], $2, [], ignore)
+AT_BISON_CHECK([-o input.c input.y], $2, [], ignore)
 AT_CLEANUP
 ])
 
@@ -610,7 +610,7 @@ start: 'a';
 %%
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 
 AT_CLEANUP
 
@@ -648,7 +648,7 @@ start: ;
 %destructor { free ($$)
 ]])
 
-AT_CHECK([bison -o input.c input.y], 1, [],
+AT_BISON_CHECK([-o input.c input.y], 1, [],
 [[input.y:1.10-2.0: missing `"' at end of line
 input.y:4.10-5.0: missing `'' at end of line
 input.y:14.11-15.0: missing `'' at end of line
@@ -676,7 +676,7 @@ start: false_start ;
 %start start;
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 
 AT_CLEANUP
 
@@ -695,7 +695,7 @@ start: PREC %prec PREC ;
 PREC: ;
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:3.1-4: rule given for PREC, which is a token
 ]])
 
@@ -716,7 +716,7 @@ AT_DATA([input-c.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison input-c.y]], [0], [],
+AT_BISON_CHECK([[input-c.y]], [0], [],
 [[input-c.y:1.7: warning: %code qualifier `q' is not used
 input-c.y:2.7-9: warning: %code qualifier `bad' is not used
 input-c.y:3.7-9: warning: %code qualifier `bad' is not used
@@ -730,7 +730,7 @@ AT_DATA([input-c-glr.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison input-c-glr.y]], [0], [],
+AT_BISON_CHECK([[input-c-glr.y]], [0], [],
 [[input-c-glr.y:1.7: warning: %code qualifier `q' is not used
 input-c-glr.y:2.7-9: warning: %code qualifier `bad' is not used
 input-c-glr.y:3.8-10: warning: %code qualifier `bad' is not used
@@ -743,7 +743,7 @@ AT_DATA([input-c++.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison input-c++.y]], [0], [],
+AT_BISON_CHECK([[input-c++.y]], [0], [],
 [[input-c++.y:1.7: warning: %code qualifier `q' is not used
 input-c++.y:2.7-9: warning: %code qualifier `bad' is not used
 input-c++.y:3.8: warning: %code qualifier `q' is not used
@@ -756,7 +756,7 @@ AT_DATA([input-c++-glr.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison input-c++-glr.y]], [0], [],
+AT_BISON_CHECK([[input-c++-glr.y]], [0], [],
 [[input-c++-glr.y:1.7-9: warning: %code qualifier `bad' is not used
 input-c++-glr.y:2.7: warning: %code qualifier `q' is not used
 input-c++-glr.y:3.7: warning: %code qualifier `q' is not used
@@ -769,7 +769,7 @@ AT_DATA([special-char-@@.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison special-char-@@.y]], [0], [],
+AT_BISON_CHECK([[special-char-@@.y]], [0], [],
 [[special-char-@@.y:1.7-9: warning: %code qualifier `bad' is not used
 special-char-@@.y:2.7: warning: %code qualifier `q' is not used
 special-char-@@.y:3.7: warning: %code qualifier `q' is not used
@@ -782,7 +782,7 @@ AT_DATA([special-char-@:>@.y],
 %%
 start: ;
 ]])
-AT_CHECK([[bison special-char-@:>@.y]], [0], [],
+AT_BISON_CHECK([[special-char-@:>@.y]], [0], [],
 [[special-char-@:>@.y:1.7-9: warning: %code qualifier `bad' is not used
 special-char-@:>@.y:2.7: warning: %code qualifier `q' is not used
 special-char-@:>@.y:3.7: warning: %code qualifier `q' is not used
@@ -807,7 +807,7 @@ AT_DATA([input.y],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [0], [],
+AT_BISON_CHECK([[input.y]], [0], [],
 [[input.y:2.9-11: warning: %define variable `var' redefined
 input.y:1.9-11: warning: previous definition
 input.y:3.10-12: warning: %define variable `var' redefined
@@ -835,7 +835,7 @@ AT_DATA([Input.y],
 start: ;
 ]])
 
-AT_CHECK([[bison Input.y]], [1], [],
+AT_BISON_CHECK([[Input.y]], [1], [],
 [[Input.y:2.9-14: invalid value for %define Boolean variable `public'
 ]])
 
@@ -853,7 +853,7 @@ AT_DATA([[input.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [1], [],
+AT_BISON_CHECK([[input.y]], [1], [],
 [[input.y:1.9-21: invalid value for %define variable `api.push_pull': `neither'
 ]])
 
@@ -878,7 +878,7 @@ AT_DATA([[input.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [0], [],
+AT_BISON_CHECK([[input.y]], [0], [],
 [[input.y:1.9-16: warning: %define variable `api.pure' is not used
 ]])
 ])
@@ -911,7 +911,7 @@ AT_DATA([[input.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [1], [],
+AT_BISON_CHECK([[input.y]], [1], [],
 [m4_foreach([b4_arg], m4_dquote(m4_shift($@)),
 [[input.y:3.9-17: ]b4_arg[
 ]])])
Index: tests/java.at
===================================================================
RCS file: /sources/bison/bison/tests/java.at,v
retrieving revision 1.4
diff -p -u -r1.4 java.at
--- tests/java.at       15 Aug 2007 20:21:33 -0000      1.4
+++ tests/java.at       15 Dec 2007 20:35:03 -0000
@@ -288,7 +288,7 @@ AT_DATA_JAVA_CALC_Y([$1
 $2
 }])
 
-AT_CHECK([bison -o Calc.java Calc.y])
+AT_BISON_CHECK([-o Calc.java Calc.y])
 AT_JAVA_COMPILE([Calc.java])
 
 # Test the priorities.
Index: tests/local.at
===================================================================
RCS file: /sources/bison/bison/tests/local.at,v
retrieving revision 1.28
diff -p -u -r1.28 local.at
--- tests/local.at      29 Oct 2007 17:36:39 -0000      1.28
+++ tests/local.at      15 Dec 2007 20:35:03 -0000
@@ -169,6 +169,69 @@ m4_define([AT_DATA_GRAMMAR],
 $2])
 ])
 
+# AT_BISON_CHECK(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+# -------------------------------------------------
+# Check Bison by invoking `bison BISON_ARGS'.  OTHER_AT_CHECK_ARGS are the
+# usual remaining arguments to AT_CHECK: STATUS, STDOUT, etc.
+#
+# This macro or AT_BISON_CHECK_NO_XML should always be used whenever invoking
+# Bison in the test suite.  For now it ensures that:
+#
+#   1. Valgrind doesn't report leaked memory when Bison is expected to have a
+#      non-zero exit status since Bison doesn't try to free all memory in that
+#      case.
+#
+#   2. In the case of maintainer-xml-check, XML/XSLT output is compared with
+#      --graph and --report=all output for every working grammar.
+m4_define([AT_BISON_CHECK],
+[AT_BISON_CHECK_NO_XML($@)
+m4_if(m4_quote($2), [0], [AT_BISON_CHECK_XML($@)],
+      m4_quote($2), [], [AT_BISON_CHECK_XML($@)])])
+
+# AT_BISON_CHECK_NO_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+# --------------------------------------------------------
+# Same as AT_BISON_CHECK except don't perform XML checks.  This is useful 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_if(m4_quote($2), [0], [], m4_quote($2), [], [],
+                [AT_QUELL_VALGRIND ])[[bison ]]$@)])
+
+# AT_BISON_CHECK_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+# -----------------------------------------------------
+# Runs AT_BISON_CHECK's XML tests unconditionally.
+m4_define([AT_BISON_CHECK_XML],
+[[if test x"$BISON_TEST_XML" = x1; then]
+  AT_CHECK([[mkdir xml-tests]])
+  m4_pushdef([AT_BISON_ARGS],
+             [m4_bpatsubsts([[$1]],
+                            [--report(-file)?=[^][ ]*], [],
+                            [--graph=[^][ ]*], [],
+                            [--xml=[^][ ]*], [])])dnl
+  # Don't combine these Bison invocations since we want to be sure that
+  # --report=all isn't required to get the full XML file.
+  AT_CHECK([[bison --report=all --report-file=xml-tests/test.output \
+             --graph=xml-tests/test.dot ]]AT_BISON_ARGS,
+           [[0]], [ignore], [ignore])
+  AT_CHECK([[bison --xml=xml-tests/test.xml ]]AT_BISON_ARGS,
+           [[0]], [ignore], [ignore])
+  m4_popdef([AT_BISON_ARGS])dnl
+  AT_CHECK([[xsltproc \
+             `]]AT_QUELL_VALGRIND[[ bison --print-datadir`/xslt/xml2text.xsl \
+             xml-tests/test.xml > xml-tests/test.xml.output]])
+  AT_CHECK([[diff -u xml-tests/test.output xml-tests/test.xml.output]])
+  AT_CHECK([[xsltproc \
+            `]]AT_QUELL_VALGRIND[[ bison --print-datadir`/xslt/xml2dot.xsl \
+             xml-tests/test.xml > xml-tests/test.xml.dot]])
+  AT_CHECK([[diff -u xml-tests/test.dot xml-tests/test.xml.dot]])
+  AT_CHECK([[rm -rf xml-tests]])
+[fi]])
+
+# AT_QUELL_VALGRIND
+# -----------------
+# Put this before a Bison invocation to keep Valgrind from complaining about
+# leaked memory.
+m4_define([AT_QUELL_VALGRIND],
+[[[VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary --show-reachable=no"; 
export VALGRIND_OPTS;]]])
 
 ## ------------------------ ##
 ## Compiling C, C++ Files.  ##
Index: tests/output.at
===================================================================
RCS file: /sources/bison/bison/tests/output.at,v
retrieving revision 1.18
diff -p -u -r1.18 output.at
--- tests/output.at     15 Aug 2007 20:21:33 -0000      1.18
+++ tests/output.at     15 Dec 2007 20:35:03 -0000
@@ -32,7 +32,7 @@ AT_DATA([$1],
 foo: {};
 ]])
 
-AT_CHECK([bison $3 $1 $5], 0)
+AT_BISON_CHECK([$3 $1 $5], 0)
 AT_CHECK([ls $4], [], [ignore])
 $6
 AT_CLEANUP
@@ -130,7 +130,7 @@ AT_DATA([$1],
 foo: {};
 ]])
 
-AT_CHECK([bison $3 $1], 0, [], [$4])
+AT_BISON_CHECK([$3 $1], 0, [], [$4])
 AT_CLEANUP
 ])
 
@@ -164,7 +164,7 @@ AT_DATA_GRAMMAR([glr.y],
 %%
 start: {};
 ]])
-AT_CHECK([bison -o "AS_ESCAPE([$1.c])" --defines="AS_ESCAPE([$1.h])" glr.y])
+AT_BISON_CHECK([-o "AS_ESCAPE([$1.c])" --defines="AS_ESCAPE([$1.h])" glr.y])
 AT_CHECK([ls "AS_ESCAPE([$1.c])" "AS_ESCAPE([$1.h])"], [], [ignore])
 AT_COMPILE([glr.o], [-c "AS_ESCAPE([$1.c])"])
 $2
@@ -175,7 +175,7 @@ AT_DATA_GRAMMAR([cxx.y],
 %%
 start: {};
 ]])
-AT_CHECK([bison -o "AS_ESCAPE([$1.c])" --defines="AS_ESCAPE([$1.h])" cxx.y])
+AT_BISON_CHECK([-o "AS_ESCAPE([$1.c])" --defines="AS_ESCAPE([$1.h])" cxx.y])
 AT_CHECK([ls "AS_ESCAPE([$1.c])" "AS_ESCAPE([$1.h])"], [], [ignore])
 AT_COMPILE_CXX([cxx.o], [-c "AS_ESCAPE([$1.c])"])
 $2
Index: tests/push.at
===================================================================
RCS file: /sources/bison/bison/tests/push.at,v
retrieving revision 1.7
diff -p -u -r1.7 push.at
--- tests/push.at       29 Oct 2007 17:36:40 -0000      1.7
+++ tests/push.at       15 Dec 2007 20:35:03 -0000
@@ -71,7 +71,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o input.c input.y]])
+AT_BISON_CHECK([[-o input.c input.y]])
 AT_COMPILE([[input]])
 AT_PARSER_CHECK([[./input]])
 
@@ -135,7 +135,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([[bison -o input.c input.y]])
+AT_BISON_CHECK([[-o input.c input.y]])
 AT_COMPILE([[input]])
 AT_PARSER_CHECK([[./input]], 0, [],
 [[cannot allocate multiple impure push-parser instances
@@ -163,7 +163,7 @@ AT_DATA([[input.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [0], [],
+AT_BISON_CHECK([[input.y]], [0], [],
 [[input.y:2.9-21: warning: %define variable `api.push_pull' is not used
 ]])
 
Index: tests/reduce.at
===================================================================
RCS file: /sources/bison/bison/tests/reduce.at,v
retrieving revision 1.18
diff -p -u -r1.18 reduce.at
--- tests/reduce.at     24 Nov 2007 19:41:25 -0000      1.18
+++ tests/reduce.at     15 Dec 2007 20:35:03 -0000
@@ -42,7 +42,7 @@ AT_DATA([[input.y]],
 exp: useful;
 ]])
 
-AT_CHECK([[bison input.y]])
+AT_BISON_CHECK([[input.y]])
 
 AT_CHECK([[sed -n '/^Grammar/q;/^$/!p' input.output]], 0,
 [[Terminals unused in grammar
@@ -86,7 +86,7 @@ AT_DATA([[input.y]],
 exp: useful;
 ]])
 
-AT_CHECK([[bison input.y]], 0, [],
+AT_BISON_CHECK([[input.y]], 0, [],
 [[input.y: warning: 9 nonterminals useless in grammar
 input.y:4.8-15: warning: nonterminal useless in grammar: useless1
 input.y:5.8-15: warning: nonterminal useless in grammar: useless2
@@ -141,7 +141,7 @@ useless8: '8';
 useless9: '9';
 ]])
 
-AT_CHECK([[bison input.y]], 0, [],
+AT_BISON_CHECK([[input.y]], 0, [],
 [[input.y: warning: 9 nonterminals and 9 rules useless in grammar
 input.y:6.1-8: warning: nonterminal useless in grammar: useless1
 input.y:7.1-8: warning: nonterminal useless in grammar: useless2
@@ -236,7 +236,7 @@ non_productive: non_productive useless_t
 %%
 ]])
 
-AT_CHECK([[bison not-reduced.y]], 0, [],
+AT_BISON_CHECK([[not-reduced.y]], 0, [],
 [[not-reduced.y: warning: 2 nonterminals and 3 rules useless in grammar
 not-reduced.y:14.1-13: warning: nonterminal useless in grammar: not_reachable
 not-reduced.y:11.6-19: warning: nonterminal useless in grammar: non_productive
@@ -282,7 +282,7 @@ exp: useful            { /* A useful act
 %%
 ]])
 
-AT_CHECK([[bison reduced.y]])
+AT_BISON_CHECK([[reduced.y]])
 
 # Comparing the parsers.
 cp reduced.c expout
@@ -310,7 +310,7 @@ underivable: indirection;
 indirection: underivable;
 ]])
 
-AT_CHECK([[bison input.y]], 0, [],
+AT_BISON_CHECK([[input.y]], 0, [],
 [[input.y: warning: 2 nonterminals and 3 rules useless in grammar
 input.y:5.15-25: warning: nonterminal useless in grammar: underivable
 input.y:6.14-24: warning: nonterminal useless in grammar: indirection
@@ -345,7 +345,7 @@ AT_DATA([[input.y]],
 exp: exp;
 ]])
 
-AT_CHECK([[bison input.y]], 1, [],
+AT_BISON_CHECK([[input.y]], 1, [],
 [[input.y: warning: 2 nonterminals and 2 rules useless in grammar
 input.y:3.1-3: fatal error: start symbol exp does not derive any sentence
 ]])
Index: tests/regression.at
===================================================================
RCS file: /sources/bison/bison/tests/regression.at,v
retrieving revision 1.116
diff -p -u -r1.116 regression.at
--- tests/regression.at 19 Oct 2007 02:46:21 -0000      1.116
+++ tests/regression.at 15 Dec 2007 20:35:03 -0000
@@ -39,7 +39,7 @@ int yylex (void);
 program: 'x';
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 AT_COMPILE([input.o], [-DYYDEBUG -c input.c])
 
@@ -67,7 +67,7 @@ typedef union { char const *val; } YYSTY
 program: { $$ = ""; };
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 
 AT_CLEANUP
@@ -105,7 +105,7 @@ exp: MY_TOKEN;
 %%
 ]])
 
-AT_CHECK([bison -y -o input.c input.y])
+AT_BISON_CHECK([-y -o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 
 AT_CLEANUP
@@ -148,7 +148,7 @@ exp: MY_TOKEN;
 %%
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 
 AT_CLEANUP
@@ -170,7 +170,7 @@ exp: { tests = {{{{{{{{{{}}}}}}}}}}; };
 %%
 ]])
 
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK([-v -o input.c input.y])
 
 AT_CHECK([grep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
 
@@ -197,7 +197,7 @@ exp: '(' exp ')' | NUM ;
 %%
 ]])
 
-AT_CHECK([bison -v -o input.c input.y], 0, [],
+AT_BISON_CHECK([-v -o input.c input.y], 0, [],
 [[input.y:6.8-14: warning: symbol `"<="' used more than once as a literal 
string
 ]])
 
@@ -242,7 +242,7 @@ expr:
 };
 ]])
 
-AT_CHECK([bison -o input.c -v input.y])
+AT_BISON_CHECK([-o input.c -v input.y])
 
 # Check the contents of the report.
 AT_CHECK([cat input.output], [],
@@ -364,7 +364,7 @@ exp: ;
 %%
 ]])
 
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK([-v -o input.c input.y])
 
 AT_CLEANUP
 
@@ -387,7 +387,7 @@ default: 'a' }
 %{
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:2.1: invalid character: `?'
 input.y:3.14: invalid character: `}'
 input.y:4.1: invalid character: `%'
@@ -414,7 +414,7 @@ AT_DATA([input.y],
 %union
 ]])
 
-AT_CHECK([bison input.y], [1], [],
+AT_BISON_CHECK([input.y], [1], [],
 [[input.y:3.1-15: syntax error, unexpected %initial-action, expecting {...}
 ]])
 
@@ -469,7 +469,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 AT_DATA([experr],
 [[syntax error, unexpected "\\'?\"\a\b\f\n\r\t\v\001\201\001\201?\?!", 
expecting a
@@ -500,7 +500,7 @@ exp:
 ]])
 # Pacify font-lock-mode: "
 
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 AT_CLEANUP
 
@@ -540,7 +540,7 @@ CONST_DEC:
 %%
 ]])
 
-AT_CHECK([bison -v input.y])
+AT_BISON_CHECK([-v input.y])
 AT_CHECK([cat input.output], 0,
 [[Grammar
 
@@ -705,7 +705,7 @@ else: "else" statement;
 %%
 ]])
 
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK([-v -o input.c input.y])
 
 # Check only the tables.
 [sed -n 's/  *$//;/^static const.*\[\] =/,/^}/p' input.c >tables.c]
@@ -925,11 +925,11 @@ m4_define([AT_CHECK_DANCER],
 [AT_SETUP([Dancer $1])
 AT_BISON_OPTION_PUSHDEFS([$1])
 _AT_DATA_DANCER_Y([$1])
-AT_CHECK([bison -o dancer.c dancer.y])
+AT_BISON_CHECK([-o dancer.c dancer.y])
 AT_LALR1_CC_IF(
-  [AT_CHECK([bison -o dancer.cc dancer.y])
+  [AT_BISON_CHECK([-o dancer.cc dancer.y])
    AT_COMPILE_CXX([dancer])],
-  [AT_CHECK([bison -o dancer.c dancer.y])
+  [AT_BISON_CHECK([-o dancer.c dancer.y])
    AT_COMPILE([dancer])])
 AT_PARSER_CHECK([./dancer], 1, [],
 [syntax error, unexpected ':'
@@ -1025,11 +1025,11 @@ m4_define([AT_CHECK_EXPECT2],
 [AT_SETUP([Expecting two tokens $1])
 AT_BISON_OPTION_PUSHDEFS([$1])
 _AT_DATA_EXPECT2_Y([$1])
-AT_CHECK([bison -o expect2.c expect2.y])
+AT_BISON_CHECK([-o expect2.c expect2.y])
 AT_LALR1_CC_IF(
-  [AT_CHECK([bison -o expect2.cc expect2.y])
+  [AT_BISON_CHECK([-o expect2.cc expect2.y])
    AT_COMPILE_CXX([expect2])],
-  [AT_CHECK([bison -o expect2.c expect2.y])
+  [AT_BISON_CHECK([-o expect2.c expect2.y])
    AT_COMPILE([expect2])])
 AT_PARSER_CHECK([./expect2], 1, [],
 [syntax error, unexpected '+', expecting A or B
@@ -1096,7 +1096,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison -t -o input.c input.y])
+AT_BISON_CHECK([-t -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 0,
 [[Bison would once convert this action to a midrule because of the subsequent 
braced code.
@@ -1137,7 +1137,7 @@ start: 'a' "A" 'b';
 %token 'a' "A";
 ]])
 
-AT_CHECK([bison -t -o input.c input.y])
+AT_BISON_CHECK([-t -o input.c input.y])
 
 AT_CLEANUP
 
@@ -1162,7 +1162,7 @@ start: a | 'a' a 'a' ;
 a: 'a' ;
 ]])
 
-AT_CHECK([[bison --report=all input.y]])
+AT_BISON_CHECK([[--report=all input.y]])
 AT_CHECK([[sed -n '/^state 1$/,/^state 2$/p' input.output]], [[0]],
 [[state 1
 
Index: tests/sets.at
===================================================================
RCS file: /sources/bison/bison/tests/sets.at,v
retrieving revision 1.24
diff -p -u -r1.24 sets.at
--- tests/sets.at       15 Aug 2007 20:21:33 -0000      1.24
+++ tests/sets.at       15 Dec 2007 20:35:03 -0000
@@ -76,7 +76,7 @@ AT_DATA([[input.y]],
 e: 'e' | /* Nothing */;
 ]])
 
-AT_CHECK([[bison --trace=sets input.y]], [], [], [stderr])
+AT_BISON_CHECK([[--trace=sets input.y]], [], [], [stderr])
 AT_EXTRACT_SETS([stderr], [sets])
 AT_CHECK([[cat sets]], [],
 [[DERIVES
@@ -160,7 +160,7 @@ g: h;
 h: 'h';
 ]])
 
-AT_CHECK([[bison --trace=sets input.y]], [], [], [stderr])
+AT_BISON_CHECK([[--trace=sets input.y]], [], [], [stderr])
 
 AT_CHECK([[sed -n 's/[  ]*$//;/^RTC: Firsts Output BEGIN/,/^RTC: Firsts Output 
END/p' stderr]], [],
 [[RTC: Firsts Output BEGIN
@@ -206,7 +206,7 @@ exp:
  ;
 ]])
 
-AT_CHECK([[bison --trace=sets input.y]], [], [], [stderr])
+AT_BISON_CHECK([[--trace=sets input.y]], [], [], [stderr])
 AT_EXTRACT_SETS([stderr], [sets])
 AT_CHECK([[cat sets]], [],
 [[DERIVES
@@ -276,7 +276,7 @@ input:
 ;
 ]])
 
-AT_CHECK([[bison -v -o input.c input.y]])
+AT_BISON_CHECK([[-v -o input.c input.y]])
 
 # Get the final state in the parser.
 AT_CHECK([[sed -n 's/.*define YYFINAL *\([0-9][0-9]*\)/final state \1/p' 
input.c]],
Index: tests/skeletons.at
===================================================================
RCS file: /sources/bison/bison/tests/skeletons.at,v
retrieving revision 1.9
diff -p -u -r1.9 skeletons.at
--- tests/skeletons.at  8 Oct 2007 04:00:13 -0000       1.9
+++ tests/skeletons.at  15 Dec 2007 20:35:03 -0000
@@ -58,17 +58,17 @@ AT_DATA([[tmp/input-cmd-line.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison tmp/input-gram.y]])
+AT_BISON_CHECK([[tmp/input-gram.y]])
 AT_CHECK([[cat input-gram.tab.c]], [[0]],
 [[Hello World
 ]])
 
-AT_CHECK([[bison input-gram.y]])
+AT_BISON_CHECK([[input-gram.y]])
 AT_CHECK([[cat input-gram.tab.c]], [[0]],
 [[Hello World -- Local
 ]])
 
-AT_CHECK([[bison --skeleton=tmp/skel.c tmp/input-cmd-line.y]])
+AT_BISON_CHECK([[--skeleton=tmp/skel.c tmp/input-cmd-line.y]])
 AT_CHECK([[cat input-cmd-line.tab.c]], [[0]],
 [[Hello World
 ]])
@@ -124,13 +124,13 @@ AT_DATA([[input-gram.y]],
 [[%skeleton "yacc.c"]
 AT_GRAM])
 
-AT_CHECK([[bison --skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y]])
+AT_BISON_CHECK([[--skeleton=yacc.c -o input-cmd-line.c input-cmd-line.y]])
 AT_COMPILE([[input-cmd-line]])
 AT_PARSER_CHECK([[./input-cmd-line]], [[1]], [],
 [[syntax error, unexpected 'a', expecting $end
 ]])
 
-AT_CHECK([[bison -o input-gram.c input-gram.y]])
+AT_BISON_CHECK([[-o input-gram.c input-gram.y]])
 AT_COMPILE([[input-gram]])
 AT_PARSER_CHECK([[./input-gram]], [[1]], [],
 [[syntax error, unexpected 'a', expecting $end
@@ -158,7 +158,7 @@ AT_DATA([[input.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input.y]], [[1]], [[]],
+AT_BISON_CHECK([[input.y]], [[1]], [[]],
 [[[Bison:b4_percent_define_default]:1.0: invalid value for %define Boolean 
variable `foo'
 ]])
 
@@ -192,7 +192,7 @@ AT_DATA([[input1.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input1.y]], [[1]], [[]],
+AT_BISON_CHECK([[input1.y]], [[1]], [[]],
 [[input1.y: warning: foow fubar
 foow.y:2.3-5.3: warning: foowat fubar
 input1.y: fooc fubar
@@ -212,7 +212,7 @@ AT_DATA([[input2.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input2.y]], [[1]], [[]],
+AT_BISON_CHECK([[input2.y]], [[1]], [[]],
 [[foof.y:12.11-100.122: fatal error: foofat fubar
 ]])
 
@@ -226,7 +226,7 @@ AT_DATA([[input3.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input3.y]], [[1]], [[]],
+AT_BISON_CHECK([[input3.y]], [[1]], [[]],
 [[input3.y: fatal error: undefined %define variable `bogus' passed to 
b4_percent_define_get_loc
 ]])
 
@@ -240,7 +240,7 @@ AT_DATA([[input4.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input4.y]], [[1]], [[]],
+AT_BISON_CHECK([[input4.y]], [[1]], [[]],
 [[input4.y: fatal error: undefined %define variable `bogus' passed to 
b4_percent_define_get_syncline
 ]])
 
@@ -265,7 +265,7 @@ AT_DATA([[input1.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input1.y]], [[1]], [[]],
+AT_BISON_CHECK([[input1.y]], [[1]], [[]],
 [[input1.y: non-fatal error
 input1.y: fatal error: M4 should exit immediately here
 ]])
@@ -282,7 +282,7 @@ AT_DATA([[input2.y]],
 start: ;
 ]])
 
-AT_CHECK([[bison input2.y]], [[1]], [[]],
+AT_BISON_CHECK([[input2.y]], [[1]], [[]],
 [[input2.y: warning: morning
 foo.y:1.5-6: fatal error: M4 should exit immediately here
 ]])
Index: tests/synclines.at
===================================================================
RCS file: /sources/bison/bison/tests/synclines.at,v
retrieving revision 1.13
diff -p -u -r1.13 synclines.at
--- tests/synclines.at  15 Aug 2007 20:21:33 -0000      1.13
+++ tests/synclines.at  15 Dec 2007 20:35:03 -0000
@@ -68,7 +68,7 @@ AT_SYNCLINES_COMPILE([syncline.c])
 AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
 
 AT_DATA([[input.y]], [$2])
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_SYNCLINES_COMPILE([input.c])
 AT_CHECK([cat stdout], 0, [$3])
 AT_CLEANUP
Index: tests/testsuite.at
===================================================================
RCS file: /sources/bison/bison/tests/testsuite.at,v
retrieving revision 1.36
diff -p -u -r1.36 testsuite.at
--- tests/testsuite.at  15 Aug 2007 20:21:33 -0000      1.36
+++ tests/testsuite.at  15 Dec 2007 20:35:03 -0000
@@ -17,15 +17,6 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-# Bison often leaks memory when its exit status is non-zero, so set
-# --leak-check=summary for Valgrind in that case.
-m4_pushdef([ORIGINAL_AT_CHECK], m4_defn([AT_CHECK]))
-m4_pushdef([AT_CHECK],
-[ORIGINAL_AT_CHECK(
-   m4_if(m4_index(m4_quote($1), [bison ]), 0,
-        m4_if(m4_quote($2), [0], [], m4_quote($2), [], [],
-              [[VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=summary 
--show-reachable=no"; export VALGRIND_OPTS; ]]))$@)])
-
 # Testing resistance to user bugs.
 m4_include([input.at])
 
@@ -80,6 +71,3 @@ m4_include([glr-regression.at])
 
 # Push parsing specific tests.
 m4_include([push.at])
-
-m4_popdef([AT_CHECK])
-m4_popdef([ORIGINAL_AT_CHECK])
Index: tests/torture.at
===================================================================
RCS file: /sources/bison/bison/tests/torture.at,v
retrieving revision 1.41
diff -p -u -r1.41 torture.at
--- tests/torture.at    28 Oct 2007 20:11:35 -0000      1.41
+++ tests/torture.at    15 Dec 2007 20:35:03 -0000
@@ -143,7 +143,7 @@ AT_SETUP([Big triangle])
 # With 500 and the new parser, which consume far too much memory,
 # it gets killed too.  Of course the parser is to be cleaned.
 AT_DATA_TRIANGULAR_GRAMMAR([input.y], [200])
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK_NO_XML([-v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -249,7 +249,7 @@ AT_DATA_HORIZONTAL_GRAMMAR([input.y], [1
 # Ask for 200 MiB, which should be plenty even on a 64-bit host.
 AT_INCREASE_DATA_SIZE(204000)
 
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK_NO_XML([-v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -377,7 +377,7 @@ AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR([input.
 # Ask for 200 MiB, which should be plenty even on a 64-bit host.
 AT_INCREASE_DATA_SIZE(204000)
 
-AT_CHECK([bison -v -o input.c input.y])
+AT_BISON_CHECK([-v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -461,7 +461,7 @@ main (int argc, const char **argv)
   }
 }
 ]])
-AT_CHECK([bison -o input.c input.y])
+AT_BISON_CHECK([-o input.c input.y])
 AT_COMPILE([input])
 ])
 




reply via email to

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