Is there any way to avoid parse-errors in pycparser library of python

588 views Asked by At

The below code triggers an error in .c file when pycparser tries to parse it. This might be because rf_wcdma_bup_flags_t is not a defined typedef, is there anyway to skip it?

rf_wcdma_bup_flags_t rf_wcdma_debug_flags = { 0 };
1

There are 1 answers

0
Eli Bendersky On BEST ANSWER

There's no way to skip it. However, it's easy to support new types by adding "fake headers" to the analysis flow with pycparser. The README page has some details about this - and this blog post has more.