?? yufafenxi.cpp
字號(hào):
#include"Init.h"
#include"ReadFormula.h"
#include"ChangToTokens.h"
#include"Judge.h"
#include"OutPut.h"
#include "stdio.h"
#include "stdlib.h"
#define TRUE 1
#define FALSE 0
//函數(shù)聲明:
void End(); //程序退出前作善后處理
///////////////////////////////////////
void main()
{
if(! Init()) //初始化
{
printf("初始化失??!程序不能繼續(xù)。錯(cuò)誤信息如下:\n%s\n",ErrMsg);
exit(0);
}
while(ReadFormula()) //從文件中讀表達(dá)式成功
{
if(ChangeToTokens()) //將表達(dá)式分割成單詞序列
{
if(Judge()) //利用算符優(yōu)先關(guān)系表判斷表達(dá)式(單詞序列)是否正確
OutPut(Buffer,"正確!");
else
OutPut(Buffer,ErrMsg); //輸出錯(cuò)誤信息
}
else //出錯(cuò)
{
OutPut(Buffer,ErrMsg); //輸出錯(cuò)誤信息
}
}
End(); //程序退出前作善后處理
}
//程序退出前作善后處理
//主要是關(guān)閉文件等
void End()
{
fclose(fTestIn);
fclose(fTestOut);
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -