东南大学 编译原理 课件 Cp5.pptVIP

  • 7
  • 0
  • 约 65页
  • 2017-02-17 发布于河南
  • 举报
Chapter 5 Syntax-Directed Translation Zhai Yuqing Zhou Xiaoyu Approaches to Implement Syntax-Directed Translation Semantic Static Semantic Dynamic Semantic E.g. Annotated parse tree for 3*5+4 Basic Idea(1) Guided by context-free grammar (Translating while or after parsing) Attaching attributes to the grammar symbols representing the program construction. The attributes represent anything we choose: a string, a number, a type, a memory location, etc. Basic Idea(2) The dependency between the attributes of relevant nodes in syntax tree. The value of an attribute at a parse tree node is com

文档评论(0)

1亿VIP精品文档

相关文档