首页 课程资源 C/C++     /    TINY扩充语言的语法分析

TINY扩充语言的语法分析

上传者: weixin_37783939 | 上传时间:2024/10/8 3:46:40 | 文件大小:145KB | 文件类型:rar
TINY扩充语言的语法分析
扩充的语法规则有:实现while、dowhile、for语句、大于>比较运算符号以及求余计算式子,具体文法规则自行构造。
可参考:P97及P136的文法规则。
(1)While-stmt-->whileexpdostmt-sequenceendwhile(2)Dowhile-stmt-->dostmt-sequencewhile(exp);(3)for-stmt-->foridentifier:=simple-exptosimple-expdostmt-sequenceenddo步长递增1(4)for-stmt-->foridentifier:=simple-expdowntosimple-expdostmt-sequenceenddo步长递减1(5)大于>比较运算符号以及求余计算式子的文法规则请自行组织。
(6)把TINY语言原有的if语句书写格式if_stmt-->ifexpthenstmt-sequenceend||ifexpthenstmt-sequenceelsestmt-sequenceend改写为:if_stmt-->if(exp)stmt-sequenceelsestmt-sequence|if(exp)stmt-sequence二、要求:(1)要提供一个源程序编辑界面,以让用户输入源程序(可保存、打开源程序)(2)可由用户选择是否生成语法树,并可查看所生成的语法树。
(3)应该书写完善的软件文档

文件下载

资源详情

[{"title":"(19个子文件145KB)TINY扩充语言的语法分析","children":[{"title":"lab3","children":[{"title":"Tiny实验报告.docx <span style='color:#111;'>131.51KB</span>","children":null,"spread":false},{"title":"tiny","children":[{"title":"mainwindow.ui <span style='color:#111;'>3.27KB</span>","children":null,"spread":false},{"title":"实验3内容及要求.txt <span style='color:#111;'>1.99KB</span>","children":null,"spread":false},{"title":"mainwindow.cpp <span style='color:#111;'>6.02KB</span>","children":null,"spread":false},{"title":"tiny.pro.user <span style='color:#111;'>43.26KB</span>","children":null,"spread":false},{"title":"test3.txt <span style='color:#111;'>257B</span>","children":null,"spread":false},{"title":"test2.txt <span style='color:#111;'>237B</span>","children":null,"spread":false},{"title":"globals.h <span style='color:#111;'>2.25KB</span>","children":null,"spread":false},{"title":"util.cpp <span style='color:#111;'>5.29KB</span>","children":null,"spread":false},{"title":"main.cpp <span style='color:#111;'>183B</span>","children":null,"spread":false},{"title":"test1.txt <span style='color:#111;'>253B</span>","children":null,"spread":false},{"title":"mainwindow.h <span style='color:#111;'>1.66KB</span>","children":null,"spread":false},{"title":"util.h <span style='color:#111;'>698B</span>","children":null,"spread":false},{"title":"scan.cpp <span style='color:#111;'>5.64KB</span>","children":null,"spread":false},{"title":"scan.h <span style='color:#111;'>322B</span>","children":null,"spread":false},{"title":"mymain.h <span style='color:#111;'>1.21KB</span>","children":null,"spread":false},{"title":"parse.cpp <span style='color:#111;'>6.39KB</span>","children":null,"spread":false},{"title":"tiny.pro <span style='color:#111;'>1.14KB</span>","children":null,"spread":false},{"title":"parse.h <span style='color:#111;'>147B</span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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