summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Carbonneaux2015-03-05 15:16:13 -0500
committerQuentin Carbonneaux2015-03-05 15:16:13 -0500
commit74b6607ffdbaae67f5bcb8182b40818648add4ec (patch)
treef4b1a8b2b474e5bb7a1fac9491f99fa5853b6a77
parent76cd27322920f413a309c443ec101fc21373677a (diff)
there is a bug with this file
-rw-r--r--act.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/act.y b/act.y
new file mode 100644
index 0000000..2db2bf7
--- /dev/null
+++ b/act.y
@@ -0,0 +1,12 @@
+%{
+ #include <stdio.h>
+ int yylex(), yyerror();
+%}
+%%
+start: 'x' foo 'y';
+foo: { puts("act!"); };
+%%
+int yyerror() { puts("oops, yacc error!"); }
+int yylex() { int c = getchar(); printf("lex %d\n", c); return c==EOF?0:c; }
+
+int main() { yyparse(); }