mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +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>
|
2009-10-03 Joel E. Denny <jdenny@clemson.edu>
|
||||||
|
|
||||||
Remove dead code.
|
Remove dead code.
|
||||||
|
|||||||
@@ -246,7 +246,6 @@ sub generate_grammar_triangular ($$@)
|
|||||||
or die;
|
or die;
|
||||||
print $out <<EOF;
|
print $out <<EOF;
|
||||||
%error-verbose
|
%error-verbose
|
||||||
%debug
|
|
||||||
%{
|
%{
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -318,7 +317,9 @@ yyerror (const char *msg)
|
|||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
|
#if YYDEBUG
|
||||||
yydebug = !!getenv ("YYDEBUG");
|
yydebug = !!getenv ("YYDEBUG");
|
||||||
|
#endif
|
||||||
return yyparse ();
|
return yyparse ();
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@@ -543,6 +544,10 @@ main (int argc, const char **argv)
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
#if YYDEBUG
|
||||||
|
yydebug = !!getenv ("YYDEBUG");
|
||||||
|
#endif
|
||||||
|
|
||||||
input = fopen ("calc.input", "r");
|
input = fopen ("calc.input", "r");
|
||||||
if (!input)
|
if (!input)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user