Using pycparser to parse a slew of .c source files, but the parser can’t handle many things in the #included libraries, and I really don’t need them for my purposes. I don’t need to have it compile, just need to generate the AST from the specific .c I’m processing.
The cpp args i’m passing it right now are:
cpp_args=["-D__attribute__=","-D__extension__=","-D__builtin_va_list=void*"]
Any ideas?
Thanks!
Try specifying the
-nostdincoption to the preprocessor (and make sure you’re not passing any-Ioptions). Given this input infoo.c:Running:
Gives me:
And the following errors: