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) const20RefAST ASTNULLType::clone( void ) const 21 { 22 return RefAST(this); 23 } 24 addChild(RefAST)25void ASTNULLType::addChild( RefAST ) 26 { 27 } 28 getNumberOfChildren() const29size_t ASTNULLType::getNumberOfChildren() const 30 { 31 return 0; 32 } 33 equals(RefAST) const34bool ASTNULLType::equals( RefAST ) const 35 { 36 return false; 37 } 38 equalsList(RefAST) const39bool ASTNULLType::equalsList( RefAST ) const 40 { 41 return false; 42 } 43 equalsListPartial(RefAST) const44bool ASTNULLType::equalsListPartial( RefAST ) const 45 { 46 return false; 47 } 48 equalsTree(RefAST) const49bool ASTNULLType::equalsTree( RefAST ) const 50 { 51 return false; 52 } 53 equalsTreePartial(RefAST) const54bool ASTNULLType::equalsTreePartial( RefAST ) const 55 { 56 return false; 57 } 58 findAll(RefAST)59vector<RefAST> ASTNULLType::findAll( RefAST ) 60 { 61 return vector<RefAST>(); 62 } 63 findAllPartial(RefAST)64vector<RefAST> ASTNULLType::findAllPartial( RefAST ) 65 { 66 return vector<RefAST>(); 67 } 68 getFirstChild() const69RefAST ASTNULLType::getFirstChild() const 70 { 71 return this; 72 } 73 getNextSibling() const74RefAST ASTNULLType::getNextSibling() const 75 { 76 return this; 77 } 78 getText() const79string ASTNULLType::getText() const 80 { 81 return "<ASTNULL>"; 82 } 83 getType() const84int ASTNULLType::getType() const 85 { 86 return Token::NULL_TREE_LOOKAHEAD; 87 } 88 initialize(int,const string &)89void ASTNULLType::initialize( int, const string& ) 90 { 91 } 92 initialize(RefAST)93void ASTNULLType::initialize( RefAST ) 94 { 95 } 96 initialize(RefToken)97void ASTNULLType::initialize( RefToken ) 98 { 99 } 100 101 #ifdef ANTLR_SUPPORT_XML initialize(istream &)102void ASTNULLType::initialize( istream& ) 103 { 104 } 105 #endif 106 setFirstChild(RefAST)107void ASTNULLType::setFirstChild( RefAST ) 108 { 109 } 110 setNextSibling(RefAST)111void ASTNULLType::setNextSibling( RefAST ) 112 { 113 } 114 setText(const string &)115void ASTNULLType::setText( const string& ) 116 { 117 } 118 setType(int)119void ASTNULLType::setType( int ) 120 { 121 } 122 toString() const123string ASTNULLType::toString() const 124 { 125 return getText(); 126 } 127 toStringList() const128string ASTNULLType::toStringList() const 129 { 130 return getText(); 131 } 132 toStringTree() const133string ASTNULLType::toStringTree() const 134 { 135 return getText(); 136 } 137 138 #ifdef ANTLR_SUPPORT_XML attributesToStream(ostream &) const139bool ASTNULLType::attributesToStream( ostream& ) const 140 { 141 return false; 142 } 143 toStream(ostream & out) const144void ASTNULLType::toStream( ostream& out ) const 145 { 146 out << "</ASTNULL>" << endl; 147 } 148 #endif 149 typeName(void) const150const char* ASTNULLType::typeName( void ) const 151 { 152 return "ASTNULLType"; 153 } 154 155 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 156 } 157 #endif 158