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
])
AT_DATA_GRAMMAR([input.y],
[%locations
-%name-prefix="my_"
+%name-prefix "my_"
%{
#include <stdio.h>
#include <stdlib.h>
-static int
+int my_lex (void);
+
+int
my_lex (void)
{
return EOF;
[[#include "input.h"
YYLTYPE *my_llocp = &my_lloc;
+#ifndef YYPUSH_DECLS
int my_parse (void);
+#else
+int my_lex (void);
+#endif
int
main (void)