caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Michel Schinz <Michel.Schinz@epfl.ch>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Some sugar for regexp matching using camlp4
Date: 17 Jul 2001 13:45:10 +0200	[thread overview]
Message-ID: <yors3d7vwzi1.fsf@lamppc21.epfl.ch> (raw)
In-Reply-To: <20010716175406.A25317@pauillac.inria.fr>

Francois Pottier <Francois.Pottier@inria.fr> writes:

> Hello all,

[...]

> This is of course pretty modest, but it seems that, with a small
> number of such constructs, O'Caml could be turned into a rather nice
> textual manipulation language. (Something often requested on this
> list.) Opinions and further suggestions are welcome.

You might want to look at scsh[1] (my standard suggestion for this
list, it seems). The construct you implemented also exists in scsh,
under the name "let-match" (see page 134 of the scsh manual [2]). Many
other constructs are supported, like "if-match" (similar to let-match
but with a clause to be evaluated when the regular expression does not
match), "match-cond" (tries several regular expressions until one
matches) and so on.

Also very interesting in scsh is the sexp-based notation for regular
expressions (pages 112-... of [2]).

[1] http://www.swiss.ai.mit.edu/ftpdir/scsh/
    and http://sourceforge.net/projects/scsh/
[2] ftp://ftp-swiss.ai.mit.edu/pub/su/scsh/scsh-manual.ps

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


  parent reply	other threads:[~2001-07-17 11:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 15:54 Francois Pottier
2001-07-16 17:37 ` Alexander V. Voinov
2001-07-17  2:36   ` Brian Rogoff
2001-07-17 10:36 ` Markus Mottl
2001-07-17 12:15   ` Francois Pottier
2001-07-17 12:39     ` Markus Mottl
2001-07-17 12:44       ` Daniel de Rauglaudre
2001-07-17 12:52         ` Markus Mottl
2001-07-17 11:45 ` Michel Schinz [this message]
2001-07-17 12:18   ` Francois Pottier

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=yors3d7vwzi1.fsf@lamppc21.epfl.ch \
    --to=michel.schinz@epfl.ch \
    --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;
as well as URLs for NNTP newsgroup(s).