caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Micmatch 0.666 (first release)
@ 2004-08-02 15:00 Martin Jambon
  0 siblings, 0 replies; only message in thread
From: Martin Jambon @ 2004-08-02 15:00 UTC (permalink / raw)
  To: caml-list

Dear Caml riders,

I would like to announce the first release of Micmatch.
Micmatch is an extension of the pattern matching of OCaml for matching
strings against regular expressions, following the style of ocamllex
regexps.

Here is an example of an interactive session:

# RE digit = ['0'-'9'] ;;
# RE letter = ['a'-'z' 'A'-'Z'] ;;
# RE word = letter (letter | '_' | digit)* ;;
# RE space = [' ' '\t' '\n' '\r'] ;;
# let say_hello l text =
    match l, text with
        (_, RE _* "name" space* "=" space* (word as name) space* ";")
      | (name :: _, _) ->
          print_endline ("Hello " ^ name)
      | _ ->
          invalid_arg "say_hello"
;;
val say_hello : string list -> string -> unit = <fun>
# say_hello ["Joe"; "Jack"] "id=123; name=Martin; end";;
Hello Martin
- : unit = ()
# say_hello ["Joe"; "Jack"] "id=123; name= ; end";;
Hello Joe
- : unit = ()


Documentation can be found here:
  http://martin.jambon.free.fr/micmatch.html

The package can be downloaded directly from here:
  http://martin.jambon.free.fr/micmatch.tar.gz


Have fun!


Martin

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-02 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-02 15:00 [Caml-list] Micmatch 0.666 (first release) Martin Jambon

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).