Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #24762] *foo{THING} + ?: parsing error

0 views
Skip to first unread message

Jarkko Hietaniemi

unread,
Dec 27, 2003, 1:28:29 PM12/27/03
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by Jarkko Hietaniemi
# Please include the string: [perl #24762]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=24762 >

This is a bug report for perl from j...@iki.fi,
generated with the help of perlbug 1.34 running under perl v5.8.1.


-----------------------------------------------------------------
[Please enter your report here]

Try this:

*foo{CODE} ? 1 : 0

You'll get:

Search pattern not terminated ...

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
This perlbug was built using Perl v5.8.1 - Sat Sep 27 21:34:21 EEST 2003
It is being executed now by Perl v5.8.1 - Sat Sep 27 20:01:40 EEST 2003.

Site configuration information for perl v5.8.1:

Configured by aet at Sat Sep 27 20:01:40 EEST 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
uname='sunos sunya.hut.fi 5.8 generic_108528-21 sun4u sparc sunw,sun-fire-280r '
config_args='-deO -Dcc=cc -Dccname=cc -Dld=ld -Dlocincpth=/p/sys/db/include -Dloclibpth=/m/fs/work/work/lk/aet/perl-5.8.1/ccdb/lib -Dlibperl=libperl.a -Duseshrplib=false -Dusethreads=define -Duseithreads=define -Dbin=/v/sunos58_sparc/lang/perl/5.8.1/bin -Dbinexp=/v/sunos58_sparc/lang/perl/5.8.1/bin -Dinstallbin=/v/sunos58_sparc/lang/perl/5.8.1/bin -Dperlpath=/v/sunos58_sparc/lang/perl/5.8.1/bin/perl -Dinstallscript=/v/gen/lang/perl/5.8.1/bin -Dscriptdir=/v/gen/lang/perl/5.8.1/bin -Dscriptdirexp=/v/gen/lang/perl/5.8.1/bin -Darchlib=/v/sunos58_sparc/lang/perl/5.8.1/lib/public -Darchlibexp=/v/sunos58_sparc/lang/perl/5.8.1/lib/public -Dcf_email=a...@cc.hut.fi -Dinstallarchlib=/v/sunos58_sparc/lang/perl/5.8.1/lib/public -Dinstallman1dir=/v/gen/lang/perl/5.8.1/man/man1 -Dinstallman3dir=/v/gen/lang/perl/5.8.1/man/man3 -Dinstallprefix=/v/gen/lang/perl/5.8.1 -Dinstallprefixexp=/v/gen/lang/perl/5.8.1 -Dinstallprivlib=/v/gen/lang/perl/5.8.1/lib -Dinstallsitearch=/p/lang/perl-mod/sit!
e_perl -Dinstallsitebin=/p/lang/perl-mod/bin -Dinstallsitelib=/p/lang/perl-mod/site_perl -Dinstallusrbinperl=undef -Dmydomain=.hut.fi -Dpager=/p/bin/less -Dperladmin=a...@cc.hut.fi -Dprefix=/v/gen/lang/perl/5.8.1 -Dprefixexp=/v/gen/lang/perl/5.8.1 -Dprivlib=/v/gen/lang/perl/5.8.1/lib -Dprivlibexp=/v/gen/lang/perl/5.8.1/lib -Dsitearch=/p/lang/perl-mod/site_perl -Dsitearchexp=/p/lang/perl-mod/site_perl -Dsitebin=/p/lang/perl-mod/bin -Dsitebinexp=/p/lang/perl-mod/bin -Dsitelib=/p/lang/perl-mod/site_perl -Dsitelib_stem=/p/lang/perl-mod/site_perl -Dsitelibexp=/p/lang/perl-mod/site_perl -Dsiteprefix=/p/lang/perl-mod -Dsiteprefixexp=/p/lang/perl-mod -Dstartperl=#!/p/bin/perl'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -I/p/sys/db/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-D_REENTRANT -I/p/sys/db/include'
ccversion='Sun WorkShop 6 update 2 C 5.3 Patch 111679-12 2003/05/18', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6U2/lib -L/m/fs/work/work/lk/aet/perl-5.8.1/ccdb/lib '
libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/WS6U2/lib /m/fs/work/work/lk/aet/perl-5.8.1/ccdb/lib
libs=-lsocket -lnsl -lccdb -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -z ignore -z lazyload -z combreloc'
cccdlflags='-KPIC', lddlflags=' -G -z ignore -z lazyload -z combreloc -L/usr/lib -L/usr/ccs/lib -L/opt/SUNWspro/WS6U2/lib -L/m/fs/work/work/lk/aet/perl-5.8.1/ccdb/lib'

Locally applied patches:

---
@INC for perl v5.8.1:
/v/sunos58_sparc/lang/perl/5.8.1/lib/public
/v/gen/lang/perl/5.8.1/lib
/p/lang/perl-mod/site_perl
/p/lang/perl-mod/site_perl
/p/lang/perl-mod/site_perl
.

---
Environment for perl v5.8.1:
HOME=/u/vieraat/vieraat/jhi
LANG=C
LANGUAGE (unset)
LC_CTYPE=iso_8859_1
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/u/vieraat/vieraat/jhi/.bin:/u/vieraat/vieraat/jhi/.s:/c/bin:/p/bin:/p/adm/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/ccs/bin:/usr/lib:/etc:/lib:/usr/bin/X11:/usr/lib/acct:/usr/5bin:/u/vieraat/vieraat/jhi
PERL_BADLANG (unset)
SHELL=/bin/zsh

Rafael Garcia-Suarez

unread,
Dec 27, 2003, 6:41:00 PM12/27/03
to perl5-...@perl.org
Jarkko Hietaniemi (via RT) wrote:
>
> Try this:
>
> *foo{CODE} ? 1 : 0
>
> You'll get:
>
> Search pattern not terminated ...

Fixed by change #21986, which relevant part is :

==== //depot/perl/perly.y#52 (text) ====

@@ -477,7 +477,8 @@
subscripted: star '{' expr ';' '}' /* *main::{something} */
/* In this and all the hash accessors, ';' is
* provided by the tokeniser */
- { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); }
+ { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3));
+ PL_expect = XOPERATOR; }
| scalar '[' expr ']' /* $array[$element] */
{ $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); }
| term ARROW '[' expr ']' /* somearef->[$element] */


0 new messages