mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
bench: die clearly on incorrect --grammar arguments
* etc/bench.pl.in (getopt): here.
This commit is contained 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});
|
||||
}
|
||||
|
||||
######################################################################
|
||||
|
||||
Reference in New Issue
Block a user