登录
首页 » C# » « 问题描述:在对高级语言编写的程序进行编译时会遇到表达式或字符串的括号匹配问题。例如C++程序中左、右花括号“{”和“}”的匹配问题。表达式(字符...

« 问题描述:在对高级语言编写的程序进行编译时会遇到表达式或字符串的括号匹配问题。例如C++程序中左、右花括号“{”和“}”的匹配问题。表达式(字符...

于 2022-04-17 发布 文件大小:1.17 kB
0 137
下载积分: 2 下载次数: 1

代码说明:

« 问题描述:在对高级语言编写的程序进行编译时会遇到表达式或字符串的括号匹配问题。例如C++程序中左、右花括号“{”和“}”的匹配问题。表达式(字符串)的括号匹配问题要求确定一给定表达式(字符串)中左、右括号的匹配情况。例如,表达式(x*(x+y)-z)在位置1 和4处有左括号,在位置8 和11 处有右括号。位置1 处的左括号与位置11 处的右括号相匹配;位置4 处的左括号与位置8 处的右括号相匹配。而在表达式(x+y)*z)(中,位置8处的右括号没有可匹配的左括号,位置9处的左括号没有可匹配的右括号。« 编程任务:给定一个C++源程序,编程计算其中括号“”;“(”和“)”;“[”和“]”;“{”和“}”的匹配情况-laquo; Problem description : 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 expr

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 【11】STM32F407_ADC
    说明:  采用stm32f4核心板,实现AD采集,效果很理想,可测量流量,液位(Achieving Flow Acquisition)
    2018-12-22 17:30:40下载
    积分:1
  • GMap
    在MFC对话框中插入谷歌地图,完整VS2010工程。(Insert Google Map in MFC Dialog, VS2010 Project)
    2013-01-11 15:16:34下载
    积分:1
  • 此应用程序演示 Microsoft 基础类的基本使用方法,还可作为编写应用程序的起点。
    应用程序向导创建一个对话框类: FVTDlg.h,FVTDlg.cpp - 对话框 这些文件包含 CFVTDlg 类。该类定义应用程序主对话框的行为。该对话框的模板位于 FVT.rc 中,该文件可以在 Microsoft Visual C++ 中进行编辑。 其他功能: ActiveX 控件 应用程序包括对使用 ActiveX 控件的支持。 打印及打印预览支持 应用程序向导已通过从 MFC 库调用 CView 类中的成员函数,生成了用于处理打印、打印设置和打印预览命令的代码。
    2023-07-20 21:00:10下载
    积分:1
  • verystrkng
    VC中常用的CListCtrl控件,该代码的功能主要是实现查询,功能不是很强,但代码的思想具有很强的参考,很有实用价值(Common CListCtrl control in VC, the function of this code is mainly to realize query, function is not very strong, but the idea of the code has a strong reference, very practical value)
    2018-12-21 15:48:30下载
    积分:1
  • PLC-Editor
    TC30环境下用C语言实现的PLC编辑器,其中用到了BGI绘图功能,对学习C语言和认识PLC有很好的帮助。(Under TC30 environment using C language implementation of PLC editor, which uses BGI graphics capabilities, to learn C language and understanding of PLC have good help.)
    2015-01-12 20:34:39下载
    积分:1
  • stepper motor control PWM output
    通过单片机stm32f103控制定时器PWM细分控制步进电机
    2023-08-21 23:00:04下载
    积分:1
  • AMD-Flash-Programmer-(C)
    ADI adsp_21262 并口flash driver(ADI adsp_21262 parallel port driver)
    2012-01-10 09:27:12下载
    积分:1
  • GGMeeting_a5
    语音视频数据都是实时采集、实时播放的数据,所以测试时,服务器的带宽要求最好是独享带宽,共享带宽一般无法满足实时语音视频的要求。 实时语音视频而言,100M的共享带宽,还不如5M的独享。(Voice and video data are real-time data acquisition and playback, so when testing, the best bandwidth requirement of the server is exclusive bandwidth. Shared bandwidth generally can not meet the requirements of real-time voice and video. For real-time voice and video, the shared bandwidth of 100M is not as good as that of 5M.)
    2020-06-20 09:00:01下载
    积分:1
  • C# MVC微信开发公众平台
    C#开发的微信公众平台,菜单栏目,自动回复,LBS定义,功能模块丰富,可量身定,制微官网,微客服,微相册,微推送,微餐饮,微房产,微商城,微美容,微汽车,大转盘,刮刮乐等数百种功能
    2022-03-11 03:49:33下载
    积分:1
  • agentga
    关于多智能体遗传算法优化神经网络的MATLAB程序(On multi-agent genetic algorithm to optimize the MATLAB neural network program)
    2010-06-17 09:07:38下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载