摘要
当构造词法分析器时,根据单词的正规式定义首先构造与正规式等价的NFA,之后用子集法将NFA转换成DFA,并用此DFA进行词法分析。对词法分析器生成器的设计算法进行了研究,即构造等价于给定正规式非确定有限自动机,并用一种高级语言(C语言)在计算机上实现。
To construct Lexieal analysis, the NFA (Nondeterministie 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).
出处
《荆门职业技术学院学报》
2008年第9期41-46,共6页
Journal of Jingmen Technical College
关键词
正规式
NFA(非确定有限自动机)
DFA(确定有限自动机)
转换
regular expression
NFA ( nondeterministic finite - state automata)
DFA ( deterministic finite - state automata)
transition