diff options
author | Akim Demaille <demaille@gostai.com> | 2008-08-07 20:53:08 +0200 |
---|---|---|
committer | Akim Demaille <demaille@gostai.com> | 2008-11-09 20:54:03 +0100 |
commit | db65ca1f12743e848a666209a744d514c6bf7315 (patch) | |
tree | a186b5c2135940a195d9b6b01fb289faedcf3a1a /etc | |
parent | 9b0efa5bc24b3f412b6579b5068cb52bab5c197f (diff) | |
download | bison-db65ca1f12743e848a666209a744d514c6bf7315.tar.gz |
fix eof condition
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bench.pl.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 40023d3f..1497a695 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -575,8 +575,7 @@ sub generate_grammar_list ($$@) { my ($base, $max, @directive) = @_; my $directives = directives ($base, @directive); - my $variant = grep { $_ eq '%define variant' } @directive; - + my $variant = grep { /%define variant/ } @directive; my $out = new IO::File ">$base.y" or die; print $out <<EOF; @@ -917,7 +916,10 @@ sub parse (@) { @token = @_; verbose 2, "Parsing: @token\n"; - return parse_expr (); + my @res = parse_expr (); + die "expected end of directives, unexpected: @token" + if defined $token[0]; + return @res; } sub parse_expr () |