How to migrate the AST parsing to clang?

18 views
Skip to first unread message

Etienne Robillard

unread,
Dec 29, 2017, 10:54:40 AM12/29/17
to pytho...@googlegroups.com
Hi,

I'm trying to use Clang Python bindings in CFFI in order to support
#include and #define directives, as described here:
https://bitbucket.org/cffi/cffi/issues/5/cdef-to-support-define-and-include

I installed Clang 3.8 and the python-clang package for Python 2.7. Do I
need to recompile CFFI as well?

My goal is to let CFFI support parsing a preprocessed C header file by
using the ffi.cdef() function.

Any ideas how to accomplish this?

Etienne


--
Etienne Robillard
tka...@yandex.com
https://www.isotopesoftware.ca/

Etienne Robillard

unread,
Jan 2, 2018, 4:58:44 AM1/2/18
to pytho...@googlegroups.com, Armin Rigo
How can I rewrite the pycparser module in CFFI to support clang
preprocessing natively?

I just want to generate a AST from a C header with clang and use
ffi.dlopen to make python bindings from a shared lib.

Thank you,

Etienne
Reply all
Reply to author
Forward
0 new messages