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

计算机工程 ›› 2008, Vol. 34 ›› Issue (17): 74-76. doi: 10.3969/j.issn.1000-3428.2008.17.027

• 软件技术与数据库 • 上一篇    下一篇

可重定向C编译器中DAG及归约规则

张红光,赵彩云,李海丰,李福才,陈 鹏   

  1. (南开大学计算机科学与技术系,天津 300071)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-09-05 发布日期:2008-09-05

DAG and Reduction Rules in Retargetable C Compiler

ZHANG Hong-guang, ZHAO Cai-yun, LI Hai-feng, LI Fu-cai, CHEN Peng   

  1. (Department of Computer Science and Technology, Nankai University, Tianjin 300071)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-09-05 Published:2008-09-05

摘要: 以在嵌入式系统中建立C编译器的技术特点为主要内容,用设计实例论述了C编译器实现中前端、后端的主要工作内容。说明了在前、后端之间起桥梁作用的中间描述语言有向无环图(DAG)的设计原理及形成方法,同时还就如何将DAG与目标机系统之间形成映射关系进行描述,提出了在映射中规约规则制定的方法和原则,给出了一些有指导意义的经验性结论。

关键词: 宿主机, 目标机, 可重定向编译器, 有向无环图, 抽象语法树

Abstract: This paper, based on the technology of building C compiler in embedded system, discusses the mainly work in realization of C compiler with design examples. The paper presents the design principle and the form method of the middle description language DAG, which has the bridge function between front end and back end. Also this paper describes the relation from DAG to target machine system, puts forward rules in maps about the method and principle of the rule establishment, and gives some experience conclusions that have guided meaning.

Key words: host, target, retargetable compiler, Directed Acyclic Graph(DAG), abstract syntax tree

中图分类号: