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 DBA52BC69 for ; Mon, 19 Mar 2007 11:53:58 +0100 (CET) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2JArv2K005166 for ; Mon, 19 Mar 2007 11:53:58 +0100 Received: by an-out-0708.google.com with SMTP id c24so1142590ana for ; Mon, 19 Mar 2007 03:53:57 -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=cQs8is8ftEqLwad2RaL037jwm3rgYWTJdYILZzVKIJFAmgnGNDGibVK8Yo3hhZhDcDGwm4LeH+3+0x8zw9XYWxyIVb9oy27CSA5MVpSB6I9+O1UwKkEWzJ1O37m8JYcyB9GjhOSb/GqYxVPM39lhUoCoUJHty9aqesMOyV0BV/8= 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=LlD3j1aSYIaB1rLGKvG0tN3xYHWDs2j4qLHqFLdFLFgFovHa+bXckQwhkGHxqc6BY1T8aCzdiXNz4Nt10VtOBRZN0ZgaDahnBJ8iAXvmygd0a5bdvHgeszcEtPMAoVWoSepKIM4d0bbaJh/W+uFQbfHrLhcDH2w3AIAwYEGRLRg= Received: by 10.100.164.14 with SMTP id m14mr3464777ane.1174301637497; Mon, 19 Mar 2007 03:53:57 -0700 (PDT) Received: by 10.100.154.6 with HTTP; Mon, 19 Mar 2007 03:53:57 -0700 (PDT) Message-ID: <6f9f8f4a0703190353p4d38ea32k30e1ad2a00f70f4@mail.gmail.com> Date: Mon, 19 Mar 2007 11:53:57 +0100 From: "Loup Vaillant" To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Where are the AST specs? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0703181022q2b9d7f8bt33919e07f3799c65@mail.gmail.com> <95513600703190145h5a0c6202t518ff61fcde83655@mail.gmail.com> <6f9f8f4a0703190217o5a975a78s16fe2be77825af01@mail.gmail.com> X-j-chkmail-Score: MSGID : 45FE6BC6.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45FE6BC6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 ifdef:01 camlp:01 ocaml:01 syntax:01 ocaml:01 caml-list:01 macros:01 define:01 ast:02 ast:02 btw:02 dynamic:03 macro:03 > BTW camlp4 provides a simple macro system through a dynamic syntax > extension. It features DEFINE, IFDEF, INDEF, and INCLUDE. Actually, I didn't meant C macros. > However camlp4 is itself a powerful way to manage the OCaml syntax as > AST through it's quotation system. That is what I meant. However, I want it as simple as possible. > Have you a simple specification of what you want for OCaml (or some examples). For instance, I woud have wanted (defun f x y z (+ x (* y z))) expanded into: (value f (fun (x y z) (+ x (* y z))) Through a simple macro. another example: (+ x y z) (plus (plus x y) z) I havent specified the macro system yet. I think I shoud wait untill i have written a reader. (And therefore specified an AST)