[pcre-dev] Recursion with possessive quantifiers

Top Page
Delete this message
Author: ND
Date:  
To: Pcre-dev
New-Topics: Re: [pcre-dev] Recursion with possessive quantifiers
Subject: [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.