SSCC: A software tool based on extended ordered attribute grammars

Wuu Yang*, Yen Tsan Liu

*此作品的通信作者

研究成果: Article同行評審

1 引文 斯高帕斯(Scopus)

摘要

Attribute grammars are a formalism for specifying computations on syntax trees. SSCC (a Sufficiently Smart Compiler Compiler) is a practical attribute-grammar system based on a polynomial-time extension to Kastens’s ordered attribute grammars. The new class of attribute grammars is strictly larger than the class of ordered attribute grammars, and it retains the property that there is a polynomial-time procedure for finding an evaluation order. The SSCC system is comprised of two subsystems. The generation subsystem computes the evaluation order of attribute occurrences in production rules and translates attribute equations into low-level code for a virtual stack machine. The evaluation subsystem invokes tools to perform lexical and syntactic analyses and evaluates the attribute instances during a traversal of the syntax tree. Three features make SSCC capable of performing any desired computation (within the constraints of ordered attribute grammars): user-defined data types, user-defined functions and data structures, and the finalize function. A user may define arbitrary types and functions for use in the attribution equations. After all the attribute instances are evaluated, SSCC calls the finalize function, which may be supplied by a user, and passes it the whole decorated syntax tree. This offers a user opportunities for further processing of the tree and the attributes. The SSCC system is semi-strongly typed in the sense that type consistency within a specification is fully checked by SSCC; however, type consistency between a specification and user-supplied functions is not checked.

原文English
頁(從 - 到)85-99
頁數15
期刊Proceedings of the National Science Council, Republic of China, Part A: Physical Science and Engineering
23
發行號1
出版狀態Published - 1月 1999

指紋

深入研究「SSCC: A software tool based on extended ordered attribute grammars」主題。共同形成了獨特的指紋。

引用此