diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-03-21 14:57:13 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-03-21 18:17:02 +0100 |
commit | 56414791e9b2e7431751decb0508291e9226dd7f (patch) | |
tree | e86a7e05a9546dcd82f1aa1af46fe1c9be933045 | |
parent | 675dcf1962475de1e9a05f6d26bfb823c00c8a74 (diff) | |
download | bison-56414791e9b2e7431751decb0508291e9226dd7f.tar.gz |
bench: simplify the calc grammar
* etc/bench.pl.in (generate_grammar_calc): We don't need global_result
etc.
-rwxr-xr-x | etc/bench.pl.in | 15 |
1 files changed, 1 insertions, 14 deletions
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 <string.h> #include <ctype.h> #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 } |