DXRSNCOD5N6GRTVSO7FEJXSWOAXVZRUBIX4NGOP4ODBM2DFZTG4QC %{/* definitions */#include <stdio.h>int yylex();int yyerror(char *);%}%token EOL/* rules */%%input: EOL;%%int yyerror(char* s){printf("error: %s\n", s);return 0;}//driverint main(int argc, char** argv){printf("hello, world!\n");yyparse();return 0;}
int yywrap(){printf("yywrap is called!\n");}
hello: hello.yy.cgcc -o hello hello.yy.c -ll
hello-lexer: hello.yy.c hello.tab.hgcc -o hello-lexer hello.yy.c -llhello-parser: hello.yy.c hello.tab.h hello.tab.cgcc -o hello-parser hello.yy.c hello.tab.crun-hello-parser: hello-parser./hello-parser < input/newline
clean:rm -f hello.tab.h hello.tab.c hello.yy.c hello-lexer hello-parser