文件名称:LexicalAnalyzer
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:329.88kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
手工构造一个能够识别C语言的所有典型单词,如:标识符、数字、运算符,和if、while等保留字的确定有限自动机,并写出对应该自动机的程序;然后以一个简化的C语言程序为输入文件,通过所设计的基于上述自动机的词法分析程序获得输入文件中的各个单词及其内码对照表,并以文件形式保存结果(也就是TOKEN序列)。
将自己定义的各个正则表达式转化为NFA,然后将其综合为NFA ,再将NFA 转化为DFA,再将DFA转化为最少状态的DFA ,最后由DFA 转化为词法分析程序。-Manually construct a C language to identify all the typical words such as: identifiers, numbers, operators, and if, while the determination of reserved words such as finite automata, and write on the procedure should be automatic machine then a simplified C language program for the input file, through the design of automata based on the lexical analysis procedure for obtaining the input file and within each code word table, and save the results to file the form (that is, TOKEN sequence). Defining themselves in all the regular expression into NFA, and then consolidated for the NFA ' , then NFA' into a DFA, DFA then converted to a minimum state DFA ' , the last by the DFA' into a lexical analysis program.
将自己定义的各个正则表达式转化为NFA,然后将其综合为NFA ,再将NFA 转化为DFA,再将DFA转化为最少状态的DFA ,最后由DFA 转化为词法分析程序。-Manually construct a C language to identify all the typical words such as: identifiers, numbers, operators, and if, while the determination of reserved words such as finite automata, and write on the procedure should be automatic machine then a simplified C language program for the input file, through the design of automata based on the lexical analysis procedure for obtaining the input file and within each code word table, and save the results to file the form (that is, TOKEN sequence). Defining themselves in all the regular expression into NFA, and then consolidated for the NFA ' , then NFA' into a DFA, DFA then converted to a minimum state DFA ' , the last by the DFA' into a lexical analysis program.
相关搜索: finite state automata
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Lexical Analyzer.cpp
Lexical Analyzer.doc
Lexical Analyzer.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.