in reply to Regex from XS
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regex from XS
by creamygoodness (Curate) on Apr 12, 2006 at 04:40 UTC |