Re: [pcre-dev] Some words about assertion docs

Páxina inicial
Borrar esta mensaxe
Autor: ph10
Data:  
Para: Zoltán Herczeg
CC: Pcre-dev, ND
Asunto: Re: [pcre-dev] Some words about assertion docs
On Sat, 13 Jul 2019, Zoltán Herczeg wrote:

> Somehow it doesn't feel right to call this new construct as an
> "assertion", which normally checks whether a condition is true. I
> think the nature of this new construct is closer to "script run" which
> adds an extra task after a bracket is matched.


Well, I think of it as a "multiple condition" - as if it is a vector of
conditions that are tried one by one.

> The task here is resetting the string pointer.


... which of course is the same as the existing assertions.

> I would also discuss this with perl folks, at least notify them.


Yes, perhaps I should email somebody, for their information.

> Anyway if my theory about "script run" is correct, implementing this
> in JIT will be easy.


It was trivial in the interpreter. At the end of the Perl assertions,
the code is "reset pointer, behave like the end of an atomic group". For
the new items, the code is "reset pointer, behave like the end of a
non-capture group" - in other words, just a few lines of code.

All the work was in setting it up!

Philip

--
Philip Hazel