From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA17129; Fri, 12 Jul 2002 09:14:24 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA17305 for ; Fri, 12 Jul 2002 09:14:24 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6C7ENr10142 for ; Fri, 12 Jul 2002 09:14:23 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id JAA18645 for caml-list@inria.fr; Fri, 12 Jul 2002 09:14:23 +0200 Date: Fri, 12 Jul 2002 09:14:23 +0200 From: Daniel de Rauglaudre To: Caml List Subject: Re: [Caml-list] What's wrong with my parser ? Message-ID: <20020712091423.B18477@verdot.inria.fr> References: <20020712044121.3f253c69.nicolas.francois@free.fr> <86it3l3b3r.fsf@laurelin.dementia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <86it3l3b3r.fsf@laurelin.dementia.org>; from j.prevost@cs.cmu.edu on Thu, Jul 11, 2002 at 10:59:20PM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Thu, Jul 11, 2002 at 10:59:20PM -0400, John Prevost wrote: > And at this point, parse is called on [< >] again and it loops. > Unfortunately, I can't remember how to explicitly check for the end of > the stream It is not the point: even testing the end of the stream would not help, since the example did not reach the end of the stream, it took no token at all (no character at all) from the stream. > --and it's been removed from the O'Caml manual. It has been copied is in the Camlp4 manual, but perhaps not yet in the 3.04 version. http://caml.inria.fr/camlp4/manual/manual003.html However the module "Stream" is still part of the OCaml manual. To test the empty stream, call the parser Stream.empty: [< _ = Stream.empty >] -> -- 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