文件名称:tlparen
介绍说明--下载内容来自于网络,使用问题请自行百度
« 问题描述:在对高级语言编写的程序进行编译时会遇到表达式或字符串的括号匹配问题。例如C++程序中左、右花括号“{”和“}”的匹配问题。表达式(字符串)的括号匹配问题要求确定一给定表达式(字符串)中左、右括号的匹配情况。例如,表达式(x*(x+y)-z)在位置1 和4处有左括号,在位置8 和11 处有右括号。位置1 处的左括号与位置11 处的右括号相匹配;位置4 处的左括号与位置8 处的右括号相匹配。而在表达式(x+y)*z)(中,位置8处的右括号没有可匹配的左括号,位置9处的左括号没有可匹配的右括号。« 编程任务:给定一个C++源程序,编程计算其中括号“”;“(”和“)”;“[”和“]”;“{”和“}”的匹配情况-laquo; Problem descr iption : In preparation for the high-level language compiler procedures that will be encountered expression or string matching brackets. C procedures such as left and right curly "(" and ")" matching problem. Expression (string), the brackets matching requirement to set a fixed expression (string) left and right brackets of the match. For example, the expression (x * (x y) - z) in a position and have left four brackets in position 8 and 11 have the right brackets. A position on the left with brackets of 11 positions in brackets right match; Location four brackets on the left and the location of eight brackets right match. The expression (x y) * z) (location eight brackets on the right side can not match left in brackets, location nine left in bracket
(系统自动生成,下载前可以参看下载内容)
下载文件列表
030300608paren.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.