rurban / re-engine-PCRE2

use pcre-jit instead of slow perl regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module broken on 5.37.8 - needs logical_nparens populated into regexp structure.

demerphq opened this issue · comments

In 5.37.8 we introduced logical_nparens as a complement to nparens. PCRE doesnt support branch reset properly so likely all you need to do is set the logical_nparens to nparens. I would push a PR for this, but i cant get Alien::PCRE2 to build right now.

See: Perl/perl5#20710

I'm hoping that's actually 5.37.8!

PR is fine, as the actions would test it then. If I would have added them already...

I don't have a patch yet. I cant get it to build on 5.37 at all. You are messing with internal functions and variables in a way you shouldnt be. I cant get it to build without sticking

#define PERL_EXT
#define PERL_EXT_RE_BUILD

so that it can get access to PL_core_reg_engine, and even then you are trying to use Perl_re_op_compile which is not an API function in perl and is no longer visible to extensions.

I am not sure what to do here.

The fundamental fix I wanted to apply was to make sure that re->logical_nparens = re->parens, but the other issues are getting in the way. I am not sure if we should mark Perl_re_op_compile as available to extensions, or API or what. I think for that you should file an issue with perl but i am not sure why you want to access this function anyway. It looks like you are trying to make PCRE fallback to Perl, so maybe that is a good justification.

Yes, I need to fallback, also in other re modules, such as hyperscan

Ok. I will push a patch to make this easier for you.