i understand it's hard thing do, #ifdef, #define, , templates, state of art of c++ parsers (be open source, or proprietary?).
i mean, university project i'm thinking of creating tool analysing c++ code bases, seems hard find parser it.
should give , settle java parsers? similarly, what's state of art java parsers? c#?
also, ripping parser part of g++ apart ever work purposes of code analysis, or effort trying so?
you're in luck! clang started being able parse c++ programs within last few months: http://clang.llvm.org/ it's 1 of few open source parsers able parse of c++. (mostly gcc , clang, hear oink(?) can pretty sometimes) , it's built used library ides , like, has architecture built support code rewriting.
there proprietary parsers job done, none of them usable without source access.
regarding ripping apart gcc, that's not practical code analysis depending on trying do, use new plugin architecture usable information out of it, @ level in parsing, called term folding, parser optimize out things "x = x" (a simplistic example) , other aspects of compiler expects happen, it's not trivial remove. making gcc useless resembling source rewriting.
Comments
Post a Comment