mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2009-10-04 Joel E. Denny <jdenny@clemson.edu>
|
||||
|
||||
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 <jdenny@clemson.edu>
|
||||
|
||||
Remove dead code.
|
||||
|
||||
@@ -246,7 +246,6 @@ sub generate_grammar_triangular ($$@)
|
||||
or die;
|
||||
print $out <<EOF;
|
||||
%error-verbose
|
||||
%debug
|
||||
%{
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user