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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1DFBABB9D for ; Mon, 12 Sep 2005 07:39:42 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8C5dfKZ003352 for ; Mon, 12 Sep 2005 07:39:41 +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 HAA25700 for ; Mon, 12 Sep 2005 07:39:41 +0200 (MET DST) Received: from smtp.cegetel.net (mf00.sitadelle.com [212.94.174.67]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j8C5deRu003344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 12 Sep 2005 07:39:40 +0200 Received: from [192.168.144.2] (unknown [84.5.107.164]) by smtp.cegetel.net (Postfix) with ESMTP id 8F52B1A441B; Mon, 12 Sep 2005 07:39:36 +0200 (CEST) Message-ID: <43251497.1090905@univ-savoie.fr> Date: Mon, 12 Sep 2005 07:39:35 +0200 From: Christophe Raffalli User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: fr, en MIME-Version: 1.0 To: Martin Jambon Cc: caml-list Subject: Re: [Caml-list] camlp4 char stream References: <43249158.4070900@univ-savoie.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4325149D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4325149C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 caml-list:01 char:01 grammar:01 parser:01 strm:01 npeek:01 strm:01 char:01 tews:01 ...: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 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 and what is the first member of the tuple ? Why is the second member a string and not a char ? > > See paragraph "Do it yourself" at > http://wwwtcs.inf.tu-dresden.de/~tews/ocamlp4/camlp4-undoc.html#power > > > > Martin > > -- > Martin Jambon, PhD > http://martin.jambon.free.fr