Subject: [clisp-list] RE: SWIG binding for CLISP

From: "V.Krishna Kumar" <[email-masked]>
Date: Fri, 29 Jun 2001 21:36:18 -0400

Hi! all,

I think SWIG is more useful for generating wrappers. Since CLISP's FFI allows 
to directly interface with foreign libs all that is required is some sort of 
h2lsp utility that parses C headers and generates appropriate lisp files. 
Maybe the whole thing can be automated using some kind of module definition 
facility which takes a module definition file (containing package name, 
exports, headers etc.) and performs the work of clisp-link automatically.

Please correct me if 'am wrong.

-Kicha

-------------------------------------------
The Fastest Browser on Earth now for FREE!!
Download Opera 5 for Windows now! Get it at
http://www.opera.com/download/
-------------------------------------------

---

From: Aurelio Bignoli <[email-masked]>
Date: Mon, 2 Jul 2001 22:14:49 +0200

>>>>> "Kicha" == V Krishna Kumar <[email-masked]> writes:

    Kicha> Hi! all, I think SWIG is more useful for generating
    Kicha> wrappers. Since CLISP's FFI allows to directly interface
    Kicha> with foreign libs all that is required is some sort of
    Kicha> h2lsp utility that parses C headers and generates
    Kicha> appropriate lisp files.

I think you are right. However, it is not so simple to write such a
utility, since it has to understand a large part of C syntax. 

AFAIK, two similar programs are available:

1) CPARSE, by Tim Moore
   http://www.bricoworks.com/~moore/cparse
   It is copyrighted by Tim Moore but freely distributable.

2) parse-c-decls.lisp, by Vassili Bykov and Roger Corman. It is
   distributed with Corman Lisp: http://corman.net/CormanLisp.html.
   It is copyrighted by the authors, I'm not sure if it can be freely
   used or distributed. 

Both have some limitations in C syntax parsing.

Aurelio