From: Stefan S. <se...@sy...> - 2005-12-11 04:00:46
|
Peter C. Chapin wrote: > I'm not sure if trying to swap auto_ptrs at all is a good idea. I know > they have strange semantics. However, I don't know all the issues. In > any case, I'm looking forward to playing around with this system. I have > used the Ada community's ASIS some. ASIS is a standard library that > makes it easy for me to write analysis programs that tap into the Ada > compiler's parse tree and symbol table information. I thought that it > would be nice to have something like that for C++ and it seems like > OpenC++ might be just that thing. Now if only I can find the time to > play... Hi Peter, I'v been playing with the OpenC++ code for a couple of years, until I realized that to be really useful it required a number of serious improvements that couldn't be made incrementally. I'm now working on synopsis (http://synopsis.fresco.org), which aims at exactly what you are looking for: a set of APIs to introspect various representations of the source code such as parse tree, symbol table, or (abstract) syntax tree. The code is based on OpenC++ (from which it forked about six years ago), but is evolving quickly. It provides C++ and python bindings for its APIs. Right now I'm working on a complete parser rewrite, which works similar to the g++ parser, i.e. instead of postponing symbol table creation to a second phase, it builds and uses the symbol table during the first phase, to disambiguate the syntax. The generated parse tree is similar but not identical to the one generated by OpenC++. It aims at full ISO C++ conformance. Just a FYI... Regards, Stefan |