Hello,
I need to parse .c/.h files for the data declaration and extract the type declarations. For example, I might need to extract the variable declaration and it corresponding data type that might look like:
typedef union
{
struct
{
unsigned char OG15 : 1,
...
OG0 : 1;
} Bits;
unsigned short Packed;
} OUTPUT_DESCRIPTOR;
OUTPUT_DESCRIPTOR DiscreteWord1;
So my questions would be (using C#):
- What would be the best way to store the data type information?
- What is the best approach to parse to source files to extract the declarations and data types?
Thx
Mark