Browse thread
[Caml-list] Str.string_match raising Invalid_argument "String.sub" in gc
-
neale-caml@w...
- Alain Frisch
- Markus Mottl
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Markus Mottl <markus@m...> |
| Subject: | Re: [Caml-list] Str.string_match raising Invalid_argument "String.sub" in gc |
On Wed, 22 Aug 2001, neale-caml@woozle.org wrote: > Hi, I'm converting over some examples from the Perl cookbook to learn > OCaml and help with the PLEAC project <http://pleac.sourceforge.net/>, > and I'm running into some strange behavior with the Str structure; > I think it's something to do with garbage collection. I think it might be more suitable to translate the PLEAC-examples to OCaml using the PCRE-library (Perl Compatible Regular Expressions): it's much easier to get things right (e.g. no problems with evaluation order as you just had - the PCRE is stateless). You also don't have to think Emacs-style with regular expressions. Furthermore, Perl supports regexp features that are not available in the Str-module: without the PCRE-library you'd have to write significantly more code for some PLEAC-examples. You can find the PCRE-library here: http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html 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