📄 scanner.h
字号:
#ifndef __SCANNER_H__
#define __SCANNER_H__
#include "ctalk.h"
#define GET_BUF_SIZE 1024
class CtkScanner {
FILE* yyfile;
char yybuf[GET_BUF_SIZE+1];
char* yyptr;
public:
int yyline;
void reset(FILE* f);
int get();
void error(char const* msg);
static CtkScanner instance;
};
#define TOKEN_HASH_TABLE_SIZE 13135
struct CtkToken;
class CtkSymbolTable {
CtkToken* tokenHashTable[TOKEN_HASH_TABLE_SIZE];
int nSymbols;
public:
CtkToken* add(char const* name, int tag);
static CtkSymbolTable instance;
CtkSymbolTable();
~CtkSymbolTable();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -