develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #132167] Error parsing regex set in perl 5.26.0

Thread Next
From:
James E Keenan via RT
Date:
September 27, 2017 01:43
Subject:
[perl #132167] Error parsing regex set in perl 5.26.0
Message ID:
rt-4.0.24-19807-1506476587-458.132167-15-0@perl.org
On Tue, 26 Sep 2017 10:19:07 GMT, j.imrie1@virginmedia.com wrote:
> Using Perl 5.26.0
> 
> The regex
> 
> qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b]))  ])/
> 
> Does not parse giving the error
> 
> Incomplete expression within '(?[ ])' in regex; marked by <-- HERE in
> m/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) <-- HERE   ])/
> 

This formulation of the bisect runner:

#####
perl Porting/bisect.pl --start=v5.24.0 --end=v5.26.0 -e '$pattern=qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b]))  ])/;'
#####

... pointed to the following commit.  Note the warning about the regex_sets feature being experimental.

#####
The regex_sets feature is experimental in regex; marked by <-- HERE in m/(?[ <-- HERE  ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b]))  ])/ at -e line 1.
HEAD is now at 2cb86ab regcomp.c: Typo, spacing in comment
good - zero exit from ./perl -Ilib -e $pattern=qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b]))  ])/;
c333712c4a550eeb3146b964d8508f772e294a49 is the first bad commit
commit c333712c4a550eeb3146b964d8508f772e294a49
Author: Karl Williamson <khw@cpan.org>
Date:   Wed Aug 31 17:05:45 2016 -0600

    PATCH: [perl #129122] regex sets syntax error
    
    This was caused by two statements being in the wrong order.  One should
    save something on the stack before changing it, not after.
    
    However fixing this led to the discovery of another bug in which an
    error case was failed to be detected.

:100644 100644 630cf2602d72e60cb7c297b468a13df45b5d5c26 e7e41ff2f5b5a99d4f3724b970607cb9bd571dfc M	regcomp.c
:040000 040000 7a74755f9e6b4b7f83a46d9d8a4b1cca2e4a0365 8d8933e3fa9a6d4f09e5a010b7f30ed7d227ca38 M	t
bisect run success
That took 1239 seconds.
#####

Thank you very much.
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=132167

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About