Decorating tokens to facilitate recognition of ambiguous language constructs
Software tools are fundamental to the comprehension, analysis, testing and debugging of application systems. A necessary first step in the development of many tools is the construction of a parser front-end that can recognize the implementation language of the system under development. In this paper, we describe our use of token decoration to facilitate recognition of ambiguous language constructs. We apply our approach to the C++ language since its grammar is replete with ambiguous derivations such as the declaration/expression and template-declaration/expression ambiguity. We describe our implementation of a parser front-end for C++, keystone, and we describe our results in decorating tokens for our test suite including the examples from Clause Three of the C++ standard. We are currently exploiting the keystone front-end to develop a taxonomy for implementation-based class testing and to reverse-engineer Unified Modeling Language (UML) class diagrams. Copyright (C) 2002 John Wiley Sons, Ltd.
parser grammar unified modeling language symbol table design pattern the facade and decorator design patterns