diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-03-10 21:04:16 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-03-21 14:52:41 +0100 |
commit | 675dcf1962475de1e9a05f6d26bfb823c00c8a74 (patch) | |
tree | f32eb78f54ff9adb55b30eaa6c03ec925d3638d4 /etc | |
parent | 466fb66578e4111e4d5612a4c1951d6229e79fb5 (diff) | |
download | bison-675dcf1962475de1e9a05f6d26bfb823c00c8a74.tar.gz |
bench: die clearly on incorrect --grammar arguments
* etc/bench.pl.in (getopt): here.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bench.pl.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 153ae55d..6460a90c 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -1100,6 +1100,9 @@ sub getopt () Getopt::Long::Configure ("bundling", "pass_through"); GetOptions (%option) or exit 1; + my %grammars = map { $_ => 1 } qw[calc list triangular]; + die "invalid grammar: $grammar, valid: @{[keys %grammars]}\n" + if !exists($grammars{$grammar}); } ###################################################################### |