[pcre-dev] Recursion with possessive quantifiers

Pàgina inicial
Delete this message
Autor: ND
Data:  
A: Pcre-dev
Assumptes nous: Re: [pcre-dev] Recursion with possessive quantifiers
Assumpte: [pcre-dev] Recursion with possessive quantifiers
Hi, Philip!

When a possessive quantifier applyed to expression for example
(?:<EXPR>)*+
then recursion occurs and its value is equal to the number of sequential
<EXPR> in input string.
Why recurtion is so big? It seems there is no need to keep all
intermediate backtrack points because PCRE have no possibility to return
to them. Perhaps PCRE need to keep only one last point for backtracking to
it if following peace of input string don't match <EXPR>.

May be this is a way for optimization?

Thanx.