diff options
Diffstat (limited to 'src/tools/msvc/pgflex.pl')
-rw-r--r-- | src/tools/msvc/pgflex.pl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl index 551b8f67ae..259f2187ed 100644 --- a/src/tools/msvc/pgflex.pl +++ b/src/tools/msvc/pgflex.pl @@ -12,10 +12,10 @@ use File::Basename; require 'src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; -my ($flexver) = `flex -V`; # grab first line -$flexver=(split(/\s+/,$flexver))[1]; +my ($flexver) = `flex -V`; # grab first line +$flexver = (split(/\s+/, $flexver))[1]; $flexver =~ s/[^0-9.]//g; -my @verparts = split(/\./,$flexver); +my @verparts = split(/\./, $flexver); unless ($verparts[0] == 2 && $verparts[1] == 5 && $verparts[2] >= 31) { print "WARNING! Flex install not found, or unsupported Flex version.\n"; @@ -40,9 +40,9 @@ elsif (!-e $input) # get flex flags from make file my $makefile = dirname($input) . "/Makefile"; my ($mf, $make); -open($mf,$makefile); +open($mf, $makefile); local $/ = undef; -$make=<$mf>; +$make = <$mf>; close($mf); my $flexflags = ($make =~ /^\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : ''); @@ -55,24 +55,24 @@ if ($? == 0) # For reentrant scanners (like the core scanner) we do not # need to (and must not) change the yywrap definition. my $lfile; - open($lfile,$input) || die "opening $input for reading: $!"; + open($lfile, $input) || die "opening $input for reading: $!"; my $lcode = <$lfile>; close($lfile); if ($lcode !~ /\%option\sreentrant/) { my $cfile; - open($cfile,$output) || die "opening $output for reading: $!"; + open($cfile, $output) || die "opening $output for reading: $!"; my $ccode = <$cfile>; close($cfile); $ccode =~ s/yywrap\(n\)/yywrap()/; - open($cfile,">$output") || die "opening $output for reading: $!"; + open($cfile, ">$output") || die "opening $output for reading: $!"; print $cfile $ccode; close($cfile); } if ($flexflags =~ /\s-b\s/) { my $lexback = "lex.backup"; - open($lfile,$lexback) || die "opening $lexback for reading: $!"; + open($lfile, $lexback) || die "opening $lexback for reading: $!"; my $lexbacklines = <$lfile>; close($lfile); my $linecount = $lexbacklines =~ tr /\n/\n/; |