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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1AC61BC0A for ; Tue, 17 Apr 2007 21:28:21 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3HJSJPb023560 for ; Tue, 17 Apr 2007 21:28:20 +0200 Received: by wr-out-0506.google.com with SMTP id l58so1832904wrl for ; Tue, 17 Apr 2007 12:28:18 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bVJAu44EJOSSUtUk9bqaK6SJCSUJLNl89NzMY1o+fxLYuZf2ZFwCCA8g/MF9JinL/zIpFPo+Z9jFT7hrkU/0RnZ3/dZ0sMRyjD5wauVGfwDNzxX/KMU41XdEyIrdUQvgLUd/KewVu5wuLsrotatjqIQbhZuaB7TzKXjojHbPxD8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QfAQ/8MVyotYNwj+hGEWIleO1TcXpoX89TOEgs39f49hsil9WaPUxc4t28NNAKsVSl5/QiXsBv7gcmdtCPIcuTU1flhxyPEasVesQUiS3SXxoK4bA9Una1WvJ9Vit03jqsHQ+SYJxi7m7QKYO8phda2Qf5nY5QNHxxPzLxodM0Q= Received: by 10.114.126.1 with SMTP id y1mr2568589wac.1176838097528; Tue, 17 Apr 2007 12:28:17 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Tue, 17 Apr 2007 12:28:17 -0700 (PDT) Message-ID: Date: Tue, 17 Apr 2007 21:28:17 +0200 From: "Nicolas Pouillard" To: "Aleksey Nogin" , "Caml List" Subject: Re: 3.10.0+beta: Corrected and improved Camlp4MacroParser In-Reply-To: <46241F07.8090602@metaprl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4623DA8C.1000702@metaprl.org> <4623FD5F.30006@metaprl.org> <46241F07.8090602@metaprl.org> X-j-chkmail-Score: MSGID : 46251FD3.003 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 46251FD3.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 ifdef:01 ifdef:01 expr:01 ocaml-:01 cvs:01 cvs:01 wrote:01 wrote:01 corrected:01 corrected:01 define:01 define:01 handles:03 On 4/17/07, Aleksey Nogin wrote: > As I wrote to the list earlier, I have noticed that the > Camlp4MacroParser in 3.10.0+beta has an unfortunate problem - when > processing an "IFDEF" (or "IFNDEF") directive, it will execute the > "DEFINE"s in _both_ branches, regardless of whether the test is true or > not (this was caused by the fact that the DEFINE directives would be > executed eagerly at parse-time). > > Attached is a corrected and improved version of the Camlp4MacroParser: > > - Fixes the above problem; now the execution of the "DEFINE" directives > inside IFDEF/IFNDEF is correct. Ok > - Adds support for "local" definitions Cool, thanks. I've merged your fix with the current status of Camlp4MacroParser which now handles signature items and a more general -D= option. I've applied it to the CVS (release310 branch) that is now available from the public CVS repository. Since some changes have been applied to camlp4 since OCaml-3.10+beta release I suggest you to get the last version to do your porting work. Best regard and many thanks, -- Nicolas Pouillard