summaryrefslogtreecommitdiffstats
path: root/lib/antlr/src/CommonASTWithHiddenTokens.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/antlr/src/CommonASTWithHiddenTokens.cpp')
-rw-r--r--lib/antlr/src/CommonASTWithHiddenTokens.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/lib/antlr/src/CommonASTWithHiddenTokens.cpp b/lib/antlr/src/CommonASTWithHiddenTokens.cpp
new file mode 100644
index 00000000..b0e1a3dd
--- /dev/null
+++ b/lib/antlr/src/CommonASTWithHiddenTokens.cpp
@@ -0,0 +1,64 @@
+/* ANTLR Translator Generator
+ * Project led by Terence Parr at http://www.jGuru.com
+ * Software rights: http://www.antlr.org/license.html
+ *
+ * $Id$
+ */
+#include "antlr/config.hpp"
+#include "antlr/AST.hpp"
+#include "antlr/BaseAST.hpp"
+#include "antlr/CommonAST.hpp"
+#include "antlr/CommonASTWithHiddenTokens.hpp"
+#include "antlr/CommonHiddenStreamToken.hpp"
+
+#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
+namespace antlr {
+#endif
+
+const char* const CommonASTWithHiddenTokens::TYPE_NAME = "CommonASTWithHiddenTokens";
+// RK: Do not put constructor and destructor into the header file here..
+// this triggers something very obscure in gcc 2.95.3 (and 3.0)
+// missing vtables and stuff.
+// Although this may be a problem with with binutils.
+CommonASTWithHiddenTokens::CommonASTWithHiddenTokens()
+: CommonAST()
+{
+}
+
+CommonASTWithHiddenTokens::~CommonASTWithHiddenTokens()
+{
+}
+
+void CommonASTWithHiddenTokens::initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt)
+{
+ CommonAST::initialize(t,txt);
+}
+
+void CommonASTWithHiddenTokens::initialize(RefAST t)
+{
+ CommonAST::initialize(t);
+ hiddenBefore = RefCommonASTWithHiddenTokens(t)->getHiddenBefore();
+ hiddenAfter = RefCommonASTWithHiddenTokens(t)->getHiddenAfter();
+}
+
+void CommonASTWithHiddenTokens::initialize(RefToken t)
+{
+ CommonAST::initialize(t);
+ hiddenBefore = static_cast<CommonHiddenStreamToken*>(t.get())->getHiddenBefore();
+ hiddenAfter = static_cast<CommonHiddenStreamToken*>(t.get())->getHiddenAfter();
+}
+
+RefAST CommonASTWithHiddenTokens::factory()
+{
+ return RefAST(new CommonASTWithHiddenTokens);
+}
+
+RefAST CommonASTWithHiddenTokens::clone( void ) const
+{
+ CommonASTWithHiddenTokens *ast = new CommonASTWithHiddenTokens( *this );
+ return RefAST(ast);
+}
+
+#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
+}
+#endif