X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6ee95cd0d900362be987c3910d634e20460d7ad0..a2c525b34c24e790e37d8735c28c708c17cf9f57:/tests/torture.at diff --git a/tests/torture.at b/tests/torture.at index ac9e91ea..d6b2806a 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -1,6 +1,6 @@ # Torturing Bison. -*- Autotest -*- -# Copyright (C) 2001-2002, 2004-2007, 2009-2012 Free Software +# Copyright (C) 2001-2002, 2004-2007, 2009-2015 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -91,9 +91,9 @@ for my $size (1 .. $max) { use Text::Wrap; print wrap ("| ", " ", - (map { "\"$_\"" } (1 .. $size)), - " END \n"), - " { \$\$ = $size; }\n"; + (map { "\"$_\"" } (1 .. $size)), + " END \n"), + " { \$\$ = $size; }\n"; }; print ";\n"; @@ -115,12 +115,7 @@ yylex (void) } return inner++; } -int -main (void) -{ - yydebug = !!getenv ("YYDEBUG"); - return yyparse (); -} +]AT_MAIN_DEFINE[ EOF ]]) AT_BISON_OPTION_POPDEFS @@ -188,7 +183,7 @@ EOF use Text::Wrap; print wrap ("exp: ", " ", - (map { "\"$_\"" } (1 .. $max)), ";"), + (map { "\"$_\"" } (1 .. $max)), ";"), "\n"; print <<\EOF; @@ -204,13 +199,7 @@ yylex (void) assert (counter++ == MAX + 1); return 0; } - -int -main (void) -{ - yydebug = !!getenv ("YYDEBUG"); - return yyparse (); -} +]AT_MAIN_DEFINE[ EOF ]]) @@ -288,8 +277,8 @@ EOF print wrap ("%type ", - " ", - map { "n$_" } (1 .. $max)), + " ", + map { "n$_" } (1 .. $max)), "\n"; print "%token\n"; @@ -342,12 +331,7 @@ yylex (void) return counter++; } -int -main (void) -{ - yydebug = !!getenv ("YYDEBUG"); - return yyparse (); -} +]AT_MAIN_DEFINE[ EOF ]]) @@ -419,7 +403,7 @@ get_args (int argc, const char **argv) { int res; char *endp; - assert (argc == 2); + assert (argc == 2); (void) argc; res = strtol (argv[1], &endp, 10); assert (argv[1] != endp); assert (0 <= res);