#include"parser.tab.h" #include #include #include #include #include #include extern int yyparse(); int main(int argc, char **argv) { int input; if(argc != 2) { printf("%s \n", argv[0]); return 1; } input = open(argv[1], O_RDONLY); dup2(input, STDIN_FILENO); close(input); return yyparse(); } int yywrap(void) { return 0; } int yyerror(void) { printf("Parse error\n"); exit(1); }