Front page | perl.perl5.porters |
Postings from October 2000
[ID 20001029.005] Regex error: "cd. (A. Tw)" !~ /\((\w\. \w+)\)/
Thread Next
From:
jtobey
Date:
October 29, 2000 14:25
Subject:
[ID 20001029.005] Regex error: "cd. (A. Tw)" !~ /\((\w\. \w+)\)/
Message ID:
m13q0ur-000FObC@feynman.localnet
This is a bug report for perl from jtobey@john-edwin-tobey.org,
generated with the help of perlbug 1.28 running under perl v5.6.0.
-----------------------------------------------------------------
[Please enter your report here]
Here is a regex whose behavior changed from 5.005 to 5.6.0, and I
agree with the old behavior.
$ perl5.00503 -le 'die unless "cd. (A. Tw)" =~ /\((\w\. \w+)\)/; print "ok"'
ok
$ perl5.6.0 -le 'die unless "cd. (A. Tw)" =~ /\((\w\. \w+)\)/; print "ok"'
Died at -e line 1.
It still fails as of perl@7452, giving this -Dr output:
Compiling REx `\((\w\. \w+)\)'
size 14 first at 1
rarest char ) at 0
rarest char . at 0
synthetic stclass `ANYOF[(]'.
1: EXACT <(>(3)
3: OPEN1(5)
5: ALNUM(6)
6: EXACT <. >(8)
8: PLUS(10)
9: ALNUM(0)
10: CLOSE1(12)
12: EXACT <)>(14)
14: END(0)
anchored `. ' at 2 floating `)' at 5..2147483647 (checking anchored) stclass `AN
YOF[(]' minlen 6
Omitting $` $& $' support.
EXECUTING...
Guessing start of match, REx `\((\w\. \w+)\)' against `cd. (A. Tw)'...
Found anchored substr `. ' at offset 2...
Found floating substr `)' at offset 10...
This position contradicts STCLASS...
Looking for anchored substr starting at offset 3...
Found anchored substr `. ' at offset 6...
Contradicts floating substr `)', giving up...
Match rejected by optimizer
Died at -e line 1.
Freeing REx: `\((\w\. \w+)\)'
Whereas under 5.00503, -Dr shows:
compiling RE `\((\w\. \w+)\)'
size 14 first at 1
rarest char ) at 0
rarest char . at 0
1: EXACT <(>(3)
3: OPEN1(5)
5: ALNUM(6)
6: EXACT <. >(8)
8: PLUS(10)
9: ALNUM(0)
10: CLOSE1(12)
12: EXACT <)>(14)
14: END(0)
anchored `. ' at 2 floating `)' at 5..2147483647 (checking anchored) minlen 6
Omitting $` $& $' support.
EXECUTING...
Matching `\((\w\. \w+)\)' against `cd. (A. Tw)'
Setting an EVAL scope, savestack=3
0 <> <cd. (A. Tw)> | 1: EXACT <(>
Setting an EVAL scope, savestack=3
4 <cd. > <(A. Tw)> | 1: EXACT <(>
5 <cd. (> <A. Tw)> | 3: OPEN1
5 <cd. (> <A. Tw)> | 5: ALNUM
6 <cd. (A> <. Tw)> | 6: EXACT <. >
8 <cd. (A. > <Tw)> | 8: PLUS
ALNUM can match 2 times out of 32767...
Setting an EVAL scope, savestack=3
10 <cd. (A. Tw> <)> | 10: CLOSE1
10 <cd. (A. Tw> <)> | 12: EXACT <)>
11 <cd. (A. Tw)> <> | 14: END
ok
Please someone else look at the regex engine... :-)
-John
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl v5.6.0:
Configured by jtobey at Thu Mar 23 22:15:45 EST 2000.
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=linux, osvers=2.2.14pre16, archname=i686-linux
uname='linux feynman 2.2.14pre16 #1 thu dec 23 19:33:36 est 1999 i686 unknown '
config_args='-Doptimize=-g -O2 -fPIC -Dprefix=/usr/local -Dcc=gcc -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-g -O2 -fPIC', gccversion=2.95.2 20000220 (Debian GNU/Linux)
cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.6.0:
/usr/local/lib/perl5/5.6.0/i686-linux
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/i686-linux
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.5.670/i686-linux
/usr/local/lib/perl5/site_perl/5.5.670
/usr/local/lib/perl5/site_perl/5.5.660/i686-linux
/usr/local/lib/perl5/site_perl/5.5.660
/usr/local/lib/perl5/site_perl/5.5.650/i686-linux
/usr/local/lib/perl5/site_perl/5.5.650
/usr/local/lib/perl5/site_perl/5.005/i686-linux
/usr/local/lib/perl5/site_perl/5.005
/usr/local/lib/perl5/site_perl
.
---
Environment for perl v5.6.0:
HOME=/home/jtobey
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/jtobey/bin:/jtobey/local/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[ID 20001029.005] Regex error: "cd. (A. Tw)" !~ /\((\w\. \w+)\)/
by jtobey