From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA00175; Tue, 14 Aug 2001 02:17:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA00211 for ; Tue, 14 Aug 2001 02:17:52 +0200 (MET DST) Received: from ligarius-fe0.ultra.net (ligarius-fe0.ultra.net [146.115.8.189]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7E0Hpv06225 for ; Tue, 14 Aug 2001 02:17:51 +0200 (MET DST) Received: from vaiobambino (d190.dial-8.cmb.ma.ultra.net [209.6.71.190]) by ligarius-fe0.ultra.net (8.8.8/ult/n26500/mtc.v2) with SMTP id UAA26177; Mon, 13 Aug 2001 20:17:47 -0400 (EDT) From: "Jeff Henrikson" To: "Sven" Cc: Subject: RE: [Caml-list] Confusion about camlidl capabilities? other tools? Date: Mon, 13 Aug 2001 20:26:10 -0400 Message-ID: <001901c12457$b763a4c0$0b01a8c0@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Importance: Normal In-Reply-To: <20010813225308.B23936@dpt-info.u-strasbg.fr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I started working some time ago on c2caml, which, altough maybe not > what you need, was intented to generate ocaml stubs from C header > code, particularly for parsing the gtk+ headers and generating > appropriate bndings. It is really jus ta C parser for now, but if > you want, you can look at it, it is availabel in the CDK, i think. No, wrong way. I want to publish a control implemented in caml to the outside world. Parsing C is not involved. Printing a bunch of C is. Note that this is easier than the reverse: C header files are underspecified and need a markup language (MIDL, SWIG) to make stub generation well defined. mli files on the other hand have everything you need to interface to C or something else. Jeff Henrikson > -----Original Message----- > From: Sven [mailto:luther@dpt-info.u-strasbg.fr] > Sent: Monday, August 13, 2001 4:53 PM > To: Jeff Henrikson > Subject: Re: [Caml-list] Confusion about camlidl capabilities? other > tools? > > > On Mon, Aug 13, 2001 at 03:26:46PM -0400, Jeff Henrikson wrote: > > Hi, > > > > Reading the documentation of camlidl, it says that caml objects can be exported for use in C/C++ programs. Looking at > the source > > code, the support for this looks minimal. I see the camlidldll script, which is just a shell script that links a caml > program with > > some executable code. If this is some sort of automatic dispatch interface generator, this is not what I want. I want real C > > header files from just plain unannotated mli. Preferably a system with ability to map variants into C struct/unions > coupled with > > utility functions. I'm not sure which other advanced ocaml datatypes I need beyond variants and the basic ints, > strings, arrays > > and etc. > > > > Has anybody done something like this? I ripped out the ocaml parser and started playing with it to build a tool, but > I don't want > > to be reinventing the wheel. While I'm at it, I will probably try to export stubs at least these styles: COM, > GTK-style C objects, > > and SWIG-ready header files for inclusion in Python or TCL or whatever some unenlightened person would want to use. > > I started working some time ago on c2caml, which, altough maybe not what you > need, was intented to generate ocaml stubs from C header code, particularly > for parsing the gtk+ headers and generating appropriate bndings. It is really > jus ta C parser for now, but if you want, you can look at it, it is availabel > in the CDK, i think. > > Friendly, > > Sven Luther > ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr