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

📄 biaoge.h

📁 实现编译
💻 H
字号:
// Biaoge.h: interface for the Biaoge class.
//
//////////////////////////////////////////////////////////////////////

#ifndef __BIAOGE_H
#define __BIAOGE_H

#include "pl0.h"
#include "errors.h"
#include "yufa.h"

#define TABLE_SIZE	100

enum object {constant,variable,procedure};

struct table_type
{
	char name[IDENT_LENGTH+1];
	object kind;
	union{
		int val;
		struct{
			int level,adr,size;
		};
	};
};

class CBiaoge
{
public:
	CBiaoge(CPlCompiler*);
	void Enter(enum object k);
	int Position(char *id);
	int TableIndex(){return tx[lev];}
public:
	table_type table[TABLE_SIZE];
private:
	int tx[MAX_LEVEL+1];
	int lev;

	CPlCompiler *pl;
};

#endif // biaoge.h

⌨️ 快捷键说明

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