文件名称:CP_work_8
- 所属分类:
- 编译器/词法分析
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-12-09
- 文件大小:
- 149kb
- 下载次数:
- 0次
- 提 供 者:
- jc***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个四则表达式分析软件,其接受从文件或键盘输入的四则表达式(运算对象支持整数和变量),给出该表达式的二叉树表达形式,并在键盘上按后续遍历方式输出该二叉树。
例如,输入a+b*c,输出 a b c * +
提示:参考下列的设计指导:
递归下降分析法实验设计思想及算法
为G的每个非终结符号U构造一个递归过程,不妨命名为U。U的产生式的右边指出这个过程的代码结构:
(1)若是终结符号,则和向前看符号对照,若匹配则向前进一个符号;否则出错。
(2)若是非终结符号,则调用与此非终结符对应的过程。当A的右部有多个产生式时,可用选择结构实现。-Design a four-expression analysis software, which accepts four expressions from a file or keyboard input (support integer operands and variables), given expression in the form of a binary tree of the expression, and on the keyboard, press the subsequent traversal of the binary output.
For example, enter a+ b* c, output a b c*+
Note: Refer to the following design guidelines:
Recursive descent experimental design ideas and algorithm analysis
To construct each nonterminal U G a recursive process, it may be named as U. U generates right-hand side indicates the code structure of the process:
(1) If the end of the symbol, and lookaheads contrast, if the match is to advance a symbol otherwise error.
(2) If the non-terminal symbol, then call this nonterminal corresponding process. When there are multiple right part A of production, s
例如,输入a+b*c,输出 a b c * +
提示:参考下列的设计指导:
递归下降分析法实验设计思想及算法
为G的每个非终结符号U构造一个递归过程,不妨命名为U。U的产生式的右边指出这个过程的代码结构:
(1)若是终结符号,则和向前看符号对照,若匹配则向前进一个符号;否则出错。
(2)若是非终结符号,则调用与此非终结符对应的过程。当A的右部有多个产生式时,可用选择结构实现。-Design a four-expression analysis software, which accepts four expressions from a file or keyboard input (support integer operands and variables), given expression in the form of a binary tree of the expression, and on the keyboard, press the subsequent traversal of the binary output.
For example, enter a+ b* c, output a b c*+
Note: Refer to the following design guidelines:
Recursive descent experimental design ideas and algorithm analysis
To construct each nonterminal U G a recursive process, it may be named as U. U generates right-hand side indicates the code structure of the process:
(1) If the end of the symbol, and lookaheads contrast, if the match is to advance a symbol otherwise error.
(2) If the non-terminal symbol, then call this nonterminal corresponding process. When there are multiple right part A of production, s
(系统自动生成,下载前可以参看下载内容)
下载文件列表
CP_work_8\CP_work_8\CP_work_8.vcxproj
.........\.........\CP_work_8.vcxproj.filters
.........\.........\Debug\CP_work_8.log
.........\.........\.....\..........tlog\CL.read.1.tlog
.........\.........\.....\..............\CL.write.1.tlog
.........\.........\.....\..............\CP_work_8.lastbuildstate
.........\.........\.....\..............\link.read.1.tlog
.........\.........\.....\..............\link.write.1.tlog
.........\.........\.....\main.obj
.........\.........\.....\vc120.idb
.........\.........\.....\vc120.pdb
.........\.........\main.cpp
.........\CP_work_8.sln
.........\CP_work_8.v12.suo
.........\.........\Debug\CP_work_8.tlog
.........\.........\Debug
.........\CP_work_8
.........\Debug
CP_work_8