Author Login Editor-in-Chief Peer Review Editor Work Office Work

Computer Engineering ›› 2007, Vol. 33 ›› Issue (19): 51-53. doi: 10.3969/j.issn.1000-3428.2007.19.018

• Software Technology and Database • Previous Articles     Next Articles

Compiler Framework for Building Java Language Extensions

ZHANG Yu   

  1. (Department of Computer Science and Technology, University of Science and Technology of China, Hefei 230027)
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-10-05 Published:2007-10-05

一种构建Java语言扩展的编译器框架

张 昱   

  1. (中国科学技术大学计算机科学技术系,合肥 230027)

Abstract: Polyglot is a highly extensible compiler frontend framework, while avoiding code duplication. Users may extend the framework to define any necessary changes on abstract syntax tree and semantic analysis for implementing language extensions. In order to direct users to work with Polyglot fleetly, the main flow and class hierarchy of Polyglot are summarized, and the methodologies of the scalable extensibility are anatomized, in which the delegation, visitors and abstract factories are employed. And the use steps of Polyglot and the related application are stated in a nut shell.

Key words: scalable extensibility, pass, visitor, delegation

摘要: Polyglot是一种避免代码复制的、高度可扩展的编译器前端框架。用户只需扩展该框架,定义对抽象语法树、语义分析等的必要修改,即可实现Java语言扩展。为指导用户在Polyglot上快速开展工作,该文总结Polyglot的主要流程和类体系,剖析其利用委托、访问者、抽象工厂等实现可升级扩展的方法,简述了Polyglot的已有应用及应用步骤。

关键词: 可升级扩展, 遍, 访问者, 委托

CLC Number: