aboutsummaryrefslogtreecommitdiff
path: root/test/code_debug.y
diff options
context:
space:
mode:
Diffstat (limited to 'test/code_debug.y')
-rw-r--r--test/code_debug.y36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/code_debug.y b/test/code_debug.y
new file mode 100644
index 000000000000..bb771567606a
--- /dev/null
+++ b/test/code_debug.y
@@ -0,0 +1,36 @@
+%{
+
+#ifdef YYBISON
+int yylex(void);
+static void yyerror(const char *);
+#endif
+
+%}
+%%
+S: error
+%%
+
+#include <stdio.h>
+
+#ifdef YYBYACC
+extern int YYLEX_DECL();
+#endif
+
+int
+main(void)
+{
+ printf("yyparse() = %d\n", yyparse());
+ return 0;
+}
+
+int
+yylex(void)
+{
+ return -1;
+}
+
+static void
+yyerror(const char* s)
+{
+ printf("%s\n", s);
+}