]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Other/Maintained/Tools/Pccts/sorcerer/h/SCommonAST.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Other / Maintained / Tools / Pccts / sorcerer / h / SCommonAST.h
diff --git a/EdkCompatibilityPkg/Other/Maintained/Tools/Pccts/sorcerer/h/SCommonAST.h b/EdkCompatibilityPkg/Other/Maintained/Tools/Pccts/sorcerer/h/SCommonAST.h
new file mode 100644 (file)
index 0000000..79f9018
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef SCommonAST_h\r
+#define SCommonAST_h\r
+\r
+#include <stdio.h>\r
+#include "PCCTSAST.h"\r
+#include "SASTBase.h"\r
+\r
+/* If you use SORCERER alone, you can subclass this to get a nice tree def */\r
+\r
+class SORCommonAST : public SORASTBase {\r
+protected:\r
+  SORCommonAST *_right, *_down;\r
+  int _type;\r
+\r
+public:\r
+  SORCommonAST() { _right = _down = NULL; }\r
+  PCCTS_AST *right()  { return _right; }  // define the SORCERER interface\r
+  PCCTS_AST *down()  { return _down; }\r
+  int type()     { return _type; }\r
+  void setRight(PCCTS_AST *t) { _right = (SORCommonAST *)t; }\r
+  void setDown(PCCTS_AST *t)  { _down = (SORCommonAST *)t; }\r
+  void setType(int t)     { _type = t; }\r
+  virtual PCCTS_AST *shallowCopy() {return NULL;}\r
+};\r
+\r
+#endif\r