Is Parsing C header file possible using ANTLR?

I am new to the compiler business and use ANTLR grammar (open source) to parse C source files that contain many external header files, i.e. include files and library files, etc.

What is the grammar definition for these header files? Is there a way to parse these included files as simple source files?

Is it possible to integrate all these + include source files into a package and parse it using ANTLR or another C-parser (JavaCC).

Waiting for your good suggestions.

+3
source share
1 answer

C. (, gcc -E), (clang -Xclang -ast-print-xml gcc-xml ), XML-.

+1

Source: https://habr.com/ru/post/1793852/


All Articles