⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cifa.h

📁 实现编译
💻 H
字号:
#ifndef __CIFA_H
#define __CIFA_H

#include <stdio.h>
#include "symset.h"
#include "pl0.h"

#define IDENT_LENGTH	11		//length of identifiers
#define NUMBER_LENGTH	9		//最大数位
#define MAX_NUMBER		2047	//最大整数

class CCifa
{
public:
	CCifa(CPlCompiler * );
	~CCifa();
	symbol GetSymbol();
	int GetLine() {return line;}

public:
	char id[IDENT_LENGTH+1];
	int num;

//////////////////////////////////////////////
private:
	void create_ht();
	int hushsrch(char *word);
	int hush(char *s);			//哈希函数

private:
	struct word_table{
		char word[IDENT_LENGTH+1];
		symbol sym;
	}	*wt;			//关键字表
	char ht[20];	//关键字的哈希表

	char ch;
	int line;		//行号
	CPlCompiler *pl;
};

#endif //cifa.h

⌨️ 快捷键说明

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