examples: simplify computation of yydebug

* examples/c/lexcalc/parse.y: here.
This commit is contained in:
Akim Demaille
2018-12-10 06:33:50 +01:00
parent 81dbd0d82e
commit afdefecab6

View File

@@ -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;