pythonpycparser

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


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 };

Solution

  • 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.