C Code Parser for .NET.

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

+6
c c # parsing
source share
3 answers

ANTLR can do what you want. It has a C preprocessor and ANSI C grammar.

https://github.com/antlr/grammars-v4

+7
source share

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.

+6
source share

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

0
source share

All Articles