I want to parse and get the list of definitions(#define) in c header file.
I know there are many python modules but I couldn't find parse pre-processors like "#if", "#undef".
If header file is as below:
#define ABC
#define DEF
#define CONDITION
#ifdef CONDITION
#undef DEF
#define HIJ
#endif
I want to get the list as below:
ABC, CONDITION, HIJ // no DEF
Do you have any idea for this?