资源简介
紧接我之前提交的Pascal词法和语法分析器,这里是实现了赋值、if-语句、for-语句的Pascal语法制导的翻译的语义分析器。

代码片段和文件信息
#include “code.h“
const char key_words[KEY_LEGNTH][TYPE_LENGTH] = { ““
“and“ “array“ “begin“ “case“
“const“ “div“ “do“ “downto“
“else“ “end“ “pfile“ “for“
“function“ “goto“ “if“ “in“
“label“ “mod“ “nil“ “not“
“of“ “or“ “packed“ “procedure“
“program“ “record“ “repeat“ “set“
“then“ “to“ “type“ “until“
“var“ “while“ “with““integer“
“word“ “char“};
int searchStr(const char *s) //searcht the string
{
int i;
for (i = 0; i < KEY_LEGNTH-2; i++)
if (strcmp(key_words[i] s) == 0)
return i;
for (; i < KEY_LEGNTH; i++)
if (strcmp(key_words[i] s) == 0)
return 36;
return -1;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-06-04 20:15 SemanticAnalysis\
目录 0 2016-06-01 23:22 SemanticAnalysis\Debug\
文件 81408 2016-06-04 20:15 SemanticAnalysis\Debug\SemanticAnalysis.exe
文件 495568 2016-06-04 20:15 SemanticAnalysis\Debug\SemanticAnalysis.ilk
文件 798720 2016-06-04 20:15 SemanticAnalysis\Debug\SemanticAnalysis.pdb
目录 0 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\
目录 0 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\
文件 26199 2016-06-01 22:53 SemanticAnalysis\SemanticAnalysis\Debug\LexicalAnalysis.obj
文件 2016 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.log
目录 0 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\
文件 25216 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\CL.read.1.tlog
文件 13692 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\CL.write.1.tlog
文件 182 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\SemanticAnalysis.lastbuildstate
文件 11298 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\cl.command.1.tlog
文件 3716 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\li
文件 6396 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\li
文件 2564 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SemanticAnalysis.tlog\li
文件 52372 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\SyntaxAnalysis.obj
文件 5632 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\code.obj
文件 5936 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\definedByMyself.obj
文件 18730 2016-06-01 22:53 SemanticAnalysis\SemanticAnalysis\Debug\lrTable.obj
文件 8819 2016-06-03 12:12 SemanticAnalysis\SemanticAnalysis\Debug\main.obj
文件 12936 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\nonTerminal.obj
文件 12677 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\state.obj
文件 13708 2016-06-02 15:45 SemanticAnalysis\SemanticAnalysis\Debug\statementQueue.obj
文件 17035 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\symbolManager.obj
文件 12079 2016-06-02 15:45 SemanticAnalysis\SemanticAnalysis\Debug\threeAddress.obj
文件 14282 2016-06-01 20:11 SemanticAnalysis\SemanticAnalysis\Debug\tokenQueue.obj
文件 84992 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\vc120.idb
文件 86016 2016-06-04 20:15 SemanticAnalysis\SemanticAnalysis\Debug\vc120.pdb
文件 2435999 2016-04-18 12:30 SemanticAnalysis\SemanticAnalysis\LRTable.txt
............此处省略38个文件信息
- 上一篇:web3.0开发包.zip
- 下一篇:CC2530 BasicRFTI源文件
相关资源
- 编译原理实验工具及参考源码(lex&
- 类pascal语言编译器(编译原理实验)
- 编译原理课程设计:词法语法编译器
- 中科院 编译原理 习题及解答
- 编译原理四元式和逆波兰式
- 《编译原理》清华大学版中的pl0扩充
- PL/0功能扩充break功能
- 编译原理LR(0)语法分析
- 编译原理中间代码生成程序
- 编译原理:LR分析程序
- 编译原理实验:词法分析,语法分析
- 吉林大学编译原理课件
- 编译原理龙书答案
- 编译原理 第三章课后习题答案
- 易语言变量和数组的编译原理
- 编译原理语法分析器、词法分析器
- 山东大学编译原理PL/0语言 compiler实验
- FOR循环语句的翻译程序设计简单优先
- NFA的确定化NFA->DFA完整可运行代码
- 哈工大威海编译原理实验报告和源代
- 哈工大威海-编译原理实验报告和源码
- 编译原理课设c编译器
- 赋值语句翻译四元式
- 河北工业大学编译原理实验代码及实
- 编译原理课程设计 while do循环语句翻
- 编译原理课程设计do——while简单优先
- 南开大学编译原理课件及作业
- 华工往年编译原理试卷
- 编译原理课程设计for循环LR法三元式
- 哈工程-编译原理课程设计(2016级)
评论
共有 条评论