Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertio…

Góra strony
Delete this message
Autor: ND
Data:  
Dla: Pcre-dev
Temat: Re: [pcre-dev] (*SKIP:NAME) when (*MARK:NAME) is in assertion
On 2018-07-14 07:16, ph10 wrote:

> >> Why it need to backtrack?
> > Why not do a "bumpalong" advance to the next starting character strait
> away?
>It has to backtrack to the *MARK because that is where the bumpalongdata
> is remembered. There may be many *MARKs, each with a differentname. You
> can't just keep a single data item.
>


I think this is something weird here: PCRE during matching process have
information about all passed MARK names and MARK positions. Information
about MARK names is somewhere nearby and can be easily retrieved.
Information about MARK positions is saved somewhere deep and can be
retrieved only by backtracking. If no backtracking available then there is
no way to access information.

It seems instead of maintaining only MarkNames PCRE can maintain a table
with MarkName-MarkPosition pares. And so not have need to backtrack to
access MARK position data. And not loose MarkPosition information.