diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-11-26 13:54:18 +0100 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-11-26 13:54:18 +0100 |
commit | 5b840fd4c56d835b067e4cf9a3e4af4442717d20 (patch) | |
tree | 46105003197ed4c5fdea8f90559040e45a67db54 | |
parent | bd45b72caf6de003b3b2f053cd24add1b4ddd851 (diff) |
Set yyin to file
-rw-r--r-- | grammar.y | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,9 @@ %{ #include <stdio.h> + +extern FILE *yyin; +extern int yylex(); +extern void yyerror(); %} %define parse.error verbose @@ -46,8 +50,9 @@ expression: NUMBER ; %% -main (int argc, char **argv) +void main (int argc, char **argv) { //henshin_lex(); + yyin = fopen(argv[1], "r"); yyparse(); } |