summaryrefslogtreecommitdiffstats
path: root/contrib/byacc/test/empty.y
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/byacc/test/empty.y')
-rw-r--r--contrib/byacc/test/empty.y24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/byacc/test/empty.y b/contrib/byacc/test/empty.y
new file mode 100644
index 0000000..2e60a74
--- /dev/null
+++ b/contrib/byacc/test/empty.y
@@ -0,0 +1,24 @@
+%{
+#ifdef YYBISON
+#define YYLEX_DECL() yylex(void)
+#define YYERROR_DECL() yyerror(const char *s)
+static int YYLEX_DECL();
+static void YYERROR_DECL();
+#endif
+%}
+%%
+start: ;
+
+%%
+
+#include <stdio.h>
+
+static int
+YYLEX_DECL() {
+ return -1;
+}
+
+static void
+YYERROR_DECL() {
+ printf("%s\n",s);
+}
OpenPOWER on IntegriCloud