X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ea0a767697594d2eda37daf5ecbf2fdaf60d2189..5f7f1e210b45977270f16532629107eb5c18227d:/tests/torture.at?ds=sidebyside diff --git a/tests/torture.at b/tests/torture.at index 0076dfd1..3fff08e6 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -1,6 +1,6 @@ # Torturing Bison. -*- Autotest -*- -# Copyright (C) 2001-2002, 2004-2007, 2009-2011 Free Software +# Copyright (C) 2001-2002, 2004-2007, 2009-2012 Free Software # Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -56,8 +56,8 @@ print < #include -static int yylex (void); -static void yyerror (const char *msg); +]AT_YYLEX_DECLARE[ +]AT_YYERROR_DECLARE[ %} %union { @@ -171,8 +171,8 @@ print < #include -static int yylex (void); -static void yyerror (const char *msg); +]AT_YYLEX_DECLARE[ +]AT_YYERROR_DECLARE[ %} %token @@ -278,8 +278,8 @@ print < # include -static int yylex (void); -static void yyerror (const char *msg); +]AT_YYLEX_DECLARE[ +]AT_YYERROR_DECLARE[ %} %union { @@ -390,7 +390,8 @@ AT_CLEANUP # ------------------------------------------------ # A parser specialized in torturing the stack size. m4_define([AT_DATA_STACK_TORTURE], -[# A grammar of parens growing the stack thanks to right recursion. +[AT_BISON_OPTION_PUSHDEFS([$2]) +# A grammar of parens growing the stack thanks to right recursion. # exp: AT_DATA([input.y], [[%{ @@ -399,8 +400,8 @@ AT_DATA([input.y], #include #include ]$1[ - static int yylex (void); - static void yyerror (const char *msg); + ]AT_YYLEX_DECLARE[ + ]AT_YYERROR_DECLARE[ %} ]$2[ %error-verbose @@ -409,12 +410,7 @@ AT_DATA([input.y], %% exp: WAIT_FOR_EOF exp | ; %% -static void -yyerror (const char *msg) -{ - fprintf (stderr, "%s\n", msg); -} - +]AT_YYERROR_DEFINE[ static int yylex (void) { @@ -462,6 +458,7 @@ main (int argc, const char **argv) } } ]]) +AT_BISON_OPTION_POPDEFS([$2]) AT_BISON_CHECK([-o input.c input.y]) AT_COMPILE([input]) ])