Implementing a C++ extension with Transformers: class namespace
- Vincent Ordy
- Transformers, program transformation, C++, Stratego/XT
C++ classes are closed, such that once a class definition is ended, nothing can be added to it. But most of the timeprogrammers are used to distinguish method definition from method implementation. As a consequence, using fully-qualified name of method names and return types are needed, which is repetitive and tedious, especially with template and nested classes. We propose extending C++ grammar with a namespace-like syntax in order to define easily member functions and static data members already declared in the class definition. This work will be based on Tranformers' C++ grammar and transformation rules in Stratego Language.