caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Regexp libraries
@ 2002-02-10  9:00 Francois Rouaix
  2002-02-11  1:49 ` Markus Mottl
  2002-02-13 14:23 ` Jerome Vouillon
  0 siblings, 2 replies; 3+ messages in thread
From: Francois Rouaix @ 2002-02-10  9:00 UTC (permalink / raw)
  To: caml-list

Hi all,
I'm cleaning up some old code of mine that uses regexps quite heavily...
Since those days where we only had Str, it seems that I now have the
choice between at least Pcre and Libre. Would anyone care to give their
opinion on those ? I'd like to get rid of Str because of the threads
issues (and bugs with large input). I've used Pcre a bit, but would like
to go to an all-Ocaml solution because of Win2k porting requirements.
However, the Libre documentation is inexistant (the .mli files contains
barely more than the types).
Would somebody on the list, that has knowledge of the library (Jerome
?), be willing to enhance the Libre docs a tiny bit ?
--f
François Rouaix




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Regexp libraries
  2002-02-10  9:00 [Caml-list] Regexp libraries Francois Rouaix
@ 2002-02-11  1:49 ` Markus Mottl
  2002-02-13 14:23 ` Jerome Vouillon
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Mottl @ 2002-02-11  1:49 UTC (permalink / raw)
  To: caml-list

On Sun, 10 Feb 2002, Francois Rouaix wrote:
> I'm cleaning up some old code of mine that uses regexps quite heavily...
> Since those days where we only had Str, it seems that I now have the
> choice between at least Pcre and Libre. Would anyone care to give their
> opinion on those ? I'd like to get rid of Str because of the threads
> issues (and bugs with large input). I've used Pcre a bit, but would like
> to go to an all-Ocaml solution because of Win2k porting requirements.
> However, the Libre documentation is inexistant (the .mli files contains
> barely more than the types).
> Would somebody on the list, that has knowledge of the library (Jerome
> ?), be willing to enhance the Libre docs a tiny bit ?

I am currently also brushing up documentation of the Pcre-library and
other software, more precisely: switching to ocamldoc-style. I'll put
it online very soon.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Regexp libraries
  2002-02-10  9:00 [Caml-list] Regexp libraries Francois Rouaix
  2002-02-11  1:49 ` Markus Mottl
@ 2002-02-13 14:23 ` Jerome Vouillon
  1 sibling, 0 replies; 3+ messages in thread
From: Jerome Vouillon @ 2002-02-13 14:23 UTC (permalink / raw)
  To: Francois Rouaix; +Cc: caml-list

On Sun, Feb 10, 2002 at 01:00:18AM -0800, Francois Rouaix wrote:
> I'm cleaning up some old code of mine that uses regexps quite heavily...
> Since those days where we only had Str, it seems that I now have the
> choice between at least Pcre and Libre. Would anyone care to give their
> opinion on those ? I'd like to get rid of Str because of the threads
> issues (and bugs with large input). I've used Pcre a bit, but would like
> to go to an all-Ocaml solution because of Win2k porting requirements.
> However, the Libre documentation is inexistant (the .mli files contains
> barely more than the types).

Here is a list of disavantages and advantages of RE compared to Pcre.

Disavantages
- The pattern compilation is more costly
- Not fully thread safe (you cannot simultaneously use the same
  pattern in different threads)
- Slower than Pcre when compiled to bytecode
- Lot of missing features : back-references, look-ahead and
  look-behind assertions, ...

Avantages
- Choice between different matching semantics
  (first match, longuest match, shortest match)
- Regular expression can be combined using operators such as union or
  concatenation
- Much faster than Pcre once start-up time is amortized
- All regular expression are executed at the same speed once start-up
  time is amortized, so you don't have to do any performance tweaking.

> Would somebody on the list, that has knowledge of the library (Jerome
> ?), be willing to enhance the Libre docs a tiny bit ?

I should really take the time to write a documentation.  But I don't
have the time at the moment...

Patrick Doane has contributed a pretty large test suite (located in
tests/test_*.ml).  This test suite may help you understand the library.

-- Jerome
-------------------
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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-02-13 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-10  9:00 [Caml-list] Regexp libraries Francois Rouaix
2002-02-11  1:49 ` Markus Mottl
2002-02-13 14:23 ` Jerome Vouillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).