摘要: 用状态转换图分析正规式时需要考虑的情况比较多,容易造成疏漏。且这种方法需要递归进行,多次扫描正规式,效率不高。该文采用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.
中图分类号:
张志远. 基于属性文法的正规式到NFA的转换[J]. , 2005, 31(S1): 146-.
ZHANG Zhiyuan. Regular Expression to NFA Based on Syntax-Directed Translation[J]. , 2005, 31(S1): 146-.