source: trunk/yao/share/antlr-2.7.7/lib/cpp/antlr/ASTNULLType.hpp @ 1

Last change on this file since 1 was 1, checked in by lnalod, 15 years ago

Initial import of YAO sources

File size: 1.8 KB
Line 
1#ifndef INC_ASTNULLType_hpp__
2#define INC_ASTNULLType_hpp__
3
4/* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
7 *
8 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/ASTNULLType.hpp#2 $
9 */
10
11#include <antlr/config.hpp>
12#include <antlr/AST.hpp>
13#include <iostream>
14
15#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
16namespace antlr {
17#endif
18
19/** There is only one instance of this class **/
20class ANTLR_API ASTNULLType : public AST {
21public:
22        const char* typeName( void ) const;
23        RefAST clone( void ) const;
24
25        void addChild(RefAST c);
26        size_t getNumberOfChildren() const;
27        void setFirstChild(RefAST c);
28        void setNextSibling(RefAST n);
29
30        bool equals(RefAST t) const;
31        bool equalsList(RefAST t) const;
32        bool equalsListPartial(RefAST t) const;
33        bool equalsTree(RefAST t) const;
34        bool equalsTreePartial(RefAST t) const;
35
36        ANTLR_USE_NAMESPACE(std)vector<RefAST> findAll(RefAST tree);
37        ANTLR_USE_NAMESPACE(std)vector<RefAST> findAllPartial(RefAST subtree);
38
39        RefAST getFirstChild() const;
40        RefAST getNextSibling() const;
41
42        ANTLR_USE_NAMESPACE(std)string getText() const;
43        int getType() const;
44
45        void initialize(int t, const ANTLR_USE_NAMESPACE(std)string& txt);
46        void initialize(RefAST t);
47        void initialize(RefToken t);
48        void initialize(ANTLR_USE_NAMESPACE(std)istream& infile);
49
50        void setText(const ANTLR_USE_NAMESPACE(std)string& text);
51        void setType(int ttype);
52        ANTLR_USE_NAMESPACE(std)string toString() const;
53        ANTLR_USE_NAMESPACE(std)string toStringList() const;
54        ANTLR_USE_NAMESPACE(std)string toStringTree() const;
55
56        bool attributesToStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const;
57        void toStream( ANTLR_USE_NAMESPACE(std)ostream &out ) const;
58};
59
60#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
61}
62#endif
63
64#endif //INC_ASTNULLType_hpp__
Note: See TracBrowser for help on using the repository browser.