Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] String.unescaped and some other little pitiful laments
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@m...>
Subject: Re: [Caml-list] String.unescaped and some other little pitiful laments
On Wed, 11 Jul 2001, Xavier Leroy wrote:
> So, this is a question to the developers of alternate regexp
> libraries: how hard would it be to implement an Str emulation on top
> of your libraries?  If you're interested, we can pursue this
> discussion by private e-mail.

Well, I somehow felt addressed by this request... ;)

It may seem that one would only have to rewrite Emacs-style patterns
to Perl-style ones to use my Pcre-interface. Unfortunately, there is
no way to stay backward compatible _and_ get rid of the statefulness,
because the interface of the Str-library just relies on the latter.
One could surely emulate this behaviour with not too much effort, but
the Str-library would still remain awfully stateful then (though it
would perform matching somewhat faster).

I think that in the long run there will be no way around declaring the
Str-interface obsolete. Especially for multi-threaded applications a
stateless regexp engine is really a requirement. The longer we keep this
interface, the more legacy code we will get...

If you want, just shamelessly grab the Pcre-library and adapt it to
your needs: it's LGPLed anyway. Though, I admit that I'd also like to
see a featureful and fast regexp-library purely written in OCaml rather
than one cowardly interfacing to existing C-libraries (would require
significantly more work).

If anybody wants to write a substitute for the Str- building on the
Pcre-library and needs some hints, just tell me. Unfortunately, I won't
have time to work on this issue in the near future...

Best regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr