From: Ben Pfaff Date: Tue, 3 May 2005 05:05:08 +0000 (+0000) Subject: Fix generate.pl for Perl 5.6.1. X-Git-Tag: v0.4.0~102 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0beeb7830243e21c5444f0b4dd446057b44e24f;p=pspp-builds.git Fix generate.pl for Perl 5.6.1. --- diff --git a/src/ChangeLog b/src/ChangeLog index 0f983887..02b64b9c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Mon May 2 22:02:52 2005 Ben Pfaff + + * expressions/generate.pl: (get_token) Make use of /g + backward-compatible with Perl 5.6.1. + Sun May 1 23:00:19 2005 Ben Pfaff * var-display.c: (cmd_variable_alignment) Fix memory leak. diff --git a/src/expressions/generate.pl b/src/expressions/generate.pl index 9cfb07ed..9d753867 100644 --- a/src/expressions/generate.pl +++ b/src/expressions/generate.pl @@ -378,9 +378,9 @@ sub get_token { our ($line); lookahead (); return if defined ($toktype) && $toktype eq 'eof'; - $toktype = 'id', return - if ($token) = $line =~ /\G([a-zA-Z_][a-zA-Z_.0-9]*)/gc; - $toktype = 'int', return if ($token) = $line =~ /\G[0-9]+/gc; + $toktype = 'id', $token = $1, return + if $line =~ /\G([a-zA-Z_][a-zA-Z_.0-9]*)/gc; + $toktype = 'int', $token = $1, return if $line =~ /\G([0-9]+)/gc; $toktype = 'punct', $token = $1, return if $line =~ /\G([][(),*;.])/gc; if ($line =~ /\G=/gc) { $toktype = "expression";