earthquake changes of std.regexp to come

Jarrett Billingsley jarrett.billingsley at gmail.com
Tue Feb 17 11:57:17 PST 2009


On Tue, Feb 17, 2009 at 2:47 PM, Daniel de Kok <me at danieldk.org> wrote:
> On Tue, Feb 17, 2009 at 8:39 PM, BCS <ao at pathlink.com> wrote:
>> For what it's worth, I have a partial clone of the .NET API built on top of
>> PCRE. I would have to ask my boss but I expect I could donate it if anyone
>> want to use it as a basis.
>
> Actually, I was wondering why nobody is considering real regular
> languages anymore, that can be compiled to a normal finite state
> recognizer or transducer. While this may not be as fancy as Perl-like
> extensions, they are much faster, and it's easier to do fun stuff such
> as composition.

Tango's regex engine is just that.  It uses a tagged NFA method.
http://www.dsource.org/projects/tango/docs/current/tango.text.Regex.html

The problem with this method is that while it's certainly faster to
match, it's MUCH slower to compile.  There are no pathological
matches; only pathological compiles ;)  I'm talking 60-70 seconds to
compile a more complex regex.  This might be an acceptable tradeoff
for when you need to compile a regex in a long-running app like a
server, but it's completely unacceptable for most small, Perl-like
text munging programs.

Unless of course this slowdown is unique to Tango's implementation of
this method!



More information about the Digitalmars-d mailing list