mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: simplify computation of yydebug
* examples/c/lexcalc/parse.y: here.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user