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

Re: [perl #133366] *COMMIT bug?

Thread Previous | Thread Next
From:
ph10
Date:
July 16, 2018 11:03
Subject:
Re: [perl #133366] *COMMIT bug?
Message ID:
5019_1531739005_5B4C7B79_5019_52_1_alpine.LNX.2.20.1807161156430.9705@quercite
On Mon, 16 Jul 2018, Abigail wrote:

> Can't we make it so that the mere presence of a "(*COMMIT)" disables
> this optimization?

I thought about doing something similar for PCRE, where starting a 
pattern with (*COMMIT) (that is, force match at starting position) 
really needs to disable the "skip rapidly ahead to the first matching 
character before looking at the pattern" optimization. However, always
disabling this optimization when *COMMIT is present is overkill, because
if it appears later in the pattern there is no problem. Maybe there's a
similar consideration in Perl? [In the PCRE case, one can actually make 
this out to be a feature - "commit at first matching character" instead 
of "commit where you start looking" - and there is a switch to turn the 
optimization off.]

This is all annoyingly messy.

Regards,
Philip

-- 
Philip Hazel

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