ANTLR Support Libraries 2.7.1+

antlr/ASTNULLType.hpp

Go to the documentation of this file.
00001 #ifndef INC_ASTNULLType_hpp__
00002 #define INC_ASTNULLType_hpp__
00003 
00004 /* ANTLR Translator Generator
00005  * Project led by Terence Parr at http://www.jGuru.com
00006  * Software rights: http://www.antlr.org/license.html
00007  *
00008  * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTNULLType.hpp#2 $
00009  */
00010 
00011 #include <antlr/config.hpp>
00012 #include <antlr/AST.hpp>
00013 #include <iostream>
00014 
00015 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00016 namespace antlr {
00017 #endif
00018 
00020 class ANTLR_API ASTNULLType : public AST {
00021 public:
00022    const char* typeName( void ) const;
00023    RefAST clone( void ) const;
00024 
00025    void addChild(RefAST c);
00026    size_t getNumberOfChildren() const;
00027    void setFirstChild(RefAST c);
00028    void setNextSibling(RefAST n);
00029 
00030    bool equals(RefAST t) const;
00031    bool equalsList(RefAST t) const;
00032    bool equalsListPartial(RefAST t) const;
00033    bool equalsTree(RefAST t) const;
00034    bool equalsTreePartial(RefAST t) const;
00035 
00036    ANTLR_USE_NAMESPACE(std)vector<RefAST> findAll(RefAST tree);
00037    ANTLR_USE_NAMESPACE(std)vector<RefAST> findAllPartial(RefAST subtree);
00038 
00039    RefAST getFirstChild() const;
00040    RefAST getNextSibling() const;
00041 
00042    ANTLR_USE_NAMESPACE(std)string getText() const;
00043    int getType() const;
00044 
00045    void initialize(int t, const ANTLR_USE_NAMESPACE(std)string& txt);
00046    void initialize(RefAST t);
00047    void initialize(RefToken t);
00048    void initialize(ANTLR_USE_NAMESPACE(std)istream& infile);
00049 
00050    void setText(const ANTLR_USE_NAMESPACE(std)string& text);
00051    void setType(int ttype);
00052    ANTLR_USE_NAMESPACE(std)string toString() const;
00053    ANTLR_USE_NAMESPACE(std)string toStringList() const;
00054    ANTLR_USE_NAMESPACE(std)string toStringTree() const;
00055 
00056    bool attributesToStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const;
00057    void toStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const;
00058 };
00059 
00060 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00061 }
00062 #endif
00063 
00064 #endif //INC_ASTNULLType_hpp__
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines