diff options
Debugging options for the bison parser
1 files changed, 5 insertions, 1 deletions
| -rw-r--r-- | demo/bison/calc/parser.tab.c | 6 |
diff --git a/demo/bison/calc/parser.tab.c b/demo/bison/calc/parser.tab.c index 11422b8..0948b48 100644 --- a/demo/bison/calc/parser.tab.c +++ b/demo/bison/calc/parser.tab.c @@ -92,7 +92,7 @@ int yyerror(const char* error); # define YY_YY_PARSER_TAB_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG -# define YYDEBUG 0 +# define YYDEBUG 1 #endif #if YYDEBUG extern int yydebug; @@ -1478,6 +1478,10 @@ int yyerror(const char* error) int main() { +#if YYDEBUG + yydebug = 1; +#endif + yyparse(); return 0; } |
