词法分析器

上传者: chen76897 | 上传时间: 2021-05-16 23:31:47 | 文件大小: 91KB | 文件类型: RAR
一、实验目的 通过设计编写和调试词法分析程序,了解扫描器的组成结构,不同单词的识别方法,掌握由单词的词法分析规则出发,用程序实现扫描器的设计方法。 二、实验内容 1、定义表格,编写查找函数,填写token表和符号表 ; 2、编写 识别单词的函数,至少能识别关键字、标识符、界符、运算符、数值整数和实数; 3、 编写词法分析器的总程序,能完成界面输出; 三、实验方案设计 词法分析程序的功能是从源程序中读入一个个字符,一句sample语言的语法规则,识别出每个单词,若有错误,这报告错误,并指出错误所在位置。 1.定义符号表 2.编写词法分析主函数 3.编写分类函数 4.分别编写识别关键字,识别运算符,识别常数,识别界符,识别表示符函数。 5.编写错误提示函数。

文件下载

资源详情

[{"title":"( 27 个子文件 91KB ) 词法分析器","children":[{"title":"编译原理系统","children":[{"title":"WindowsFormsApplication1","children":[{"title":"WindowsFormsApplication1","children":[{"title":"Form1.cs <span style='color:#111;'> 2.13KB </span>","children":null,"spread":false},{"title":"Gets.cs <span style='color:#111;'> 15.34KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 524B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.csproj <span style='color:#111;'> 3.65KB </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 14.99KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"Form1.Designer.cs <span style='color:#111;'> 31.37KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"x86","children":[{"title":"Debug","children":[{"title":"GenerateResource.read.1.tlog <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"ResolveAssemblyReference.cache <span style='color:#111;'> 7.71KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.csproj.FileListAbsolute.txt <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.25KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.exe <span style='color:#111;'> 32.00KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.pdb <span style='color:#111;'> 49.50KB </span>","children":null,"spread":false},{"title":"GenerateResource.write.1.tlog <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.Form1.resources <span style='color:#111;'> 6.75KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WindowsFormsApplication1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.exe <span style='color:#111;'> 32.00KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.pdb <span style='color:#111;'> 49.50KB </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.vshost.exe <span style='color:#111;'> 11.33KB </span>","children":null,"spread":false}],"spread":true},{"title":"Release","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"WindowsFormsApplication1.sln <span style='color:#111;'> 914B </span>","children":null,"spread":false},{"title":"WindowsFormsApplication1.suo <span style='color:#111;'> 24.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • yitengfeng :
    这个还行吧!不符合老师的要求
    2014-05-16

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明