]> git.saurik.com Git - bison.git/commitdiff
Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Oct 2002 08:43:36 +0000 (08:43 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Oct 2002 08:43:36 +0000 (08:43 +0000)
so that the commands still work even if POSIXLY_CORRECT is set.

doc/bison.texinfo
tests/actions.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

index 0d069f054e8097c4794c3cd1ad5658b0f7298ee0..b2637462c47ba31da6cc2b1da96354adfa9f706f 100644 (file)
@@ -1403,7 +1403,7 @@ rpcalc.tab.c  rpcalc.y
 @group
 # @r{Compile the Bison parser.}
 # @r{@samp{-lm} 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 f26407fe70b7053b7c0146fb3140b34ca76efec8..e6e23866d7a052d43de0d30a824d92c28a5a80ae 100644 (file)
@@ -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 63c8604b16ae8e255bc8d1b9fcbe9558e07b53fc..34cac69d449cfddb6bd679cdfaaf55c66cfc604b 100644 (file)
@@ -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 427cce376d8c942ce87a22d1ece665850d180969..3147365623d8e35bd3bba31ae3ed4bc89fff0391 100644 (file)
@@ -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 d41c361dac075430dc8609981a0ac4e2666af4fa..df85fd7e9ebe099dec8a2fcf3b42ef336a32e190 100644 (file)
@@ -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 c7fb8083e991d318ea81d0696824cac621208f46..c7f35c43ba584d300fb8856fa1bd8ccfe54df7e3 100644 (file)
@@ -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 e3db5d0df9adcdf6e7e9122cf4552328c690ee07..7c5f73e55a1f1d1b6bd0da71d1c4141e9b6206fb 100644 (file)
@@ -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 bd3391f050a0bb695617255d70ea6357ac0fe152..bcd97d24e98c4c0534d46d2dc0f4eedba1b799ce 100644 (file)
@@ -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 1a7d44831606867eebb18ec91812a9b10379dcdf..20a192d3190700bb094960d25c3f83373d97736f 100644 (file)
@@ -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 9354dfad464b6d7ca3e15386c3a2299f4f6313d0..b9032d0cb7da6ec945e8cee212cf7d316c470139 100644 (file)
@@ -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], [1000])
 # 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], [1000])
 # 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])
 ])