cifa.h

来自「编译课程设计」· C头文件 代码 · 共 42 行

H
42
字号
#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 + =
减小字号Ctrl + -
显示快捷键?