摘要
抽象语法树在很多应用领域中是一个重要的工具,但是在概念上不一致与不规范。本文提出了抽象语法(树)的设计准则,并引进规范抽象语法的概念。本文还给出了为一个源程序从文法直接生成改进的规范抽象语法树的算法。改进的规范抽象语法树结点数远比通常语法分析树少。内存需求量的剧降与应用软件运行的加速,使语法树有实际的应用价值,也可扩大其应用范围。
The criterion of designing the abstract syntax (tree) is proposed, and the notion of the canonical abstract syntax is introduced. The algorithm for generating an improved canonical abstract syntax tree (CAST) directly from the grammar for a source program is given. The number of nodes in an improved CAST is much fewer than that in the corresponding normal parse tree. The required memory space is reduced and the running speed of an application software is increased.
出处
《计算机学报》
EI
CSCD
北大核心
1990年第12期926-933,共8页
Chinese Journal of Computers
基金
七五攻关项目