]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | #ifndef SCommonAST_h\r |
2 | #define SCommonAST_h\r | |
3 | \r | |
4 | #include <stdio.h>\r | |
5 | #include "PCCTSAST.h"\r | |
6 | #include "SASTBase.h"\r | |
7 | \r | |
8 | /* If you use SORCERER alone, you can subclass this to get a nice tree def */\r | |
9 | \r | |
10 | class SORCommonAST : public SORASTBase {\r | |
11 | protected:\r | |
12 | SORCommonAST *_right, *_down;\r | |
13 | int _type;\r | |
14 | \r | |
15 | public:\r | |
16 | SORCommonAST() { _right = _down = NULL; }\r | |
17 | PCCTS_AST *right() { return _right; } // define the SORCERER interface\r | |
18 | PCCTS_AST *down() { return _down; }\r | |
19 | int type() { return _type; }\r | |
20 | void setRight(PCCTS_AST *t) { _right = (SORCommonAST *)t; }\r | |
21 | void setDown(PCCTS_AST *t) { _down = (SORCommonAST *)t; }\r | |
22 | void setType(int t) { _type = t; }\r | |
23 | virtual PCCTS_AST *shallowCopy() {return NULL;}\r | |
24 | };\r | |
25 | \r | |
26 | #endif\r |