summaryrefslogtreecommitdiffstats
path: root/poxml/antlr/antlr/CommonASTWithHiddenTokens.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-12-16 17:43:36 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-12-16 22:23:19 +0900
commit7d4f47bd0bf7544dbd7f64ed4089e80780c1d2bd (patch)
treef7e3d4f8731326ee1ee3fdeae370e7528a89c652 /poxml/antlr/antlr/CommonASTWithHiddenTokens.h
parentd24f40d9befa84da067a756437c70e20461b511b (diff)
downloadtdesdk-7d4f47bd0bf7544dbd7f64ed4089e80780c1d2bd.tar.gz
tdesdk-7d4f47bd0bf7544dbd7f64ed4089e80780c1d2bd.zip
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'poxml/antlr/antlr/CommonASTWithHiddenTokens.h')
-rw-r--r--poxml/antlr/antlr/CommonASTWithHiddenTokens.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/poxml/antlr/antlr/CommonASTWithHiddenTokens.h b/poxml/antlr/antlr/CommonASTWithHiddenTokens.h
new file mode 100644
index 00000000..6385a0fc
--- /dev/null
+++ b/poxml/antlr/antlr/CommonASTWithHiddenTokens.h
@@ -0,0 +1,41 @@
+#ifndef INC_CommonASTWithHiddenTokens_hpp__
+#define INC_CommonASTWithHiddenTokens_hpp__
+
+/** A CommonAST whose initialization copies hidden token
+ * information from the Token used to create a node.
+ */
+
+#include "antlr/config.h"
+#include "antlr/CommonAST.h"
+
+ANTLR_BEGIN_NAMESPACE(antlr)
+
+class CommonASTWithHiddenTokens : public CommonAST {
+public:
+ CommonASTWithHiddenTokens() : CommonAST()
+ {
+ }
+ virtual ~CommonASTWithHiddenTokens()
+ {
+ }
+protected:
+ RefToken hiddenBefore,hiddenAfter; // references to hidden tokens
+public:
+ virtual RefToken getHiddenAfter() const
+ { return hiddenAfter; }
+ virtual RefToken getHiddenBefore() const
+ { return hiddenBefore; }
+
+ // Borland C++ builder seems to need the decl's of the first two...
+ virtual void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt);
+ virtual void initialize(RefAST t);
+ virtual void initialize(RefToken t);
+
+ static RefAST factory();
+};
+
+typedef ASTRefCount<CommonASTWithHiddenTokens> RefCommonASTWithHiddenTokens;
+
+ANTLR_END_NAMESPACE
+
+#endif //INC_CommonASTWithHiddenTokens_hpp__