Re: [pcre-dev] Proposal for a new API for PCRE

Startseite
Nachricht löschen
Autor: Giuseppe D'Angelo
Datum:  
To: pcre exim
Betreff: Re: [pcre-dev] Proposal for a new API for PCRE
On 27 August 2013 14:16, <ph10@???> wrote:
>
> This is still just a proposal. It is not yet fixed; indeed there are
> some questions in the document about alternative ways of doing things.
> All comments and suggestions on this proposal are welcomed. Please post
> them to the list so that everybody can join in the discussion. There is
> no great hurry, but we do want to keep the process moving.


The proposal looks great. I do like the OO approach.

First questions that pop in my mind:

- Why making PCRE_EXTRA on by default? That will break exiting
patterns (which albeit "dangerous" do work, then will suddently not
work any more...)

- Given that JIT-compiling has a cost, in PCRE1 one could compile the
pattern normally and then, if it was going to be used a lot of times,
study it with the JIT option. This somehow split the load of normal
compiling and JIT compiling. What will happen in PCRE2? One will have
to compile normally, then delete the compiled pattern, and recompile
it ("from scratch"?) with the JIT option? Is that going to cost more?

- Is there a way to detect if a pattern is JIT-compiled? Currently I
do use this feature to detect if pcre_exec failed due to stack
exhaustion (and thus allocate a bigger JIT stack -- of course this
makes sense only if the pattern is JITted)

Thank you all for the great work,
--
Giuseppe D'Angelo