X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5a6755afcb50c29c04d2f605f885e69784d9d6cc..c3d503425f8014b432601a33b3398446d63b5963:/tests/headers.at?ds=sidebyside diff --git a/tests/headers.at b/tests/headers.at index f7ccb77b..4a4a72e3 100644 --- a/tests/headers.at +++ b/tests/headers.at @@ -57,17 +57,19 @@ AS_MKDIR_P([$dirname]) AT_DATA_GRAMMAR([$1.y], [%{ -#include "$1.h" +#include <$1.h> +void yyerror (const char *); +int yylex (void); %} %% dummy:; %% -#include "$1.h" +#include <$1.h> ]) AT_CHECK([bison --defines=$1.h --output=y.tab.c $1.y]) -AT_COMPILE([y.tab.o], [-c y.tab.c]) +AT_COMPILE([y.tab.o], [-I. -c y.tab.c]) AT_CLEANUP ]) @@ -87,12 +89,14 @@ AT_SETUP([export YYLTYPE]) AT_DATA_GRAMMAR([input.y], [%locations -%name-prefix="my_" +%name-prefix "my_" %{ #include #include -static int +int my_lex (void); + +int my_lex (void) { return EOF; @@ -116,7 +120,11 @@ AT_DATA([caller.c], [[#include "input.h" YYLTYPE *my_llocp = &my_lloc; +#ifndef YYPUSH_DECLS int my_parse (void); +#else +int my_lex (void); +#endif int main (void)