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.0 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 CC6F1BC69 for ; Mon, 11 Jun 2007 10:05:54 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5B85rc9031786 for ; Mon, 11 Jun 2007 10:05:54 +0200 Received: by wr-out-0506.google.com with SMTP id i28so13322wra for ; Mon, 11 Jun 2007 01:05:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=nq0/y227iN02o+OUUvILT7XcaqNsIxtzL0S+zWKh4fgLts/13Q6QpCKgMT1hz2okLqED1Zp4/WqaYKN029kkkrXiBcq9PuDKNATfm7FPUFO8E8L47wjGuyouOyR51A4Oxv/CMqDQ5psbY7fRLBEq4Wm/0HZOlu/T4cWO6gW3L3w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=l9JlatYOD3JegleZqz6AMWsCAOH2maUvp59tJ9WrS7z2Al/SzC71xgLifD7G87T8oAmm5XdC5JQ3V8jJT07mJhr8m2d2NvA+r8tsARokPl4CI8Hj+W3Ga+VyDC9oKRlkgY5cMLaE1p+4eQBN47H09Zy4J5WeV+ZAbUlM7yjmLUs= Received: by 10.78.201.10 with SMTP id y10mr2054501huf.1181549152757; Mon, 11 Jun 2007 01:05:52 -0700 (PDT) Received: from ?192.168.1.35? ( [81.33.210.207]) by mx.google.com with ESMTP id i7sm15846226nfh.2007.06.11.01.05.51 (version=SSLv3 cipher=OTHER); Mon, 11 Jun 2007 01:05:52 -0700 (PDT) In-Reply-To: <20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp> References: <7C9995D9-AC11-4E7C-8477-25CA4B88A0F4@gmail.com> <20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: jtbryant@valdosta.edu, caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] camlp4 and class introspection Date: Mon, 11 Jun 2007 09:05:48 +0100 To: Jacques GARRIGUE X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 466D0261.001 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 466D0261.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 mli:01 runtime:01 ocaml:01 ocaml:01 2007,:98 outlet:98 outlet:98 blog:98 wrote:01 signatures:01 caml-list:01 define:01 parse:02 On Jun 11, 2007, at 1:58 AM, Jacques GARRIGUE wrote: > Then you can use camlp4 to parse the .mli and generate the > registration code to be included in the .ml file. Right. I want to parse the class definition to extract instance variable types and method signatures. Then I can use this information to create calls to the Objective-C runtime. If there's an instance variable of type "float outlet", for example, then I'll know to strip outlet from OCaml code and to tell ObjC that it's an outlet. The whole purpose is to be able to define ObjC classes in OCaml while automatically creating the glue and bridging code. Thanks, Joel -- http://topdog.cc - EasyLanguage to C# translator http://wagerlabs.com - Blog