Front page | perl.perl5.porters |
Postings from August 2016
[perl #129122] Unexpected binary operator '+' with no precedingoperand in regex
Thread Previous
From:
perlbug-followup
Date:
August 29, 2016 05:00
Subject:
[perl #129122] Unexpected binary operator '+' with no precedingoperand in regex
Message ID:
rt-4.0.24-9895-1472446819-892.129122-75-0@perl.org
# New Ticket Created by (Andreas J. Koenig)
# Please include the string: [perl #129122]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=129122 >
Thread was started by John Imrie as "Bug or feature?" on
http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg239352.html
Not everybody can reproduce. I could with this program up to current
blead (v5.25.4-22-g2b6a5bf):
no warnings qw<experimental>;
use experimental qw<regex_sets>;
$q = qr/(?[ ( ( [ABC] - [B] ) + ( [abc] - [b] ) ) + [def] ])/;
$r = qr/(?[ ( [ABC] - [B] ) + ( [abc] - [b] ) + [def] ])/;
Bisected to:
6798c95dd27b33efd71f394c18649af7bbaf42b7 is the first bad commit
commit 6798c95dd27b33efd71f394c18649af7bbaf42b7
Author: Karl Williamson <khw@cpan.org>
Date: Wed Feb 25 23:19:39 2015 -0700
Change /(?[...]) to have normal operator precedence
This experimental feature now has the intersection operator ("&") higher
precedence than the other binary operators.
perl -V
-------
Summary of my perl5 (revision 5 version 21 subversion 10) configuration:
Commit id: 6798c95dd27b33efd71f394c18649af7bbaf42b7
Platform:
osname=linux, osvers=4.3.0-1-amd64, archname=x86_64-linux-thread-multi-ld
uname='linux k83 4.3.0-1-amd64 #1 smp debian 4.3.3-7 (2016-01-19) x86_64 gnulinux '
config_args='-Dprefix=/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d -Dmyhostname=k83 -Dinstallusrbinperl=n -Uversiononly -Dusedevel -des -Ui_db -Dlibswanted=cl pthread socket inet nsl gdbm dbm malloc dl ld sun m crypt sec util c cposix posix ucb BSD gdbm_compat -Duseithreads -Duselongdouble -DDEBUGGING=-g'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
use64bitint=define, use64bitall=define, uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion='', gccversion='5.3.1 20160121', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', lseeksize=8
alignbytes=16, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.21.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.21'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_LOCALE
USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_LONG_DOUBLE
USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API
Built under linux
Compiled at Aug 29 2016 06:55:01
@INC:
/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/site_perl/5.21.10/x86_64-linux-thread-multi-ld
/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/site_perl/5.21.10
/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/5.21.10/x86_64-linux-thread-multi-ld
/home/sand/src/perl/repoperls/installed-perls/perl/v5.21.9-342-g6798c95/109d/lib/5.21.10
.
--
andreas
Thread Previous