c99tree dumps parse tree of a C99 source file in various output formats.

The input must be valid C code, the C99 grammar and various extensions to the language are supported. c99tree is not for debugging syntax errors and it does not report semantic problems either. The output tree reflects the structure of the source file, keeping order of tokens as much as possible.

The project is intended to be a base of any lightweight project that needs to do source code analyzis on C source files. Using c99tree, the analyzer doesn't need to implement its own parser. An output format is provided that translates the parse tree back to C source format. It is easy to implement scripts/programs that do various tree manipulations, using c99tree effectively making modifications to C sources in a way that is more robust than regex processing the source.