bison-patches
[Top][All Lists]
Advanced

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

Bison "make check" patches for POSIXLY_CORRECT


From: Paul Eggert
Subject: Bison "make check" patches for POSIXLY_CORRECT
Date: Mon, 14 Oct 2002 01:46:30 -0700 (PDT)

I installed the following patches to fix test failures encountered
when POSIXLY_CORRECT is set, and to fix the documentation to recommend
POSIXLY_CORRECT-safe invocations.

2002-10-14  Paul Eggert  <address@hidden>

        * tests/action.at, tests/calc.at, tests/conflicts.at,
        tests/cxx-type.at, tests/headers.at, tests/input.at,
        tests/regression.at, tests/synclines.at, tests/torture.at:
        Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
        so that the tests still work even if POSIXLY_CORRECT is set.
        * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.

Index: doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.71
diff -p -u -r1.71 bison.texinfo
--- doc/bison.texinfo   11 Oct 2002 21:19:27 -0000      1.71
+++ doc/bison.texinfo   14 Oct 2002 08:41:00 -0000
@@ -1403,7 +1403,7 @@ rpcalc.tab.c  rpcalc.y
 @group
 # @r{Compile the Bison parser.}
 # @address@hidden tells compiler to search math library for @code{pow}.}
-$ @kbd{cc rpcalc.tab.c -lm -o rpcalc}
+$ @kbd{cc -lm -o rpcalc rpcalc.tab.c}
 @end group
 
 @group
@@ -5812,7 +5812,7 @@ bison -d @var{infile.yxx}
 will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}, and
 
 @example
-bison -d @var{infile.y} -o @var{output.c++}
+bison -d -o @var{output.c++} @var{infile.y}
 @end example
 @noindent
 will produce @file{output.c++} and @file{outfile.h++}.
Index: tests/actions.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/actions.at,v
retrieving revision 1.15
diff -p -u -r1.15 actions.at
--- tests/actions.at    13 Oct 2002 08:39:31 -0000      1.15
+++ tests/actions.at    14 Oct 2002 08:41:00 -0000
@@ -72,7 +72,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y -d -v -o input.c])
+AT_CHECK([bison -d -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 0,
 [[0123456789
@@ -143,7 +143,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y -d -v -o input.c])
+AT_CHECK([bison -d -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 0,
 [[15
@@ -295,7 +295,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y --location -d -v -o input.c])
+AT_CHECK([bison --location -d -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input], 1,
 [[sending: 'x' (value = 0, line 0)
Index: tests/calc.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/calc.at,v
retrieving revision 1.30
diff -p -u -r1.30 calc.at
--- tests/calc.at       13 Oct 2002 14:25:14 -0000      1.30
+++ tests/calc.at       14 Oct 2002 08:41:00 -0000
@@ -375,7 +375,7 @@ AT_SETUP([Calculator $1])
 AT_DATA_CALC_Y([$1])
 
 # Specify the output files to avoid problems on different file systems.
-AT_CHECK([bison calc.y -o calc.c m4_bpatsubst([$1], [%[^ ]*])],
+AT_CHECK([bison -o calc.c m4_bpatsubst([$1], [%[^ ]*]) calc.y],
          [0], [], [])
 
 AT_COMPILE([calc])
Index: tests/conflicts.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/conflicts.at,v
retrieving revision 1.17
diff -p -u -r1.17 conflicts.at
--- tests/conflicts.at  13 Oct 2002 19:35:59 -0000      1.17
+++ tests/conflicts.at  14 Oct 2002 08:41:00 -0000
@@ -37,7 +37,7 @@ exp: e 'e';
 e: 'e' | /* Nothing. */;
 ]])
 
-AT_CHECK([bison input.y -o input.c], 0, [],
+AT_CHECK([bison -o input.c input.y], 0, [],
 [[input.y:4.8: warning: rule never reduced because of conflicts: e: /* empty */
 ]])
 
@@ -103,7 +103,7 @@ main (int argc, const char *argv[])
 ]])
 
 # Specify the output files to avoid problems on different file systems.
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_COMPILE([input])
 
 AT_PARSER_CHECK([./input '0<0'])
@@ -141,7 +141,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison input.y -o input.c --report=all], 0, [],
+AT_CHECK([bison -o input.c --report=all input.y], 0, [],
 [input.y: warning: 1 shift/reduce conflict
 ])
 
@@ -249,7 +249,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison input.y -o input.c --report=all])
+AT_CHECK([bison -o input.c --report=all input.y])
 
 # Check the contents of the report.
 AT_CHECK([cat input.output], [],
@@ -371,7 +371,7 @@ id : '0';
 %%
 ]])
 
-AT_CHECK([bison input.y -o input.c --report=all], 0, [],
+AT_CHECK([bison -o input.c --report=all input.y], 0, [],
 [[input.y: warning: 1 reduce/reduce conflict
 input.y:4.4-8: warning: rule never reduced because of conflicts: id: '0'
 ]])
@@ -488,7 +488,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison input.y -o input.c], 1, [],
+AT_CHECK([bison -o input.c input.y], 1, [],
 [input.y: warning: 1 shift/reduce conflict
 input.y: expected 0 shift/reduce conflicts
 ])
@@ -508,7 +508,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_CLEANUP
 
 
@@ -525,7 +525,7 @@ AT_DATA([input.y],
 exp: exp OP exp | NUM;
 ]])
 
