Repository navigation
Unexpected binary operator '+' with no preceding operand in regex #15565
Description
Activity
From @andk
Thread was started by John Imrie as "Bug or feature?" on
http://www.nntp.perl.org/group/perl.perl5.porters/2016/08/msg239352.htmlNot 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:
6798c95 is the first bad commit
commit 6798c95
Author: Karl Williamson <khw@cpan.org>
Date: Wed Feb 25 23:19:39 2015 -0700Change /(?[...]) 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: 6798c95
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
.--
andreasFrom @khwilliamson
Now fixed by
c333712
--
Karl WilliamsonThe RT System itself - Status changed from 'new' to 'open'
@khwilliamson - Status changed from 'open' to 'pending release'
From @khwilliamson
Thank you for filing this report. You have helped make Perl better.
With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.Perl 5.26.0 may be downloaded via:
https://metacpan.org/release/XSAWYERX/perl-5.26.0If you find that the problem persists, feel free to reopen this ticket.
@khwilliamson - Status changed from 'pending release' to 'resolved'
Migrated from rt.perl.org#129122 (status was 'resolved')
Searchable as RT129122$