* Joshua Hoblitt ([EMAIL PROTECTED]) [22 Jun 2003 15:17]: [...] > [...] (this is directly related to my drooling over > the DISPATCH method in p6. :) It goes something like this: In > addition to a "label" a "group" tag can be assigned. If a parser is > passed a key called, for example, DISPATCH that points to a coderef > it's called before any matching is attempted. If the coderef returns > an undef matching proceeds as usual. If a string or array of a group > tag(s) is returned then only those group(s) are called. Matching by > length could even happen inside of those groups. The hope is that > this can provide a speed up for groups of variable length Regex's.
I've just checked some experimental code into CVS. Take a read of t/dispatch.t and lib/DateTime/Format/Builder/Parser/Dispatch.pm (damn these paths are getting long). Something like that? cheers, -- Iain.
