From afdefecab6eddb64962b205e799564e4cdb16cbd Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 10 Dec 2018 06:33:50 +0100 Subject: [PATCH] examples: simplify computation of yydebug * examples/c/lexcalc/parse.y: here. --- examples/c/lexcalc/parse.y | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/c/lexcalc/parse.y b/examples/c/lexcalc/parse.y index 5306de30..f2f29df1 100644 --- a/examples/c/lexcalc/parse.y +++ b/examples/c/lexcalc/parse.y @@ -86,9 +86,8 @@ void yyerror(int *nerrs, const char *msg) int main (void) { int nerrs = 0; - // Enable parser runtime debugging. - if (!!getenv ("YYDEBUG")) - yydebug = 1; + // Possibly enable parser runtime debugging. + yydebug = !!getenv ("YYDEBUG"); yyparse (&nerrs); // Exit on failure if there were errors. return !!nerrs;