mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 03:03:02 +00:00
bench: simplify the calc grammar
* etc/bench.pl.in (generate_grammar_calc): We don't need global_result etc.
This commit is contained in:
@@ -379,9 +379,6 @@ sub generate_grammar_calc ($$@)
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#define USE(Var)
|
#define USE(Var)
|
||||||
|
|
||||||
static int global_result = 0;
|
|
||||||
static int global_count = 0;
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%define api.value.type union
|
%define api.value.type union
|
||||||
@@ -557,10 +554,6 @@ power (int base, int exponent)
|
|||||||
int
|
int
|
||||||
main (int argc, const char **argv)
|
main (int argc, const char **argv)
|
||||||
{
|
{
|
||||||
int result = 0;
|
|
||||||
int count = 0;
|
|
||||||
int status;
|
|
||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
yydebug = !!getenv ("YYDEBUG");
|
yydebug = !!getenv ("YYDEBUG");
|
||||||
#endif
|
#endif
|
||||||
@@ -572,13 +565,7 @@ main (int argc, const char **argv)
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = yyparse ();
|
return yyparse ();
|
||||||
if (global_result != result)
|
|
||||||
abort ();
|
|
||||||
if (global_count != count)
|
|
||||||
abort ();
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user