📄 symtab.h
字号:
#include <iostream.h>
#include <string.h>
//enum bool {false, true};
enum SymType {
STR_VAR, // String variable
STR_CONST, // String constant
};
class SymDesc {
public:
SymDesc (char *_name, SymType _type, char *_cont, int _line);
~SymDesc ();
void Show ();
char *name; // name of the symbol
char *cont; // contents (if string constant)
SymType type; // type of the symbol
int line; // line it was first encountered
SymDesc *next; // next symbol in list
};
class SymTab {
public:
SymTab();
~SymTab();
bool Add (SymDesc *symb);
SymDesc *Find (char *name);
void Show ();
private:
SymDesc *start;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -