X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/9ca7f077a0a5ecdd00c5945c7a7bd3cf46e23c13..4acc22e5cf47432cec8e196f6f1fefb43453f3b5:/etc/bench.pl.in diff --git a/etc/bench.pl.in b/etc/bench.pl.in index b008b0bc..4d480d5e 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. # # This file is part of Bison, the GNU Compiler Compiler. # @@ -134,8 +134,8 @@ sub calc_grammar ($$$) or die; print $out < #include - #include #include #include @@ -270,9 +270,7 @@ yylex (void) /* Skip white space. */ while ((c = get_char ()) == ' ' || c == '\t') - { - - } + continue; /* process numbers */ if (c == '.' || isdigit (c)) @@ -293,9 +291,8 @@ yylex (void) static int power (int base, int exponent) { + assert (0 <= exponent); int res = 1; - if (exponent < 0) - exit (3); for (/* Niente */; exponent; --exponent) res *= base; return res; @@ -345,8 +342,8 @@ sub bench_grammar ($) ( "pull-impure" => '', "pull-pure" => '%define api.pure', - "push-impure" => '%define api.push_pull "both"', - "push-pure" => '%define api.push_pull "both" %define api.pure', + "push-impure" => '%define api.push-pull "both"', + "push-pure" => '%define api.push-pull "both" %define api.pure', ); my %bench;