Dehydra: Static analysis for C++, scripted with JS
developer.mozilla.org
developer.mozilla.org
If you want some more information on how this works, take a look at this intro to parsing C++ with a GCC plugin:
http://www.codesynthesis.com/~boris/blog/2010/05/03/parsing-...