From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 47304BB9D for ; Mon, 12 Sep 2005 08:41:17 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8C6fGbI032343 for ; Mon, 12 Sep 2005 08:41:16 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id IAA27269 for ; Mon, 12 Sep 2005 08:41:16 +0200 (MET DST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8C6fFpD007574 for ; Mon, 12 Sep 2005 08:41:16 +0200 Received: from frontend1.internal (mysql-sessions.internal [10.202.2.149]) by frontend1.messagingengine.com (Postfix) with ESMTP id 287B0CCEF1B; Mon, 12 Sep 2005 02:41:14 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.151]) by frontend1.internal (MEProxy); Mon, 12 Sep 2005 02:41:14 -0400 X-Sasl-enc: GIiDN+thicY+sgS2I/AsSFp4aSI10cv2P/wOAM0ewlin 1126507272 Received: from [172.16.13.137] (burnham.ljcrf.edu [192.231.106.2]) by frontend2.messagingengine.com (Postfix) with ESMTP id 31941570364; Mon, 12 Sep 2005 02:41:10 -0400 (EDT) Date: Sun, 11 Sep 2005 23:40:02 -0700 (PDT) From: Martin Jambon X-X-Sender: martin@droopy To: Christophe Raffalli Cc: Martin Jambon , caml-list Subject: Re: [Caml-list] camlp4 char stream In-Reply-To: <43251497.1090905@univ-savoie.fr> Message-ID: References: <43249158.4070900@univ-savoie.fr> <43251497.1090905@univ-savoie.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at concorde with ID 4325230C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4325230B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 char:01 christophe:01 raffalli:01 grammar:01 parser:01 strm:01 npeek:01 strm:01 hendrik:01 tews:01 char:01 token:01 expander:01 2005,:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 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