go ahead... be a heretic | |
PerlMonks |
Re: Regex from XSby hv (Prior) |
on Apr 10, 2006 at 00:37 UTC ( [id://542197]=note: print w/replies, xml ) | Need Help?? |
I haven't tried to do this, but I'd start by unravelling the code in pp_hot.c:pp_match(), and see if you can extract from that the infrastructure you need. The guts is incorporated in the CALLREGEXEC() macro, which (via a pluggable hook, used by the re module) makes its way to regexec.c:Perl_regexec_flags() where the actual match happens - the regexp compile already happens before this - and setting things up correctly before that call is the critical bit. It would certainly help if you can find prior art - if you have a greppable CPAN mirror handy, a search for CALLREGEXEC and/or regexec_flags should tell you if there is any to be found there. Time permitting, I'd be happy to help debug any problems you run into, feel free to give me a shout. Hugo
In Section
Seekers of Perl Wisdom
|
|