mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: factor the definition of main
With Théophile Ranquet. * tests/local.at (AT_MAIN_DEFINE): New. (AT_YYERROR_DEFINE): Improve formatting. * tests/actions.at, tests/c++.at, tests/conflicts.at, * tests/glr-regression.at, tests/input.at, tests/regression.at, * tests/skeletons.at, tests/torture.at: Adjust. * tests/c++.at: Add missing %skeleton for a PUSHDEFS, and a missing PUSH/POPDEFS for another test.
This commit is contained in:
@@ -221,30 +221,9 @@ public Object getLVal ()
|
||||
|
||||
/*-------.
|
||||
| main. |
|
||||
`-------*/]AT_SKEL_JAVA_IF([[
|
||||
|
||||
class input
|
||||
{
|
||||
public static void main (String args[]) throws IOException
|
||||
{
|
||||
YYParser p = new YYParser ();
|
||||
p.parse ();
|
||||
}
|
||||
}]], [AT_SKEL_CC_IF([[
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
yy::parser parser;
|
||||
return parser.parse ();
|
||||
}]], [[
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return yyparse ();
|
||||
}]])])[
|
||||
]])
|
||||
`-------*/
|
||||
]AT_MAIN_DEFINE
|
||||
])
|
||||
|
||||
AT_FULL_COMPILE([[input]])
|
||||
|
||||
@@ -492,13 +471,8 @@ reduce-nonassoc: %prec 'a';
|
||||
%%
|
||||
]AT_YYERROR_DEFINE[
|
||||
]AT_YYLEX_DEFINE(["aaa"])[
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return yyparse ();
|
||||
}
|
||||
]])
|
||||
]AT_MAIN_DEFINE
|
||||
])
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
# Show canonical LR's failure.
|
||||
|
||||
Reference in New Issue
Block a user