On 21 Mar 02 at 12:55:07AM, Michel J Lambert wrote:
> And coming soon...a regex compiler! Compile down regexes from their
> perl-interpreted based environment to native C code under the hood. While
> there is little benefit on simple regexes /abc/, there can be an order of
> magnitude improvement as the regexes get more complex. For now, I've only
> implemented character classes, anchors and the various quantifiers
> working. But hopefully it shouldn't be too hard to implement the various
> others. (I think lexically scoped variable access from within (?{}) will
> be impossible, unless I have perl6's getcallernamespace). More info on
> this to come soon.
There is a "Perl-compatible Regular Expression" (PCRE) library around,
used by all those languages that say they use "Perl's regular
expressions". You could provide a Perl wrapper for using them, I
suppose, but it wouldn't be as much fun, would it?
Of course, if you did this, as soon as another feature got added to
Perl's regex engine, yours would be a crippled version, just like all
those wannabe languages...
Ian