J4

• • 上一篇    下一篇

基于超文法的扩展文法转换技术

郭德贵1, 刘磊1, 吴万春2,王胜军1   

  1. 1. 吉林大学 计算机科学与技术学院, 长春 130012; 2. 青岛理工大学 计算机工程学院, 山东省 青岛 266033
  • 收稿日期:2005-03-09 修回日期:1900-01-01 出版日期:2006-01-26 发布日期:2006-01-26
  • 通讯作者: 刘磊

Transformation of Extended Grammar Based on Super Grammars

GUO De-gui1, LIU Lei1, WU Wan-chun2, WANG Sheng-jun1   

  1. 1. College of Computer Science and Technology, Jilin University, Changchun 130012, China;2. College of Computer Eugineering, Qingdao Technological University, Qingdao 266033, Shandong Province, China
  • Received:2005-03-09 Revised:1900-01-01 Online:2006-01-26 Published:2006-01-26
  • Contact: LIU Lei

摘要: 针对带有优先级的扩展巴克斯范式(EBNF), 普通的语法分析技术很难适用于该文法的问题, 给出了扩展文法的形式定义, 提出一种基于超文法的EBNF到巴克斯范式(BNF)的转换算法, 并给出转换的正确性证明, 该算法在ATLAS语言编译器的开发中得到了实际应用和验证.

关键词: 巴克斯范式, 扩展巴克斯范式, 扩展文法, 文法转换, 超文法

Abstract: The ATLAS-EBNF grammar not only introduces more operators than common EBNF, but defines precedence between operators. Owing to its particularity, we can not design a parser for ATLAS-EBNF directly, so a grammar transformation is needed. A transformation technique was proposed based on super grammar and the proof of its correctness was given. The transformation technique was applied and verified in our project for the implement of ATLAS.

Key words: BNF, EBNF, extended grammar, grammar transformation, super grammar

中图分类号: 

  • TP301