[capi-sig] SWIG + expy

Jack Jansen Jack.Jansen at cwi.nl
Sat May 1 23:40:13 CEST 2010

On  27-Apr-2010, at 08:30 , Yingjie Lan wrote:

> Hi,
> Is it possible to use SWIG to parse C/C++, and provide an interface for me to generate some code? I thought it might be good to have SWIG help generate expy (see http://expy.sourceforge.net) files, then generate the python extension via expy.

I would be very interested in a universal intermediate format for all the interface generators. I'm still using a version of Guido's old bgen, now grudgingly extended to handle C++ and do bidirectional bridging between Python and C++, and while I love and cherish the code generator the C++ parser is, uhm... challenging.
Parsing C++ with per-line regular expressions is no fun:-)

I looked at gccxml at some point, as well as at some of the competing Python interface generators, but it went nowhere. gccxml output is far too detailed, and the output is too much of a simple parse tree to be of any use. The intermediate formats of the other interface generators I looked at were all too inaccessible.

Maybe we can come up with something decent in this group?

If there is enough interest: I can start by describing bgen's intermediate format, and if other people do the same for theirs we may be able to get to common ground...
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman

More information about the capi-sig mailing list