Does anyone know any C-parser library for .NET?
(I'm going to parse the C code in some form of object graph, so I can convert it to another language.)
ANTLR can do what you want. It has a C preprocessor and ANSI C grammar.
https://github.com/antlr/grammars-v4
C99's own grammar is not trivial. It is better to use a proven C-parser (e.g. Clang). It can be used with .NET through C ++ / CLI.
First option Raw class: you can extract the scanner and parser class from this application. Part 1: scanner Part 2 analyzer and part 3 - the main program in this code fragment:
https://www.daniweb.com/software-development/csharp/threads/453104/parsing-c-code-using-c