FAQ

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

Search Discussions

  • Stefan Behnel at May 2, 2010 at 4:44 am

    Jack Jansen, 01.05.2010 23:40:
    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?
    This sounds like a good topic for the CAPI-sig group, rather than for
    c.l.py. I suggest keeping subsequent discussion there.

    Stefan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 1, '10 at 9:40p
activeMay 2, '10 at 4:44a
posts2
users2
websitepython.org

2 users in discussion

Jack Jansen: 1 post Stefan Behnel: 1 post

People

Translate

site design / logo © 2022 Grokbase