ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/src/antlr/ASTNULLType.hpp
Revision: 2469
Committed: Fri Dec 2 15:38:03 2005 UTC (18 years, 7 months ago) by tim
File size: 1795 byte(s)
Log Message:
End of the Link --> List
Return of the Oject-Oriented
replace yacc/lex parser with antlr parser

File Contents

# User Rev Content
1 tim 2469 #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: ASTNULLType.hpp,v 1.1 2005-12-02 15:38:02 tim Exp $
9     */
10    
11     #include <antlr/config.hpp>
12     #include <antlr/AST.hpp>
13     #include <iostream>
14    
15     #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
16     namespace antlr {
17     #endif
18    
19     /** There is only one instance of this class **/
20     class ANTLR_API ASTNULLType : public AST {
21     public:
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__