-AT_CHECK([bison input.y -o input.c], 1, [],
+AT_CHECK([bison -o input.c input.y], 1, [],
 [input.y: warning: 1 shift/reduce conflict
 input.y: expected 2 shift/reduce conflicts
 ])
Index: tests/cxx-type.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/cxx-type.at,v
retrieving revision 1.4
diff -p -u -r1.4 cxx-type.at
--- tests/cxx-type.at   30 Sep 2002 12:27:31 -0000      1.4
+++ tests/cxx-type.at   14 Oct 2002 08:41:00 -0000
@@ -183,7 +183,7 @@ z + q;
 This is total garbage, but it should be ignored.
 ]])
 
-AT_CHECK([bison types.y -o types.c], 0, [], ignore)
+AT_CHECK([bison -o types.c types.y], 0, [], ignore)
 AT_COMPILE([types])
 ])
 
Index: tests/headers.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/headers.at,v
retrieving revision 1.5
diff -p -u -r1.5 headers.at
--- tests/headers.at    30 Jun 2002 17:35:06 -0000      1.5
+++ tests/headers.at    14 Oct 2002 08:41:00 -0000
@@ -105,7 +105,7 @@ my_error (const char *msg)
 exp:;
 ])
 
-AT_CHECK([bison --defines input.y -o input.c])
+AT_CHECK([bison --defines -o input.c input.y])
 
 # YYLTYPE should be defined, and MY_LLOC declared.
 AT_DATA([caller.c],
Index: tests/input.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/input.at,v
retrieving revision 1.11
diff -p -u -r1.11 input.at
--- tests/input.at      30 Jun 2002 17:35:06 -0000      1.11
+++ tests/input.at      14 Oct 2002 08:41:00 -0000
@@ -181,7 +181,7 @@ main (void)
 }
 ]])
 
-AT_CHECK([bison input.y -d -v -o input.c])
+AT_CHECK([bison -d -v -o input.c input.y])
 AT_COMPILE([input], [input.c main.c])
 AT_PARSER_CHECK([./input], 0,
 [[[1],
Index: tests/regression.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/regression.at,v
retrieving revision 1.70
diff -p -u -r1.70 regression.at
--- tests/regression.at 14 Oct 2002 08:05:20 -0000      1.70
+++ tests/regression.at 14 Oct 2002 08:41:00 -0000
@@ -50,7 +50,7 @@ exp: MY_TOKEN;
 %%
 ]])
 
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 
 AT_CLEANUP
@@ -72,7 +72,7 @@ exp: { tests = {{{{{{{{{{}}}}}}}}}}; };
 %%
 ]])
 
-AT_CHECK([bison -v input.y -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 
 AT_CHECK([grep 'tests = {{{{{{{{{{}}}}}}}}}};' input.c], 0, [ignore])
 
@@ -99,7 +99,7 @@ exp: '(' exp ')' | NUM ;
 %%
 ]])
 
-AT_CHECK([bison -v input.y -o input.c], 0, [],
+AT_CHECK([bison -v -o input.c input.y], 0, [],
 [[input.y:6.8-14: warning: symbol `"<="' used more than once as a literal 
string
 ]])
 
@@ -144,7 +144,7 @@ expr:
 };
 ]])
 
-AT_CHECK([bison input.y -o input.c -v])
+AT_CHECK([bison -o input.c -v input.y])
 
 # Check the contents of the report.
 AT_CHECK([cat input.output], [],
@@ -266,7 +266,7 @@ exp: ;
 %%
 ]])
 
-AT_CHECK([bison -v input.y -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 
 AT_CLEANUP
 
@@ -327,7 +327,7 @@ int yylex (void);
 exp: "a";
 ]])
 
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 AT_CLEANUP
 
@@ -353,7 +353,7 @@ exp:
 ;
 ]])
 
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_COMPILE([input.o], [-c input.c])
 AT_CLEANUP
 
@@ -558,7 +558,7 @@ else: "else" statement;
 %%
 ]])
 
-AT_CHECK([bison -v input.y -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 
 # Check only the tables.  We don't use --no-parser, because it is
 # still to be implemented in the experimental branch of Bison.
Index: tests/synclines.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/synclines.at,v
retrieving revision 1.6
diff -p -u -r1.6 synclines.at
--- tests/synclines.at  12 Aug 2002 14:59:02 -0000      1.6
+++ tests/synclines.at  14 Oct 2002 08:41:00 -0000
@@ -66,7 +66,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 input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_SYNCLINES_COMPILE([input.c])
 AT_CHECK([cat stdout], 0, [$3])
 AT_CLEANUP
Index: tests/torture.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/torture.at,v
retrieving revision 1.19
diff -p -u -r1.19 torture.at
--- tests/torture.at    12 Aug 2002 14:59:47 -0000      1.19
+++ tests/torture.at    14 Oct 2002 08:41:00 -0000
@@ -144,7 +144,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 input.y -v -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -248,7 +248,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 input.y -v -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -372,7 +372,7 @@ AT_DATA_LOOKAHEADS_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 input.y -v -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
 AT_COMPILE([input])
 AT_PARSER_CHECK([./input])
 
@@ -429,7 +429,7 @@ main (int argc, const char **argv)
   return yyparse ();
 }
 ]])
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
 AT_COMPILE([input])
 ])
 




reply via email to

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