📄 work.h
字号:
#include<iostream.h>
#include"String.h"
#include<iostream.h>
#include"Souce.h"
class CDL
{
Souce souce; //标准字符存对象
String str; //程序字符串
int ip; //程序字符串指针
int error,line,*syn,*sum; //error为错误计数,line为当前行指针,syn存放种别码,sum存放整数
String *token; //程序中的字符
int sp,np,tp; //分别为syn,sum,token的指针
private:
bool IsLetter(char c);
bool IsDigit(char c);
public:
CDL(int s=300,int n=50,int t=150):ip(0),sp(0),np(0),tp(0)
{
syn=new int[s];
sum=new int[n];
token=new String[t];
}
//词法分析
void GetStr();
void Check();
bool ChKeyWord();
void ChLetter();
void ChDigit();
void ChDen();
//语法分析,递归下降分析法
void Compiler();
void Fun();
void Piece();
void Bunch();
void Sentence();
void Evaluate();
void Judge();
void Cyc();
void Condition();
void Expression();
void Member();
void Gene();
void Relation();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -