Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Martin Jambon <martin_jambon@emailuser.net>
To: caml-list@inria.fr
Subject: [Caml-list] Micmatch 0.666 (first release)
Date: Mon, 2 Aug 2004 23:00:54 +0800 (HKT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0408022243430.10469-100000@localhost> (raw)

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


                 reply	other threads:[~2004-08-02 15:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0408022243430.10469-100000@localhost \
    --to=martin_jambon@emailuser.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox