[cfe-dev] Hacking advice

Sebastien Binet binet at cern.ch
Sat Nov 6 10:58:19 PDT 2010


hi,

On Sat, 6 Nov 2010 12:06:28 -0400, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> The overall goal would be
> 1: parse the names, return types, and parameters of functions with a given
> context like a namespace, class, struct or global scope.
> 2: parse classes, structs, enums, etc for the name, internal objects,
> members, member methods, virtual overrides, inheritance, etc.
> 3: The final output would be the boost::python C++ code wrapper with as
> descriptive an interface as the C++ class itself.

have you looked at the python bindings to libclang and the
cindex-dump.py script ?
http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/
http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/examples/cindex/cindex-dump.py?revision=96107&view=markup

I have been wanting to improve those and do something along the same
lines than yours (but for cython code generation)

recently, I came back at this topic (and submitted a few patches)
my work in progress on improving the libclang python bindings can be
found there:
http://bitbucket.org/binet/py-clang

cheers,
sebastien.



More information about the cfe-dev mailing list