On 4/25/07, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > I still have to finish the rest of my changes to the regexp engine > callbacks, this invoves: > > * Cleaning up and getting the current cleanup patch accepted Done (patch accepted) > * Finishing a patch to that makes %+, %- and $1, $2 .. fully magic. I've done $1, $2 (unapplied patch on the list) which was most of the work but I have %+ and %- left, this mostly involves moving code around. > What I want to do with the latter is to split the numbered_buff_get > and named_buff_get callbacks in the regexp_engine struct three > substructs. The first two implementing magic hash callbacks via a > MGVTBL (I think!) for %+ and %- (just like %ENV and %SIG) and the > third implementing STORE/FETCH and LENGTH for $`, $', $&, $1, $2. I've found that this won't work via a MGVTBL which only supports a limited subset of what a full hash needs to support, rather I'm going to keep %+ and %- as real tied hashes as they are currently but alter the currenty Tie::Hash::NamedBuffer/universal.c code to call into new regexp callbacks, I'll probably reimplement most if not all of NamedBuffer.pm in XS in the progress doing away with the need to load an external .pm file to get named match variables. I'm then going to start working on re::engine::Plugin and finish the engines I've started writing on top of it and there may be some follow-up patches to core resulting from that. But I've pretty much finished what I started which was to improve the API so that you could write arbitary engines on top of it, including Perl 6 rules engines.Thread Previous | Thread Next