课程实践项目.doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《课程实践项目.doc》由会员分享,可在线阅读,更多相关《课程实践项目.doc(3页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、课程实践项目一、PL/0语言的扩展1、课程实践要完成下列要求(1)给PL/0语言增加像C语言那样的形式为/* */的注释。(2)给PL/0语言增加带else子句的条件语句和exit语句。(3)给PL/0语言增加输入输出语句。(4)给PL/0语言增加带参数的过程。(5)给PL/0语言增加布尔类型。(6)给PL/0语言增加数组类型。(7)给PL/0语言增加函数类型。(8)给PL/0语言增加实数类型。(9)分离解释器和编译器为两个独立的程序。2、扩展后的PL/0语言的语法ProgramBlock .BlockConstDeclTypeDeclVarDeclFuncDecl begin Stmt ;
2、Stmt endConstDeclconst ConstDef ; ConstDef ;ConstDefident = number ;TypeDecltype TypeDef TypeDef TypeDefident = TypeExp ;TypeExpinteger | real | Boolean | array number . number of TypeExpVarDeclvar VarDec VarDec VarDecident , ident : Type ;Typeinteger | real | Boolean | identFuncDeclFuncDec FuncDec
3、FuncDec procedure ident ( ForParal ) ; Block ; |function ident ( ForParal ) : Type ; Block ;ForParalident : Type ; ident : Type Stmt IdentRef := Exp | if Exp then Stmt | if Exp then Stmt else Stmt |begin Stmt ; Stmt end | while Exp do Stmt | exit | e |call ident ( ActParal ) | write ( Exp , Exp ) |r
4、ead (IdentRef , IdentRef ) IdentRefident Exp Exp ActParalExp , Exp Exp SimpExp RelOp SimpExp | SimpExpRelOp = | | | =SimpExp + | - Term + Term | - Term | or TermTerm Factor * Factor | / Factor | div Factor | mod Factor | and FactorFactor IdentRef | number | ( Exp ) | not Factor | ident ( ActParal )
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 课程 实践 项目
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内