Parsing C code?

Is there a dotnet library that can parse C99 code to an AST (and it would be nice to be able to unparse the AST back to C99 code)? I want to make some custom automatic analysis and refactorings to a huge legacy C99 codebase.

PS: I know of libclang, but it is very huge and slow, as I need to feed it preprocessed sources only (and each file even small ones are like 2-5mb of C-code after preprocessing). Also I’d like it to be a pure dotnet code, so I don’t need to install LLVM libraries to each computer I’ll be running it on (Linux based).

submitted by /u/AlexKotik
[link] [comments]

Leave a Reply