File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 2929# it may work elsewhere but no specific attempt has been made to make it
3030# portable.
3131
32- use 5.006;
33- sub usage { die " usage: $0 [ -b bison_executable ] [ file.y ]\n " }
34-
32+ use v5.10;
3533use warnings;
36- use strict;
34+ sub usage { die " usage: $0 [ -b bison_executable ] [ file.y ] \n " }
3735
3836our $Verbose ;
3937BEGIN { require ' ./regen/regen_lib.pl' ; }
4038
41- my $bison = ' bison' ;
39+ use Getopt::Long;
40+ Getopt::Long::Configure(qw( bundling bundling_values no_ignore_case ) );
4241
43- if ( @ARGV >= 2 and $ARGV [0] eq ' -b ' ) {
44- shift ;
45- $bison = shift ;
46- }
42+ GetOptions(
43+ ' b|bison=s ' => \( my $bison = ' bison ' ),
44+ ' W=s ' => \ my @bison_warnings ,
45+ ) or usage;
4746
4847my $y_file = shift || ' perly.y' ;
4948
9089$version = $1 ;
9190
9291# creates $tmpc_file and $tmph_file
93- my_system(" $bison -d -o $tmpc_file $y_file " );
92+ my_system(" $bison -d -o $tmpc_file $y_file " .
93+ join (" " , map { " -W$_ " } @bison_warnings ));
9494
9595open my $ctmp_fh , ' <' , $tmpc_file or die " Can't open $tmpc_file : $! \n " ;
9696my $clines ;
You can’t perform that action at this time.
0 commit comments