1 /* ANTLR Translator Generator
2  * Project led by Terence Parr at http://www.jGuru.com
3  * Software rights: http://www.antlr.org/license.html
4  *
5  * $Id: ASTNULLType.cpp,v 1.1.1.1 2004-12-09 15:10:20 m_schellens Exp $
6  */
7 
8 #include "antlr/config.hpp"
9 #include "antlr/AST.hpp"
10 #include "antlr/ASTNULLType.hpp"
11 
12 #include <iostream>
13 
14 ANTLR_USING_NAMESPACE(std)
15 
16 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
17 namespace antlr {
18 #endif
19 
clone(void) const20 RefAST ASTNULLType::clone( void ) const
21 {
22 	return RefAST(this);
23 }
24 
addChild(RefAST)25 void ASTNULLType::addChild( RefAST )
26 {
27 }
28 
getNumberOfChildren() const29 size_t ASTNULLType::getNumberOfChildren() const
30 {
31 	return 0;
32 }
33 
equals(RefAST) const34 bool ASTNULLType::equals( RefAST ) const
35 {
36 	return false;
37 }
38 
equalsList(RefAST) const39 bool ASTNULLType::equalsList( RefAST ) const
40 {
41 	return false;
42 }
43 
equalsListPartial(RefAST) const44 bool ASTNULLType::equalsListPartial( RefAST ) const
45 {
46 	return false;
47 }
48 
equalsTree(RefAST) const49 bool ASTNULLType::equalsTree( RefAST ) const
50 {
51 	return false;
52 }
53 
equalsTreePartial(RefAST) const54 bool ASTNULLType::equalsTreePartial( RefAST ) const
55 {
56 	return false;
57 }
58 
findAll(RefAST)59 vector<RefAST> ASTNULLType::findAll( RefAST )
60 {
61 	return vector<RefAST>();
62 }
63 
findAllPartial(RefAST)64 vector<RefAST> ASTNULLType::findAllPartial( RefAST )
65 {
66 	return vector<RefAST>();
67 }
68 
getFirstChild() const69 RefAST ASTNULLType::getFirstChild() const
70 {
71 	return this;
72 }
73 
getNextSibling() const74 RefAST ASTNULLType::getNextSibling() const
75 {
76 	return this;
77 }
78 
getText() const79 string ASTNULLType::getText() const
80 {
81 	return "<ASTNULL>";
82 }
83 
getType() const84 int ASTNULLType::getType() const
85 {
86 	return Token::NULL_TREE_LOOKAHEAD;
87 }
88 
initialize(int,const string &)89 void ASTNULLType::initialize( int, const string& )
90 {
91 }
92 
initialize(RefAST)93 void ASTNULLType::initialize( RefAST )
94 {
95 }
96 
initialize(RefToken)97 void ASTNULLType::initialize( RefToken )
98 {
99 }
100 
101 #ifdef ANTLR_SUPPORT_XML
initialize(istream &)102 void ASTNULLType::initialize( istream& )
103 {
104 }
105 #endif
106 
setFirstChild(RefAST)107 void ASTNULLType::setFirstChild( RefAST )
108 {
109 }
110 
setNextSibling(RefAST)111 void ASTNULLType::setNextSibling( RefAST )
112 {
113 }
114 
setText(const string &)115 void ASTNULLType::setText( const string& )
116 {
117 }
118 
setType(int)119 void ASTNULLType::setType( int )
120 {
121 }
122 
toString() const123 string ASTNULLType::toString() const
124 {
125 	return getText();
126 }
127 
toStringList() const128 string ASTNULLType::toStringList() const
129 {
130 	return getText();
131 }
132 
toStringTree() const133 string ASTNULLType::toStringTree() const
134 {
135 	return getText();
136 }
137 
138 #ifdef ANTLR_SUPPORT_XML
attributesToStream(ostream &) const139 bool ASTNULLType::attributesToStream( ostream& ) const
140 {
141 	return false;
142 }
143 
toStream(ostream & out) const144 void ASTNULLType::toStream( ostream& out ) const
145 {
146 	out << "</ASTNULL>" << endl;
147 }
148 #endif
149 
typeName(void) const150 const char* ASTNULLType::typeName( void ) const
151 {
152 	return "ASTNULLType";
153 }
154 
155 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
156 }
157 #endif
158