设计SAMPLE语言的词法分析器 检查要求: 启动程序后,先输出作者姓名、班级、学号(可用汉语、英语或拼音); 请求输入测试程序名,键入程序名后自动开始词法分析并输出结果; 输出结果为单词的二元式序列(样式见样板输出1和2); 要求能发现下列词法错误和指出错误性质和位置: 非法字符,即不是SAMPLE字符集的符号; 字符常数缺右边的单引号(字符常数要求左、右边用单引号界定,不能跨行); 注释部分缺右边的界符*/(注释要求左右边分别用/*和*/界定,不能
2019-12-21 20:02:39 3KB 编译 词法分析 Sample 二元式
1
该词法分析器是编译原理课程设计时的项目,使用c语言编写,文件夹中的大部分文件都是当时使用的参考文件,文件夹‘词法分析器’为完成的可以直接运行的词法分析器,解压后可以直接运行。
1
由myclipse开发,实现简单的c语言的词法分析,可导入myeclipse中直接运行
2019-12-21 19:53:01 11KB 编译
1
C语言词法分析(能够识别保留字,标识符,字符串等),能够实现基本的词法分析功能!
2019-12-21 19:45:36 19KB C语言词法分析器
1
C语言词法分析器 #include #include #include char *key0[]={" ","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","_Complex","_Imaginary","union","unsigned","void","volatile","while"}; /*保留字表*/ char *key1[]={" ","(",")","[","]","{","}",",",";","'"}; /*分隔符表*/ char *key2[]={" ","+","-","*","/","%","","==",">=","<=","!=","!","&&","||","<>","~","|","^","&","=","?:","->","++","--",".","+=","-=","*=","/="}; /*运算符表*/ int xx0[35],xx1[10],xx2[31]; .......
2019-12-21 19:37:21 19KB C语言词法分析器
1
利用Java编写简单的C语言词法分析器,实现编译原理课程的第一部分:词法分析器
2019-12-21 19:24:57 136KB 编译原理 词法分析器
1
在学习编译原理的过程中写的一个关于C语言的词法分析器,大家一起交流,是一个Eclipse项目文件,导入项目后test类运行主程序
2019-12-21 19:24:15 738KB C语言词法分析器 Java版 界面
1
一个很简单的c语言词法分析器,适合刚学编译原理的同学阅读
2019-12-21 19:21:34 4KB c语言 词法分析
1