diff options
| author | Quentin Carbonneaux | 2015-03-05 15:16:13 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2015-03-05 15:16:13 -0500 |
| commit | 74b6607ffdbaae67f5bcb8182b40818648add4ec (patch) | |
| tree | f4b1a8b2b474e5bb7a1fac9491f99fa5853b6a77 | |
| parent | 76cd27322920f413a309c443ec101fc21373677a (diff) | |
there is a bug with this file
| -rw-r--r-- | act.y | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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(); } |
