From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA09456; Wed, 22 Aug 2001 22:23:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA09583 for ; Wed, 22 Aug 2001 22:23:23 +0200 (MET DST) Received: from chopin.ai.univie.ac.at (chopin.ai.univie.ac.at [131.130.174.170]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7MKNMf29363 for ; Wed, 22 Aug 2001 22:23:22 +0200 (MET DST) Received: (from markus@localhost) by chopin.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) id WAA05240; Wed, 22 Aug 2001 22:23:17 +0200 Date: Wed, 22 Aug 2001 22:23:17 +0200 From: Markus Mottl To: neale-caml@woozle.org Cc: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] Str.string_match raising Invalid_argument "String.sub" in gc Message-ID: <20010822222317.A3521@chopin.ai.univie.ac.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from neale-caml@woozle.org on Wed, Aug 22, 2001 at 11:53:43 -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 , > 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