I'm trying to parse C++ code, and create an AST. What I want to do is extract some simple reflection information(class names, member variables and their types, etc..). I don't need to compile the code, or generate binaries. I am looking for the simplest possible way to do this. Ideally, I would like a small parser, in a single static library, with no dependencies.
I've been looking around, and it appears that a Bison parser may be able to do this for me. I've tried to find an open source parser, but all google will give me is C++ wrappers for bison, and not a bison parser for C++. Typing "C++ parser" also fails, by giving results for parsers for everything else, that are written in C++.
Is there an open source project that will do what I need?