Front page | perl.perl5.porters |
Postings from March 2013
Re: Is this a /^*/ bug?
Thread Previous
|
Thread Next
From:
hv
Date:
March 26, 2013 19:51
Subject:
Re: Is this a /^*/ bug?
Message ID:
201303261838.r2QIcvu29644@crypt.org
Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
:> A bunch of stuff would fall over at runtime; in a small number of
:> cases that would highlight a bug that might not otherwise have been
:> found, or found as quickly; in most cases it will already have been
:> doing what was wanted, and people will either change the pattern to
:> something equivalent-but-legal (if a fixed pattern), or put in extra
:> (probably buggy) logic to detect and change to equivalent-but-legal
:> for a constructed pattern.
[...]
:> I say "probably buggy", because detecting this in the general case is
:> quite hard: I think you can't do it with anything short of a full
:> regexp parser.
:
:I did mean for the pattern compiler to detect this during REx program
:construction, when it creates a node for a quantifier, and finds its
:previous node to be some zero-width assertion construction. I did not
:mean doing it by way of some clumsy string matching against the pattern.
My "probably buggy" was referring to the workaround Joe Perl puts in when
his regexp construction code (which was working fine, but which he no longer
fully understands) starts dying after a perl upgrade. He *will* do that by
clumsy string matching against the pattern.
Hugo
Thread Previous
|
Thread Next