Construction of object-oriented compilation class libraries
G Jian · Journal of Tsinghua University(Science and Technology) · 2003
Object-oriented analysis of the compiler domain was used to construct a compiler using a compiler class lib rary. The basic grammar structures were modeled by the basic compiler classes an d the compiler front end architecture. All compilation phases, including lexical analysis, parsing, semantic handling, optimization and execution, are integrate d into the class model of a syntax unit. This eliminates the space split of diff erent compilation phases in traditional compilers. In this approach, the symbol tables are abstracted as classes, using dynamic multiple levels of structures. T he syntax analysis and semantic operations are handled separately, which greatly increases the extensibility, reusability and maintainability of compilation com ponents.