文件名称:CP_work_8
-
所属分类:
- 标签属性:
- 上传时间:2013-12-09
-
文件大小:149kb
-
已下载:2次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设计一个四则表达式分析软件,其接受从文件或键盘输入的四则表达式(运算对象支持整数和变量),给出该表达式的二叉树表达形式,并在键盘上按后续遍历方式输出该二叉树。
例如,输入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/CP_work_8/CP_work_8.vcxproj.filters
CP_work_8/CP_work_8/Debug/CP_work_8.log
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/cl.command.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CL.read.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CL.write.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CP_work_8.lastbuildstate
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.command.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.read.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.write.1.tlog
CP_work_8/CP_work_8/Debug/main.obj
CP_work_8/CP_work_8/Debug/vc120.idb
CP_work_8/CP_work_8/Debug/vc120.pdb
CP_work_8/CP_work_8/main.cpp
CP_work_8/CP_work_8.sln
CP_work_8/CP_work_8.v12.suo
CP_work_8/CP_work_8/Debug/CP_work_8.tlog
CP_work_8/CP_work_8/Debug
CP_work_8/CP_work_8
CP_work_8/Debug
CP_work_8
CP_work_8/CP_work_8/CP_work_8.vcxproj.filters
CP_work_8/CP_work_8/Debug/CP_work_8.log
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/cl.command.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CL.read.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CL.write.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/CP_work_8.lastbuildstate
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.command.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.read.1.tlog
CP_work_8/CP_work_8/Debug/CP_work_8.tlog/link.write.1.tlog
CP_work_8/CP_work_8/Debug/main.obj
CP_work_8/CP_work_8/Debug/vc120.idb
CP_work_8/CP_work_8/Debug/vc120.pdb
CP_work_8/CP_work_8/main.cpp
CP_work_8/CP_work_8.sln
CP_work_8/CP_work_8.v12.suo
CP_work_8/CP_work_8/Debug/CP_work_8.tlog
CP_work_8/CP_work_8/Debug
CP_work_8/CP_work_8
CP_work_8/Debug
CP_work_8
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.