I am looking for options for an open source C++ compiler front-end (source parser/analyzer) that I could customize for my requirements. I do not need the back end implementation, just that it would help to find a fast and relatively bug free C++ front end that supports most standard features. Any suggestions?
[I did google, clang seems to be an option but i'd much prefer peer feedback before i begin with it.]
Arpan
Clang and GCC are the two main options. GCC is very complicated (or so I've heard), and Clang is very promising but is immature.
GCC-XML uses GCC's frontend to spit out an XML description of the source. GCC-XML's output is not a full abstract source tree (it doesn't contain function bodies), but it would be a lot easier to work with than GCC itself. (The latest release on the GCC-XML page is horribly out of date; if you don't want to mess around with tracking its CVS yourself, you might try downloading a tarball from, e.g., Debian's gccxml page.)
Depending on your exact requirements, other options might work:
Edit: For further reading, see "Parsing C++", by Andrew Birkett.
Have you looked at LLVM clang?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With