so that the commands still work even if POSIXLY_CORRECT is set.
@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
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++}.
}
]])
-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
}
]])
-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
}
]])
-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)
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])
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 */
]])
]])
# 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'])
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
])
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], [],
%%
]])
-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'
]])
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
])
exp: exp OP exp | NUM;
]])
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
AT_CLEANUP
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
])
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])
])
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],
}
]])
-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],
%%
]])
-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
%%
]])
-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([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
]])
};
]])
-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], [],
%%
]])
-AT_CHECK([bison -v input.y -o input.c])
+AT_CHECK([bison -v -o input.c input.y])
AT_CLEANUP
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
;
]])
-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
%%
]])
-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.
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
# 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])
# 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])
# 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])
return yyparse ();
}
]])
-AT_CHECK([bison input.y -o input.c])
+AT_CHECK([bison -o input.c input.y])
AT_COMPILE([input])
])