[capi-sig] intermediate parsed representation of C/C++ API descriptions for multiple wrapper generators

Jack Jansen Jack.Jansen at cwi.nl
Mon May 3 00:08:42 CEST 2010

On  2-May-2010, at 23:57 , Gustavo Carneiro wrote:

> On Sun, May 2, 2010 at 22:47, Jack Jansen <Jack.Jansen at cwi.nl> wrote:
> On  2-May-2010, at 07:27 , Stefan Behnel wrote:
> >> 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...
> >
> > Please do. I'll ask over at the Cython-users list to see if others have something to contribute to this discussion.
> Ok, here goes. People interested in a (slightly) more complete writeup can read <http://homepages.cwi.nl/~jack/presentations/nluug-praatje.pdf>, but here is the basics.
> The bgen intermediate format is a python file. Each C or C++ definition is transformed into a few lines of Python code that describe the definition.
> You know, this sounds a lot like pybingen.  It reads gccxml and generates an API description as a python file.  Syntax used in pybindgen is only slightly different thant what you propose.

Can you elaborate (a bit)? Because I'm interested in the places where the wrapper generators have different requirements (because that's going to be the difficulat areas for a common format).

An example of where things may be different is that the bgen format has absolutely no knowledge of C types. As you can see from my example they are nothing more than python-identifier representations of the C names.
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