Application of Object-oriented Technique in the OCC C Compiler

REN Jie,YANG Xin,SHI Lei,CHEN Yu,YANG Wei-kang
DOI: https://doi.org/10.3969/j.issn.1000-3428.2008.09.033
2008-01-01
Abstract:The architecture of the C compiler OCC is introduced.The Abstract Syntax Tree(AST) served as the intermediate representation,o which the 86 different nodes are grouped into 8 categories and the coupling degree of the semantic analysis with the visitor design pattern is reduced The memory leak problem during the dynamic allocation and destruction of abstract syntax tree nodes is solved using a simple garbage collector.A type builder module gives 7 different treatments to 9 parts of the type specification,which ease the maintenance problem of the attribute gramma script.
What problem does this paper attempt to address?