develooper Front page | perl.perl5.porters | Postings from July 2018

Re: [perl #133352] Ancient Regex Regression

Thread Previous | Thread Next
From:
David Nicol
Date:
July 23, 2018 15:41
Subject:
Re: [perl #133352] Ancient Regex Regression
Message ID:
CAFwScO-pPwe4eLXfgN8fZZXvMDhnEZZZu-4PxjQAeGP-0B-SrQ@mail.gmail.com
On Sun, Jul 22, 2018 at 1:59 PM Deven T. Corzine <deven@ties.org> wrote:

> On Wed, Jul 18, 2018 at 2:00 PM, David Nicol <davidnicol@gmail.com> wrote:
>
> > When exactly does the assignment happen?
>
> It happens immediately and should be rolled back when backtracking.
> Right now, that's not happening when it should here.
>

how much performance impact would using a linked-list for every capture
have, to facilitate the rollback? Or, to stay within perl data, use an
array structure: instead of clobbering, unshift; roll back by shifting; at
the very end assign from [0] elements of all internal capture arrays.
Captures syntactically impossible to roll back (are there any?) would be
exempt, backreferences would refer to the current [0] elt of each capture
array, or the head of each capture linked-list.

-- 
"At this point, given the limited available data, certainty about only a
very small number of things can be achieved." -- Plato, and others

Thread Previous | 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