From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 5923EBC0A for ; Mon, 21 May 2007 11:26:23 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.225]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4L9QMEu005716 for ; Mon, 21 May 2007 11:26:23 +0200 Received: by nz-out-0506.google.com with SMTP id l8so2089233nzf for ; Mon, 21 May 2007 02:26:22 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rWM89hN4jzf1JJDPb/ywTj2yvOOieWrlR7JY5KADZU3/gWAnPC33DOn2NhXFzv1sitQ8Le/t9oMJxNnVzfcUWUgUqnLOb7TN4azyoY1pJGrizio9jULJc4oLHU297Scybw8cqBI0gZxRL2YMAWNdUOF/EFzTSUgJwOnXWq8FLEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=S55bxV6ikrKjt92V9Ahg/5lY01LYXIJmTnv/UfbRymaYrFI3OVXGdCQEUP3A4v1sJpLhOs7eQFEpu47WVqB3cTRNuKPZyzAosvlecI92+jrLQu04hbuFPxWgBCtE7KLwbhz6VyrEaaKlv4jVg1C4JEJrHBzxYtSd4Eck/09XxgQ= Received: by 10.114.149.2 with SMTP id w2mr2589706wad.1179739581941; Mon, 21 May 2007 02:26:21 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Mon, 21 May 2007 02:26:21 -0700 (PDT) Message-ID: Date: Mon, 21 May 2007 11:26:21 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: [Caml-list] camlp4 3.10: What should this look like? Cc: "OCaml List" In-Reply-To: <8A1EBB03-0926-4C86-B1C8-5BE7B201A070@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8A1EBB03-0926-4C86-B1C8-5BE7B201A070@gmail.com> X-j-chkmail-Score: MSGID : 465165BE.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 465165BE.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 syntax:01 syntax:01 expr:01 expr:01 flags:01 flags:01 struct:01 wrote:01 token:01 caml-list:01 assert:01 match:02 string:02 On 5/21/07, Joel Reymont wrote: > What should this look like in the new camlp4 syntax? Something like (not tested): open Camlp4.PreCast;; open Syntax;; EXTEND Gram expr: LEVEL "top" [ [ "PGSQL"; "("; dbh = expr; ")"; extras = LIST1 STRING -> let query, flags = match List.rev extras with | [] -> assert false | query :: flags -> query, flags in pgsql_expand ~flags loc dbh (Camlp4.Struct.Token.Eval.string query) ] ]; END -- Nicolas Pouillard