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.
This commit is contained in:
Paul Eggert
2002-10-14 08:43:36 +00:00
parent 1318e37d58
commit b56471a689
10 changed files with 30 additions and 30 deletions

View File

@@ -1403,7 +1403,7 @@ rpcalc.tab.c rpcalc.y
@group @group
# @r{Compile the Bison parser.} # @r{Compile the Bison parser.}
# @r{@samp{-lm} tells compiler to search math library for @code{pow}.} # @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 @end group
@group @group
@@ -5812,7 +5812,7 @@ bison -d @var{infile.yxx}
will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}, and will produce @file{infile.tab.cxx} and @file{infile.tab.hxx}, and
@example @example
bison -d @var{infile.y} -o @var{output.c++} bison -d -o @var{output.c++} @var{infile.y}
@end example @end example
@noindent @noindent
will produce @file{output.c++} and @file{outfile.h++}. will produce @file{output.c++} and @file{outfile.h++}.

View 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_COMPILE([input])
AT_PARSER_CHECK([./input], 0, AT_PARSER_CHECK([./input], 0,
[[0123456789 [[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_COMPILE([input])
AT_PARSER_CHECK([./input], 0, AT_PARSER_CHECK([./input], 0,
[[15 [[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_COMPILE([input])
AT_PARSER_CHECK([./input], 1, AT_PARSER_CHECK([./input], 1,
[[sending: 'x' (value = 0, line 0) [[sending: 'x' (value = 0, line 0)

View File

@@ -375,7 +375,7 @@ AT_SETUP([Calculator $1])
AT_DATA_CALC_Y([$1]) AT_DATA_CALC_Y([$1])
# Specify the output files to avoid problems on different file systems. # 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], [], []) [0], [], [])
AT_COMPILE([calc]) AT_COMPILE([calc])

View File

@@ -37,7 +37,7 @@ exp: e 'e';
e: 'e' | /* Nothing. */; 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 */ [[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. # 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_COMPILE([input])
AT_PARSER_CHECK([./input '0<0']) AT_PARSER_CHECK([./input '0<0'])
@@ -141,7 +141,7 @@ AT_DATA([input.y],
exp: exp OP exp | NUM; 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 [input.y: warning: 1 shift/reduce conflict
]) ])
@@ -249,7 +249,7 @@ AT_DATA([input.y],
exp: exp OP exp | NUM; 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. # Check the contents of the report.
AT_CHECK([cat input.output], [], 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: warning: 1 reduce/reduce conflict
input.y:4.4-8: warning: rule never reduced because of conflicts: id: '0' 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; 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: warning: 1 shift/reduce conflict
input.y: expected 0 shift/reduce conflicts input.y: expected 0 shift/reduce conflicts
]) ])
@@ -508,7 +508,7 @@ AT_DATA([input.y],
exp: exp OP exp | NUM; exp: exp OP exp | NUM;
]]) ]])
AT_CHECK([bison input.y -o input.c]) AT_CHECK([bison -o input.c input.y])
AT_CLEANUP AT_CLEANUP
@@ -525,7 +525,7 @@ AT_DATA([input.y],
exp: exp OP exp | NUM; 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: warning: 1 shift/reduce conflict
input.y: expected 2 shift/reduce conflicts input.y: expected 2 shift/reduce conflicts
]) ])

View File

@@ -183,7 +183,7 @@ z + q;
This is total garbage, but it should be ignored. 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]) AT_COMPILE([types])
]) ])

View File

@@ -105,7 +105,7 @@ my_error (const char *msg)
exp:; 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. # YYLTYPE should be defined, and MY_LLOC declared.
AT_DATA([caller.c], AT_DATA([caller.c],

View 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_COMPILE([input], [input.c main.c])
AT_PARSER_CHECK([./input], 0, AT_PARSER_CHECK([./input], 0,
[[[1], [[[1],

View 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_COMPILE([input.o], [-c input.c])
AT_CLEANUP 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]) 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 [[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. # Check the contents of the report.
AT_CHECK([cat input.output], [], 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 AT_CLEANUP
@@ -327,7 +327,7 @@ int yylex (void);
exp: "a"; 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_COMPILE([input.o], [-c input.c])
AT_CLEANUP 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_COMPILE([input.o], [-c input.c])
AT_CLEANUP 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 # Check only the tables. We don't use --no-parser, because it is
# still to be implemented in the experimental branch of Bison. # still to be implemented in the experimental branch of Bison.

View File

@@ -66,7 +66,7 @@ AT_SYNCLINES_COMPILE([syncline.c])
AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]]) AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
AT_DATA([[input.y]], [$2]) 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_SYNCLINES_COMPILE([input.c])
AT_CHECK([cat stdout], 0, [$3]) AT_CHECK([cat stdout], 0, [$3])
AT_CLEANUP AT_CLEANUP

View File

@@ -144,7 +144,7 @@ AT_SETUP([Big triangle])
# With 500 and the new parser, which consume far too much memory, # With 500 and the new parser, which consume far too much memory,
# it gets killed too. Of course the parser is to be cleaned. # it gets killed too. Of course the parser is to be cleaned.
AT_DATA_TRIANGULAR_GRAMMAR([input.y], [200]) 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_COMPILE([input])
AT_PARSER_CHECK([./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. # Ask for 200 MiB, which should be plenty even on a 64-bit host.
AT_INCREASE_DATA_SIZE(204000) 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_COMPILE([input])
AT_PARSER_CHECK([./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. # Ask for 200 MiB, which should be plenty even on a 64-bit host.
AT_INCREASE_DATA_SIZE(204000) 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_COMPILE([input])
AT_PARSER_CHECK([./input]) AT_PARSER_CHECK([./input])
@@ -429,7 +429,7 @@ main (int argc, const char **argv)
return yyparse (); return yyparse ();
} }
]]) ]])
AT_CHECK([bison input.y -o input.c]) AT_CHECK([bison -o input.c input.y])
AT_COMPILE([input]) AT_COMPILE([input])
]) ])