From 56414791e9b2e7431751decb0508291e9226dd7f Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 21 Mar 2020 14:57:13 +0100 Subject: bench: simplify the calc grammar * etc/bench.pl.in (generate_grammar_calc): We don't need global_result etc. --- etc/bench.pl.in | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'etc') diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 6460a90c..de2fcb7e 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -379,9 +379,6 @@ sub generate_grammar_calc ($$@) #include #include #define USE(Var) - -static int global_result = 0; -static int global_count = 0; %} %define api.value.type union @@ -557,10 +554,6 @@ power (int base, int exponent) int main (int argc, const char **argv) { - int result = 0; - int count = 0; - int status; - #if YYDEBUG yydebug = !!getenv ("YYDEBUG"); #endif @@ -572,13 +565,7 @@ main (int argc, const char **argv) return 3; } - status = yyparse (); - if (global_result != result) - abort (); - if (global_count != count) - abort (); - - return status; + return yyparse (); } EOF } -- cgit v1.2.1