首页 | 本学科首页   官方微博 | 高级检索  
     

词法分析器生成器的设计与实现
引用本文:李垒,陈平. 词法分析器生成器的设计与实现[J]. 荆门职业技术学院学报, 2008, 23(9): 41-46
作者姓名:李垒  陈平
作者单位:河南工业职业技术学院,计算机工程系,河南,南阳,473009;河南工业职业技术学院,计算机工程系,河南,南阳,473009
摘    要:当构造词法分析器时,根据单词的正规式定义首先构造与正规式等价的NFA,之后用子集法将NFA转换成DFA,并用此DFA进行词法分析。对词法分析器生成器的设计算法进行了研究,即构造等价于给定正规式非确定有限自动机,并用一种高级语言(C语言)在计算机上实现。

关 键 词:正规式  NFA(非确定有限自动机)  DFA(确定有限自动机)  转换

Lexical Analysis Generator Design and Realization
LI Lei,CHEN Ping. Lexical Analysis Generator Design and Realization[J]. Journal of Jingmen Vocational Technical College, 2008, 23(9): 41-46
Authors:LI Lei  CHEN Ping
Abstract:To construct Lexical analysis,the NFA(Nondeterministic Finite Automata) equivalent to the regular expression should be constructed firstly according to the regular expression definition of words.Then the DFA(deterministic finite-state automata) used to do the Lexical analysis was acquired with subset method.The algorithm for designing the Lexical analysis generator was introduced,i.e.constructing the NFA equivalent to a given regular expression,furthermore,this algorithm was realized by computer programming of an advanced language(C language).
Keywords:regular expression  NFA(nondeterministic finite-state automata)  DFA(deterministic finite-state automata)  transition
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号