[pcre-dev] [Bug 2725] (*SKIP)(*F) within a (?(DEFINE)) does …

Page principale
Supprimer ce message
Auteur: admin
Date:  
À: pcre-dev
Anciens-sujets: [pcre-dev] [Bug 2725] New: (*SKIP)(*F) within a (?(DEFINE)) does not skip position
Sujet: [pcre-dev] [Bug 2725] (*SKIP)(*F) within a (?(DEFINE)) does not skip position
https://bugs.exim.org/show_bug.cgi?id=2725

--- Comment #4 from OnlineCop <onlinecop@???> ---
The language of pcre2pattern.3 states:

> (*SKIP)
>
> This verb, when given without a name, is like (*PRUNE), except that if the pattern is unanchored, the "bumpalong" advance is not to the next character, but to the position in the subject where (*SKIP) was encountered. (*SKIP) signifies that whatever text was matched leading up to it cannot be part of a successful match if there is a later mismatch.


> (*FAIL) in a group called as a subroutine has its normal effect: it forces an immediate backtrack.
> (*COMMIT), (*SKIP), and (*PRUNE) cause the subroutine match to fail when triggered by being backtracked to in a group called as a subroutine. There is then a backtrack at the outer level.


There is no mention of (*SKIP) or (*PRUNE) being unable to modify the bumpalong
of the outer level.

Perl appears to modify the bumpalong before the subroutine match fails, which
(like PCRE2) then causes a backtrack at the outer level.

I believe that all other verbs, including (*ACCEPT), are fine to stay as-is,
and the only change here being that (*SKIP) should be able to modify the outer
level's bumpalong advance.

--
You are receiving this mail because:
You are on the CC list for the bug.