mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +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 main (void)
|
||||||
{
|
{
|
||||||
int nerrs = 0;
|
int nerrs = 0;
|
||||||
// Enable parser runtime debugging.
|
// Possibly enable parser runtime debugging.
|
||||||
if (!!getenv ("YYDEBUG"))
|
yydebug = !!getenv ("YYDEBUG");
|
||||||
yydebug = 1;
|
|
||||||
yyparse (&nerrs);
|
yyparse (&nerrs);
|
||||||
// Exit on failure if there were errors.
|
// Exit on failure if there were errors.
|
||||||
return !!nerrs;
|
return !!nerrs;
|
||||||
|
|||||||
Reference in New Issue
Block a user