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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D93F5BC69 for ; Mon, 24 Sep 2007 17:24:14 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAG9z90bAXQInemdsb2JhbACOGQIJCg X-IronPort-AV: E=Sophos;i="4.20,292,1186351200"; d="scan'208";a="3179664" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 24 Sep 2007 17:24:14 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8OFODbh026830 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 24 Sep 2007 17:24:14 +0200 X-IronPort-AV: E=Sophos;i="4.20,292,1186351200"; d="scan'208";a="16702024" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail4-relais-sop.national.inria.fr with SMTP; 24 Sep 2007 17:24:13 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Mon, _d Sep 2007 17:23:45 +0200 From: "Nicolas Pouillard" Cc: "nicolas.pouillard" , "jake.donham" , caml-list Subject: Re: [Caml-list] ocamlbuild: args to tags? To: skaller References: <46F01294.7060806@skydeck.com> <1190636327-sup-9586@ausone.inria.fr> <1190642617.6025.9.camel@rosella.wigram> In-Reply-To: <1190642617.6025.9.camel@rosella.wigram> Date: Mon, 24 Sep 2007 17:23:45 +0200 Message-Id: <1190644392-sup-9865@ausone.inria.fr> User-Agent: Sup/0.1 Content-Type: text/plain; charset=utf-8 X-j-chkmail-Score: MSGID : 46F7D69D.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 46F7D69D.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0200,:01 syntax:01 ocaml:01 syntax:01 annotations:01 ocaml:01 wrote:01 preprocessor:01 incompatible:01 caml-list:01 define:02 aka:04 args:05 problem:05 tue:06 Excerpts from skaller's message of Mon Sep 24 16:03:37 +0200 2007: > On Mon, 2007-09-24 at 14:29 +0200, Nicolas Pouillard wrote: > > Excerpts from jake.donham's message of Tue Sep 18 20:01:56 +0200 2007: > > > Hi, > > > > > > Is there a way to pass arguments to a preprocessor via the _tags file? > > > > Yes, but that's not what you want. Moreover this feature is not really > > encouraged. > > Just my 2c .. I think all this stuff is wrong. I think it should be > done like this: Being able to specify things like syntax extensions in the same place can be very precious and not incompatible with an "in the file itself" way of doing so. > (* My Ocaml File .. *) > (*#Syntax Mycamlp4syn *) (* for compatibility *) > #syntax Mycamlp4syn; (* better *) This sounds like a good idea. That's not a new one and it was our first choice when designing ocamlbuild. However after some reflections we decided that one can first do _tags method and then provide a way to read tags from the file itself. The main problem with the solution with embedded tags is that one must at least define a how to read these annotations. This is not that easy since a .ml file can be a pre-processed file with a totally different syntax. One moreover don't want to only focus on OCaml files but also C files for instance. I hope this makes our first decision clear... Regards, -- Nicolas Pouillard aka Ertai