From d57561ef43c80fa6050e80f4876a45ba886818ff Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 21 Oct 2018 21:29:04 +0300 Subject: Debugging options for the bison parser --- demo/bison/calc/parser.tab.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'demo/bison/calc/parser.tab.c') 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; } -- cgit v1.3.1-26-gb76a