简单词法分析器C#含代码

上传者: shizhiyu701 | 上传时间: 2020-04-15 03:13:24 | 文件大小: 70KB | 文件类型: APPLICATION/OCTET-STREAM
去年做的编译原理作业,由于时间紧迫,没有完成语法分析与语义分析,但拥有比较完善的界面(界面有两个,在主程序中可以修改使用哪个界面)。 词法规则如下: 关键字:int char if else real for do while 数字、变量名(不使用下划线,头字母不为数字)、符号 词法分析生成*.TAKEN、*.SymbolTable两个文件。 保留部分语法分析接口,可以继续完成。 词法分析部分在Lex文件夹下,生成中间数据存储的类在Data下。 由于老师给的语法分析规则太复杂(老师给的还是错的,我后来自己改的),而且在程序中还没有体现,故不上传,需要的可以来信索取,有完成的语法分析表(不知道是否正确……orz)。 注:在界面最下边……2009后面有一个箭头可以弹出菜单,选择"恢复默认设置"即可使用全部功能。将DisplayForm.cs中38-40行的 toolStrip1.Visible = false; toolStrip2.Visible = false; listBox1.Visible = false; 中false改为ture则默认显示全部组件。 本程序系自己完成,版权没有,盗版自由,个人完成程序均免资源分下载。 shizhiyu701@live.cn

文件下载

资源详情

[{"title":"( 56 个子文件 70KB ) 简单词法分析器C#含代码","children":[{"title":"LexApplication","children":[{"title":"LexApplication","children":[{"title":"TextUserControl.resx <span style='color:#111;'> 5.68KB </span>","children":null,"spread":false},{"title":"DisplayForm.cs <span style='color:#111;'> 14.35KB </span>","children":null,"spread":false},{"title":"Form1.cs <span style='color:#111;'> 1.90KB </span>","children":null,"spread":false},{"title":"Data","children":[{"title":"Node.cs <span style='color:#111;'> 515B </span>","children":null,"spread":false},{"title":"TreeNode.cs <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"StringGetNum.cs <span style='color:#111;'> 714B </span>","children":null,"spread":false},{"title":"SymbolTable.cs <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"WordListNumber.cs <span style='color:#111;'> 749B </span>","children":null,"spread":false},{"title":"SymbolTableNumber.cs <span style='color:#111;'> 748B </span>","children":null,"spread":false},{"title":"Table.cs <span style='color:#111;'> 7.00KB </span>","children":null,"spread":false},{"title":"WordList.cs <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"新建代码.SymbolTable <span style='color:#111;'> 64B </span>","children":null,"spread":false},{"title":"新建代码.TOKEN <span style='color:#111;'> 365B </span>","children":null,"spread":false},{"title":"新建文件.code.SymbolTable <span style='color:#111;'> 64B </span>","children":null,"spread":false},{"title":"LexApplication.pdb <span style='color:#111;'> 135.50KB </span>","children":null,"spread":false},{"title":"新建文件.code <span style='color:#111;'> 66B </span>","children":null,"spread":false},{"title":"LexApplication.exe <span style='color:#111;'> 50.50KB </span>","children":null,"spread":false},{"title":"LexApplication.vshost.exe <span style='color:#111;'> 13.99KB </span>","children":null,"spread":false},{"title":"新建文件.code.TOKEN <span style='color:#111;'> 378B </span>","children":null,"spread":false},{"title":"新建代码 <span style='color:#111;'> 68B </span>","children":null,"spread":false},{"title":"LexApplication.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"DisplayForm.resx <span style='color:#111;'> 19.29KB </span>","children":null,"spread":false},{"title":"Writer.cs <span style='color:#111;'> 952B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"LexApplication.TextUserControl.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"LexApplication.pdb <span style='color:#111;'> 135.50KB </span>","children":null,"spread":false},{"title":"LexApplication.csproj.GenerateResource.Cache <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"Refactor","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"LexApplication.exe <span style='color:#111;'> 50.50KB </span>","children":null,"spread":false},{"title":"LexApplication.Form1.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"LexApplication.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"LexApplication.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"LexApplication.DisplayForm.resources <span style='color:#111;'> 9.39KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Parsing","children":null,"spread":false},{"title":"Properties","children":[{"title":"Resources.Designer.cs <span style='color:#111;'> 2.81KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":true},{"title":"Program.cs <span style='color:#111;'> 501B </span>","children":null,"spread":false},{"title":"LexApplication.csproj <span style='color:#111;'> 5.28KB </span>","children":null,"spread":false},{"title":"TextUserControl.cs <span style='color:#111;'> 5.33KB </span>","children":null,"spread":false},{"title":"Form1.Designer.cs <span style='color:#111;'> 6.17KB </span>","children":null,"spread":false},{"title":"DisplayForm.designer.cs <span style='color:#111;'> 30.21KB </span>","children":null,"spread":false},{"title":"TextReader.cs <span style='color:#111;'> 774B </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 5.88KB </span>","children":null,"spread":false},{"title":"Lex","children":[{"title":"MatchInteger.cs <span style='color:#111;'> 915B </span>","children":null,"spread":false},{"title":"MatchIdentifier.cs <span style='color:#111;'> 1.17KB </span>","children":null,"spread":false},{"title":"SymbolsList.cs <span style='color:#111;'> 716B </span>","children":null,"spread":false},{"title":"WordCode.cs <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"KeywordsList.cs <span style='color:#111;'> 511B </span>","children":null,"spread":false},{"title":"DisplayError.cs <span style='color:#111;'> 686B </span>","children":null,"spread":false},{"title":"MatchSpace.cs <span style='color:#111;'> 465B </span>","children":null,"spread":false},{"title":"SeparatorsList.cs <span style='color:#111;'> 764B </span>","children":null,"spread":false},{"title":"TakeWord.cs <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false},{"title":"MatchWord.cs <span style='color:#111;'> 3.94KB </span>","children":null,"spread":false}],"spread":false},{"title":"TextUserControl.designer.cs <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false}],"spread":false},{"title":"LexApplication.sln <span style='color:#111;'> 932B </span>","children":null,"spread":false},{"title":"LexApplication.suo <span style='color:#111;'> 58.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • 啤酒 :
    嗯,可以使用,很好的学习资料
    2019-11-29
  • laobenaichouchou :
    非常好的例子 学习到了
    2015-06-05
  • qq_27442003 :
    嗯。不错,好东西。收藏下来,以后有用到之处
    2015-06-01
  • TWJAXM :
    還不錯。但還是有一些不理解的地方,分詞,是不是要自己加上一個指定的詞來分析?對於中文好象沒有分析清晰。
    2014-12-14
  • 123456xjy :
    提供了一种思路,可以学习一下。
    2013-05-30

免责申明

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