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

›› 2005, Vol. 31 ›› Issue (S1): 146-.

• 论文 • 上一篇    下一篇

基于属性文法的正规式到NFA的转换

张志远   

  1. 中国民用航空学院计算机学院 天津 300300
  • 发布日期:2005-12-29

Regular Expression to NFA Based on Syntax-Directed Translation

ZHANG Zhiyuan   

  1. (School of Computer Science & Technology,CAUC,Tianjin 300300)
  • Published:2005-12-29

摘要: 用状态转换图分析正规式时需要考虑的情况比较多,容易造成疏漏。且这种方法需要递归进行,多次扫描正规式,效率不高。该文采用SLR分析加属性文法只需一遍扫描就可以将正规式转存为NFA,效率要高得多。

关键词: 属性文法, 正规式, NFA, SLR

Abstract: Lots of situations should be considered to analyze a regular expression with transition diagrams,and the analysis might fail even if one situation is neglected. Otherwise,this method needs scan the expression more than one time because of using recursion. This paper uses SLR and syntax-directed translation,which only needs one time scan and makes the efficiency much higher.

中图分类号: