ast.h
来自「SRI international 发布的OAA框架软件」· C头文件 代码 · 共 22 行
H
22 行
/* AST.h; this tree def satisfies both ANTLR and SORCERER constraints */
#include "ASTBase.h"
#include "AToken.h"
#define AtomSize 20
#include "ATokPtr.h"
class AST : public ASTBase {
protected:
char text[AtomSize+1];
int _type;
public:
AST(ANTLRTokenPtr t){ _type = t->getType(); strcpy(text, t->getText()); }
AST() { _type = 0; }
int type() { return _type; } // satisfy remaining SORCERER stuff
char *getText() { return text; }
void preorder_action() { printf(" %s", text); }
};
typedef AST SORAST; // define the type of a SORCERER tree
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?