caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Streams
Date: Wed, 10 Apr 2002 13:03:14 +0200	[thread overview]
Message-ID: <20020410130314.I20228@verdot.inria.fr> (raw)
In-Reply-To: <200204091809.g39I9TV03521@demokrit.cas.mcmaster.ca>; from kahl@cas.mcmaster.ca on Tue, Apr 09, 2002 at 02:09:29PM -0400

Hi,

> let pc0 c = parser n
>   [< '  x
>         when x == c
>         ?? (string_of_int n ^ ": pc '" ^ String.make 1 c ^ "'")
>   >] -> ();;

The "??" is unuseful for the first element of a stream pattern, because
when it fails, it raises Stream.Failure, not Stream.Error. The "??"
introduces a parameter for Stream.Error. Your code is equivalent to:

  let pc0 c = parser n
    [< '  x
          when x == c
    >] -> ();;

It was an error that the OCaml version accepted the "??" for the first
element.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
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:[~2002-04-10 11:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F241eHu7RVLCMUWktUq0000fbc1@hotmail.com>
2002-04-09 18:09 ` [Caml-list] Cannot find Stream Parser Documentation Wolfram Kahl
2002-04-10 11:03   ` Daniel de Rauglaudre [this message]
2002-04-11 14:35     ` [Caml-list] Streams Wolfram Kahl
2006-08-10 10:51 Streams Error404
2006-08-10 11:40 ` [Caml-list] Streams Jonathan Roewen
2006-08-10 19:02   ` Chris King
2006-08-10 18:32 ` Martin Jambon
2006-08-11  0:00 ` Jon Harrop
  -- strict thread matches above, loose matches on Subject: below --
2002-07-05 23:05 [Caml-list] Re: generic programming Dave Berry
2002-08-02 14:49 ` [Caml-list] Streams Diego Olivier Fernandez Pons
2002-08-02 15:29   ` Alain Frisch
2002-08-03 14:19     ` Diego Olivier Fernandez Pons
2001-03-27  2:12 [Caml-list] Caml Development Kit Patrick M Doane
2001-03-27  3:15 ` Brian Rogoff
2001-03-27  6:48   ` [Caml-list] Streams Daniel de Rauglaudre
     [not found]     ` <3AC04E85.EE51D597@univ-savoie.fr>
2001-03-27  8:37       ` Daniel de Rauglaudre

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=20020410130314.I20228@verdot.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --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).