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 WAA20229; Sun, 19 Sep 2004 22:41:09 +0200 (MET DST) 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 WAA18566 for ; Sun, 19 Sep 2004 22:41:08 +0200 (MET DST) Received: from venus.is.s.u-tokyo.ac.jp (venus.is.s.u-tokyo.ac.jp [133.11.12.9]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i8JKf6UG013672 for ; Sun, 19 Sep 2004 22:41:07 +0200 Received: from tuba.is.s.u-tokyo.ac.jp (tuba.is.s.u-tokyo.ac.jp [133.11.12.102]) by venus.is.s.u-tokyo.ac.jp (8.11.6p3/3.7W) with ESMTP id i8JKf4704609 for ; Mon, 20 Sep 2004 05:41:04 +0900 (JST) Received: (from oiwa@localhost) by tuba.is.s.u-tokyo.ac.jp (8.11.6+Sun/3.7W) id i8JKf4A04134; Mon, 20 Sep 2004 05:41:04 +0900 (JST) X-Authentication-Warning: tuba.is.s.u-tokyo.ac.jp: oiwa set sender to oiwa@yl.is.s.u-tokyo.ac.jp using -f To: caml-list@inria.fr Subject: [Caml-list] [ann] Regexp library supporting binding for * and +'s MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable From: Yutaka OIWA Date: Mon, 20 Sep 2004 05:41:04 +0900 Message-ID: User-Agent: T-gnus/6.15.6 (based on Oort Gnus v0.06) (revision 01) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.2 Emacs/20.7 (sparc-sun-solaris2.8) MULE/4.0 (HANANOEN) X-Miltered: at concorde with ID 414DEEE2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; yutaka:01 oiwa:01 oiwa:01 u-tokyo:01 caml-list:01 2004:99 combinators:01 matcher:01 regexps:01 combinator:01 combinators:01 mismatch:01 matcher:01 statically:01 svn:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi everyone at caml-list, =46rom the computer room at ICFP2004 in Snowbird Resort, I announce a beta version of my combinator-based regular-expression match library which supports list (Kleene-*) binding. This library provide a set of typed "combinators" which can be used to construct "regular expression matcher", which tests strings against regexps and capture the matched substring in various ways. Especially, powerful "repeat" combinator, which corresponds to * and + operators in conventional regular expression notation, returns all values captured inside as a list value. For example, the small code below open Regexp_pp_ng let s =3D "1 2 3 4 5" in match_string s (repeat ~sep:spacesA int_decimal) (fun x -> x) returns [1; 2; 3; 4; 5]: int list. All combinators are given static types and any mismatch of value types and matcher types are statically rejected. The implementation is available from a subversion repository. Using subversion, you can checkout the URL https://www.oiwa.jp/svn/regexp-ocaml/branches/combinators/ to get the up-to-date implementation, or you can directly access the above address by web browsers to see the latest revision. There is also a ViewCVS interface at the following address. http://www.oiwa.jp/viewcvs/regexp-ocaml/branches/combinators/ See regexp_pp_ng.mli for interfaces, and regexp_pp_ng_test.ml for some example of the use of this library. It may work partially on some older OCaml, but for real use it requires a newer version (3.07 or later) which supports the relaxed value restriction. I plan to construct a neat syntax sugar over this library=20 and build a next-generation version of Regexp/OCaml library. Any comments are welcome. --=20 Yutaka Oiwa Yonezawa Lab., Dept. of Computer Science, Graduate School of Information Sci. & Tech., Univ. of Tokyo. , PGP fingerprint =3D C9 8D 5C B8 86 ED D8 07 EA 59 34 D8 F4 65 53 61 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners