summaryrefslogtreecommitdiff
path: root/tests/regression.at
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2013-01-15 18:29:45 +0100
committerAkim Demaille <akim@lrde.epita.fr>2013-01-21 16:27:46 +0100
commit3ef9fa8f83316f7955babee666546feb5d9bdefc (patch)
tree02c394f4d2ba155b9944db1aa34abd7a97f25247 /tests/regression.at
parent70b7c357476ed3525ddb5d2739e70690cfebb207 (diff)
downloadbison-3ef9fa8f83316f7955babee666546feb5d9bdefc.tar.gz
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.
Diffstat (limited to 'tests/regression.at')
-rw-r--r--tests/regression.at34
1 files changed, 5 insertions, 29 deletions
diff --git a/tests/regression.at b/tests/regression.at
index bee59154..398b9498 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -464,12 +464,7 @@ exp: "a" "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!";
%%
]AT_YYERROR_DEFINE[
]AT_YYLEX_DEFINE([{ SPECIAL }])[
-
-int
-main (void)
-{
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
]])
AT_BISON_OPTION_POPDEFS
@@ -899,12 +894,7 @@ yyparse ()
return parser.parse ();
}
])[
-
-int
-main (void)
-{
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
]])
])# _AT_DATA_DANCER_Y
@@ -983,12 +973,7 @@ yylex (]AT_LALR1_CC_IF([int *lval], [void])[)
assert (toknum < sizeof tokens / sizeof *tokens);
return tokens[toknum++];
}
-
-int
-main (void)
-{
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
]])
])# _AT_DATA_EXPECT2_Y
@@ -1180,12 +1165,7 @@ sr_conflict:
]AT_YYERROR_DEFINE[
]AT_YYLEX_DEFINE([{ 1, 2, 3, 0 }])[
-
-int
-main (void)
-{
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
]])
AT_BISON_OPTION_POPDEFS
@@ -1277,11 +1257,7 @@ syntax_error:
recovery by shifting 3 tokens) in order to detect any loss of the
reallocated buffer. */
]AT_YYLEX_DEFINE(["abc"])[
-int
-main (void)
-{
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
]])
AT_BISON_OPTION_POPDEFS