X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/71cb558dfe0f9c80e697308a5084de3b9926ee9c..a2c525b34c24e790e37d8735c28c708c17cf9f57:/tests/torture.at?ds=sidebyside diff --git a/tests/torture.at b/tests/torture.at index 5aa18900..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 ]]) @@ -269,6 +258,7 @@ print < # include # include @@ -287,8 +277,8 @@ EOF print wrap ("%type ", - " ", - map { "n$_" } (1 .. $max)), + " ", + map { "n$_" } (1 .. $max)), "\n"; print "%token\n"; @@ -341,12 +331,7 @@ yylex (void) return counter++; } -int -main (void) -{ - yydebug = !!getenv ("YYDEBUG"); - return yyparse (); -} +]AT_MAIN_DEFINE[ EOF ]]) @@ -383,7 +368,7 @@ m4_define([AT_DATA_STACK_TORTURE], [AT_BISON_OPTION_PUSHDEFS([$2]) # A grammar of parens growing the stack thanks to right recursion. # exp: -AT_DATA([input.y], +AT_DATA_GRAMMAR([input.y], [[%{ #include #include @@ -418,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);