As discussed in #3 (comment), explore possibilities of using libclang's C API. Fortunately, libclang provides Python bindings for their C API.
Experimenting with it demonstrated, that libclang provides deeper lexical fidelity when parsing a C source/header file (i.e. it provides preprocessor tokens before they're expanded). Perhaps this can be used to more effectively work around __asm__(...)-statements, which make direct inclusion of that particular file impossible.
As discussed in #3 (comment), explore possibilities of using libclang's C API. Fortunately, libclang provides Python bindings for their C API.
Experimenting with it demonstrated, that libclang provides deeper lexical fidelity when parsing a C source/header file (i.e. it provides preprocessor tokens before they're expanded). Perhaps this can be used to more effectively work around
__asm__(...)-statements, which make direct inclusion of that particular file impossible.