From: SF M. E. <el...@us...> - 2004-06-02 20:45:56
|
... > This leads me to a couple of items on my wishlist, which I'd like > to discuss / propose here: > > * I suggest the ptree hierarchy to be refactored into a more typed > form. That could simply mean that a big number of new 'Statement', > 'Expression', and other classes should be derived from 'Ptree', or > it could be done in a different way, I don't know yet. > However, this would mean that it would be much more straight forward > to inspect an AST, as these types would be more or less self-explanatory > (ever wondered what 'node->Cdr()->Cdr()->Car()' represents ??) > > * I suggest to open up opencxx in a way that exposes the basic API > (parser / ptree generation, walkers / ptree transformation, metaclass and > the other introspection stuff) as a C++ library as well as a python module. > This means that the occ executable will be very much obsolete, or at least > it would only be a convenience for the most popular features, but more fine-grained > control would be accessible through the APIs, through which users can customize > opencxx to their needs. It also means that all the platform-specific code > to run subprocesses such as the preprocessor as well as load metaclass plugins > could be isolated such that the backend library would be more platform neutral and robust. ... I would like to contribute some ideas to this discussion thread. I tried to introduce the topic "C++ management extension". http://sourceforge.net/mailarchive/message.php?msg_id=7576532 There are more approaches possible: C++ source code can be mapped to XML. Superx++ comes near to such a solution. http://en.wikipedia.org/wiki/Superx_Plus_Plus_programming_language An object-oriented mapping between the sources and the MOP transformation can be used like it is decscribed in the section "1.1.4 Inheritance vs. Flattened Views of the API". http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-1CED5498 - A node interface is available for OpenC++ at the moment. - Higher level abstractions and corresponding classes seem to be missing so far. How do you think to define them with the CORBA interface definition language like it is specified for HTML? http://www.w3.org/TR/DOM-Level-2-HTML/idl-definitions.html |