From b56471a6890db1598d1ed1877b5d01c6b9678243 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Oct 2002 08:43:36 +0000 Subject: [PATCH] Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c", so that the commands still work even if POSIXLY_CORRECT is set. --- doc/bison.texinfo | 4 ++-- tests/actions.at | 6 +++--- tests/calc.at | 2 +- tests/conflicts.at | 16 ++++++++-------- tests/cxx-type.at | 2 +- tests/headers.at | 2 +- tests/input.at | 2 +- tests/regression.at | 16 ++++++++-------- tests/synclines.at | 2 +- tests/torture.at | 8 ++++---- 10 files changed, 30 insertions(+), 30 deletions(-) diff --git a/doc/bison.texinfo b/doc/bison.texinfo index 0d069f05..b2637462 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -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++}. diff --git a/tests/actions.at b/tests/actions.at index f26407fe..e6e23866 100644 --- a/tests/actions.at +++ b/tests/actions.at @@ -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) diff --git a/tests/calc.at b/tests/calc.at index 63c8604b..34cac69d 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -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]) diff --git a/tests/conflicts.at b/tests/conflicts.at index 427cce37..31473656 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -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 ]) diff --git a/tests/cxx-type.at b/tests/cxx-type.at index d41c361d..df85fd7e 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -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]) ]) diff --git a/tests/headers.at b/tests/headers.at index c7fb8083..c7f35c43 100644 --- a/tests/headers.at +++ b/tests/headers.at @@ -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], diff --git a/tests/input.at b/tests/input.at index e3db5d0d..7c5f73e5 100644 --- a/tests/input.at +++ b/tests/input.at @@ -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], diff --git a/tests/regression.at b/tests/regression.at index bd3391f0..bcd97d24 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -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. diff --git a/tests/synclines.at b/tests/synclines.at index 1a7d4483..20a192d3 100644 --- a/tests/synclines.at +++ b/tests/synclines.at @@ -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 diff --git a/tests/torture.at b/tests/torture.at index 9354dfad..b9032d0c 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -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]) ]) -- 2.45.2