caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin_jambon@emailuser.net>
To: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
Cc: Martin Jambon <martin_jambon@emailuser.net>,
	caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] camlp4 char stream
Date: Sun, 11 Sep 2005 23:40:02 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0509112328520.5979@droopy> (raw)
In-Reply-To: <43251497.1090905@univ-savoie.fr>

On Mon, 12 Sep 2005, Christophe Raffalli wrote:

> OK, I found it (quote from your tutorial):
>
> let operator_rparen =
>  Grammar.Entry.of_parser gram "operator_rparen"
>    (fun strm ->
>       match Stream.npeek 2 strm with
> 	 | [("", s); ("", ")")] when is_operator s ->
> 	     begin
> 	       Stream.junk strm;
> 	       Stream.junk strm;
> 	       s
> 	     end
> 	 | _ -> raise Stream.Failure)
>
> OK, I read your tutorial, but did not get the point ... thks

It's not my tutorial, it's a page by Hendrik Tews.
And it's my mistake: you don't have access to the char stream like this, 
but to the token stream.

Why not define a quotation expander?


Martin

--
Martin Jambon, PhD
http://martin.jambon.free.fr


  reply	other threads:[~2005-09-12  6:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-11 20:19 Christophe Raffalli
2005-09-11 21:51 ` [Caml-list] " Martin Jambon
2005-09-12  5:39   ` Christophe Raffalli
2005-09-12  6:40     ` Martin Jambon [this message]
2005-09-12 13:27     ` Olivier Andrieu
2005-09-12 22:31     ` Pietro Abate

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.63.0509112328520.5979@droopy \
    --to=martin_jambon@emailuser.net \
    --cc=caml-list@inria.fr \
    --cc=christophe.raffalli@univ-savoie.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).