wenfa.h

来自「此为编译原理的作业中的预测分析表的生成的原代码」· C头文件 代码 · 共 47 行

H
47 行
字号
#ifndef WENFA_H
#define WENFA_H
const int len=20;
const int number=10;
typedef struct{//状态集合
	char fa_q[len];
	char fa_h[number][len];
}FA;
typedef struct{//规则
	char gz_q;//规则前部
	bool boolq;//规则前部是否加了标记
	char gz_h[len];//规则后部
    bool boolh[len];//规则后部是否加标记
	int  cnt;//后部非终结符的个数
	bool boolde;
}GZ;
class WenFa{
private:
    char (*s)[len];//存放输入	
	int des;//被删除规则数
    FA *fa;
protected:
	char Sbf;//识别符
	char *VN;//非终结符
	char *VT;//终结符
	int GZS;//规则个数
	GZ *gz;//规则
public:
	WenFa();
	~WenFa();
	void ChuLi(int ,int);
	bool WFinput(void);
    void display_GZ(void);
	void display_Ys(void);
    bool BoolAll(void);
	bool TiaoJ1();
	bool TiaoJ2();
	void YaSou(void);
	void Find(FA *);
	void NchD(void);
	void OutNchD(int);
};
#endif



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?