From: Joel E. Denny Date: Sun, 4 Oct 2009 18:33:28 +0000 (-0400) Subject: benchmarks: use %debug consistently among grammars. X-Git-Tag: v2.7.90~759 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/37318e2fe9a8d468088ddb782539f88b3a4c2bb8 benchmarks: use %debug consistently among grammars. * etc/bench.pl.in (generate_grammar_triangular): Do not activate %debug by default. It can affect the timings even if yydebug=0. (generate_grammar_calc): For consistency with other grammars, use YYDEBUG environment variable to set yydebug. --- diff --git a/ChangeLog b/ChangeLog index 1ea72b2f..a813d694 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-04 Joel E. Denny + + benchmarks: use %debug consistently among grammars. + * etc/bench.pl.in (generate_grammar_triangular): Do not activate + %debug by default. It can affect the timings even if yydebug=0. + (generate_grammar_calc): For consistency with other grammars, + use YYDEBUG environment variable to set yydebug. + 2009-10-03 Joel E. Denny Remove dead code. diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 2290fd28..cfa055d3 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -246,7 +246,6 @@ sub generate_grammar_triangular ($$@) or die; print $out < #include @@ -318,7 +317,9 @@ yyerror (const char *msg) int main (void) { +#if YYDEBUG yydebug = !!getenv ("YYDEBUG"); +#endif return yyparse (); } EOF @@ -543,6 +544,10 @@ main (int argc, const char **argv) int count = 0; int status; +#if YYDEBUG + yydebug = !!getenv ("YYDEBUG"); +#endif + input = fopen ("calc.input", "r"); if (!input) {