[cfe-dev] using python clang.cindex library to generate bindings ?

Martin C. Martin martin at martincmartin.com
Tue May 4 03:13:03 PDT 2010


Until it exists, you might want to check out SWIG, which parses a subset 
of C++ and automatically generates bindings in other high-level languages.

Best,
Martin

On 5/3/2010 12:26 PM, Daniel Dunbar wrote:
> On Sat, May 1, 2010 at 1:05 AM, Sebastien Binet<binet at cern.ch>  wrote:
>> hi there,
>>
>> I just noticed that llvm/clang-2.7 provides a ctypes-based library
>> wrapping libCIndex.so for python.
>> Is it possible, planned or adviseable to use such a thing to
>> programatically generate a representation (say in json/xml) of some
>> C/C++ api so it could be then used to automatically generate bindings
>> in other high-level languages ?
>
> It seems possible, but now one is working on it as far as I know. As
> far as advisable, its certainly a better approach than doing ad hoc
> parsing of C/C++ code.
>
>   - Daniel
>
>>
>> cheers,
>> sebastien.
>> --
>> #########################################
>> # Dr. Sebastien Binet
>> # Laboratoire de l'Accelerateur Lineaire
>> # Universite Paris-Sud XI
>> # Batiment 200
>> # 91898 Orsay
>> #########################################
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list