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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 021C6BC6B for ; Wed, 25 Jul 2007 10:30:00 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6P8TwgC027206 for ; Wed, 25 Jul 2007 10:29:59 +0200 Received: by nz-out-0506.google.com with SMTP id x7so92211nzc for ; Wed, 25 Jul 2007 01:29:58 -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=lcUvrhyU3TH9CzGLYiwPRmzUXman4fssVkSKKyxg0Z9Lu+CiRWbWadzPgVpJK9XseBwhA1d3qj0iVSXpqkfUIdTMRrlV0upxY7hCd4IVQKzjGZzT9dhx0O9g8Ids0wfYsCw6WQoB/oaR232QEhQERuvKAWOj451OhrAbbbz69jI= 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=ABknND/QAwArZ9PqesH/o7oo98Mk6zwAjdvcLXARO2XBxIvpc7Ear1p4LFR02iqyQOhFvvn7K9O58ymjCk7+RVEir8puD9yKjdBviA2bYgeDBAeWCPZqGddarcrY54oxYuU8nBTWJnavaZW/lNTHx7txOCGeE0mFnKWvf8blOow= Received: by 10.115.93.16 with SMTP id v16mr397426wal.1185352198119; Wed, 25 Jul 2007 01:29:58 -0700 (PDT) Received: by 10.114.181.9 with HTTP; Wed, 25 Jul 2007 01:29:58 -0700 (PDT) Message-ID: Date: Wed, 25 Jul 2007 10:29:58 +0200 From: "Nicolas Pouillard" To: "Christophe Raffalli" Subject: Re: [Caml-list] camlp4 questions Cc: caml-list@yquem.inria.fr In-Reply-To: <46A478DA.8010806@univ-savoie.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46A478DA.8010806@univ-savoie.fr> X-j-chkmail-Score: MSGID : 46A70A07.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46A70A07.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 camlp:01 bug:01 expr:01 expr:01 node:01 node:01 bytecode:01 bytecode:01 cmo:01 On 7/23/07, Christophe Raffalli wrote: > > Dear list members, > > I am finishing to port binlib to camlp4 of 3.10 and have a few problems > left : > > 1) a bug in my extension, I have: > [...] > produces the following error message: > > File "programs.ml", line 1259, characters 1-48: > Failure: "expr, expr: not allowed here" > Preprocessor error This is because a comma node as been encountered << $_$, $_$ >> without it's surrounding tuple node << ($tup:_$) >>. In other words you have to put more parenthesis in your extension. > 2) with 3.09 I used to produce a bytecode similar to camlp4o with my > extension buildin. I could not find > the proper line to compile this bytecode (I tried to copy the compile > line of camlp4o and to add > pa_bindlib.cmo somewhere, but I failed) Jeremy Yallop has explained this in a previous email [1] while building deriving, it will be soon integrated to the documentation. [1]: http://caml.inria.fr/pub/ml-archives/caml-list/2007/06/a568d6eb0631a9a4ea0542109695a76f.fr.html > 3) I like the fact that my new delimiter "(^", "^)", ... are now > supported by the standard lexer of camlp4, But I think > that spaces should not be mandatory between delimiters and therefore, > keywords should only be allowed to contain > one "(", "{" or "[" at the beginning and/or one ")","}","]" at the end. > Still, I prefer the 3.10 version needing a few extra spaces that having > to rewrite my own lexer. I don't know how to do that without breaking any existing OCaml source code. Regards, -- Nicolas Pouillard