Re: [pcre-dev] Posix API and JIT

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] Posix API and JIT
On 11/16/2011 4:48 AM, Philip Hazel wrote:
> On Tue, 15 Nov 2011, Sheri wrote:
>
>> Have you considered supporting jit study in the posix interface? I see regexec
>> currently passes NULL study data to pcre_exec.
> I really don't see the point of hacking the POSIX interface in non-POSIX
> ways to add all the features of the native interface (such as study).
> The POSIX interface was added so that existing programs that use that
> interface could make use of PCRE in a basic fashion without changing
> their code. If they are going to change their code, they might as well
> move to the PCRE native interface and have done with it.
>
> Sorry if that sounds rather fierce. :-)
>
> Philip
>



Hi Philip,

If it were under my control, I'd do exactly that. But I am dealing with
a program (for which I do not have the source) that currently uses both
the native and POSIX interfaces. Not as a programmer but as a user.
Facility for jit study is being added to the newer stuff and there will
be a single jit allocation available to all jit-studied patterns.
Wholesale changing the older stuff to use the native interface has been
nixed. Adding calls to pcre_study and pcre_free_study would be more
acceptable, and the same jit stack could be used by both old and new.

Here's a minimal request, please let me know if feasible.

Suppose you added a regexec2 to the POSIX interface which passed study
data instead of NULL to pcre_exec. Couldn't the native pcre_study be
used to create study data based on the compiled pattern that was
regcomp'ed? Mixed interface for our older "global" regex'es?

Regards,
Sheri