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

Página superior
Eliminar este mensaje
Autor: ND
Fecha:  
A: Pcre-dev
Asunto: 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.