lexical-analyzer

所属分类:编译器/解释器
开发工具:Visual C++
文件大小:2654KB
下载次数:13
上传日期:2015-04-16 15:34:07
上 传 者artorius_
说明:  编译原理实验报告 实验一:词法分析器 实验目的: 实现TINY+语言的词法分析程序(扫描程序) 实验内容: 1、词法分析器输入输出 扫描程序的输入是源代码文件,输出是token串。 2、需要遵循“最长串匹配原则”,如匹配字符串‘:=’ 为赋值操作符,而不是冒号和等号两个操作符。 Token 以键值对 (Kind, Value)的形式表示。下面的符号表示不同的token类别(即Kind的取值) KEY 表示保留字 SYM 表示特殊符号 ID 表示标识符 NUM 表示数值常数 STR 表示字符串常数 3、检测词法错误:给出有意义的错误信息和错误发生的行号。
(Compile a report principle experiment to experiment: lexical analyzer experimental purposes: to achieve lexical analysis program TINY+ language (scanner) Experiment: a lexical analyzer Input Output Scan program source code file, the output is token string. 2, you need to follow the " longest string matching principle" , such as matching the string ' : =' is the assignment operator instead of a colon and equals two operators. Token expressed as key-value pairs (Kind, Value) format. The following token symbols represent different categories (ie Kind values) KEY expressed reservations expressed special symbol SYM word identifier ID NUM represents a numerical value represents the string constant constant STR 3, the detection lexical error: give meaningful error messages and line number the error occurred.)

文件列表:
lexical analyzer (0, 2015-04-16)
lexical analyzer\Debug (0, 2015-01-06)
lexical analyzer\Debug\exp1.exe (151552, 2015-01-06)
lexical analyzer\Debug\exp1.ilk (720568, 2015-01-06)
lexical analyzer\exp1 (0, 2015-01-06)
lexical analyzer\exp1.sdf (7733248, 2015-01-06)
lexical analyzer\exp1.sln (958, 2014-12-15)
lexical analyzer\exp1.v12.suo (30720, 2015-01-06)
lexical analyzer\exp1\Debug (0, 2015-01-06)
lexical analyzer\exp1\exp1.vcxproj (3374, 2014-12-15)
lexical analyzer\exp1\exp1.vcxproj.filters (944, 2014-12-15)
lexical analyzer\exp1\src.cpp (5217, 2015-01-06)
lexical analyzer\文档.doc (191488, 2015-04-16)

近期下载者

相关文件


收藏者