作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

›› 1988, Vol. 14 ›› Issue (01): 24-.

• 论文 • 上一篇    下一篇

一种基于属性文法的编译结构设计方法

赵荣彩   

  1. 解放军信息工程学院
  • 发布日期:1988-02-25

A METHOD OF DESIGNING COMPILERS BASED ON THE ATTRIBUTED GRAMMAR

Zhao Rongcai   

  • Published:1988-02-25

摘要: 本文介绍了一种基于属性文法的编译结构设计方法。本编译设计方法采用两遍扫描,语法分析采用自顶向下的分析技术,并与属性文法中对继承属性的自顶向下计值过程揉合在一起,而在第二遍处理中,进行自下而上地对综合属性的计值。这样就很自然地将属性文法的思想和办法运用于编译结构设计之中,实践表明,其效果是好的。

Abstract: A method of designing compiler based on the attributed grammar is introduced and discussed. There are two passers in this compiler. Top-down analysis technique is adopted for the parser and is combined naturally with the top-down estimator for ATI. The bottom-up estimator for ATS is handled in the second Pass. In this way, the idea of attributed grammar is incorporated into the procedure for designing compilers with high efficiency.