CPSC 3520 - DAY 13 FEBRUARY 27, 2018 ================================================================================ transunit: maindec1 body ; maindecl: type MAIN arg ; type INT | VOID ; arg: LPARENS type RPARENS ; Error Handling Bison -------------------- int yyerror(s) char *s; { printf("%s\n", s); return(-1); } flex generates the c-based scanner in lex.yy.c bison generates the parser in minicex1.tab.c yyerror() #include "minicex1.tab.c" #include "lex.yy.c" #include "yyerror.c" #define YYERROR_VERBOSE int main() { yyparse(); return(1); }