ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/antlr/CommonASTWithHiddenTokens.hpp
Revision: 1442
Committed: Mon May 10 17:28:26 2010 UTC (14 years, 11 months ago) by gezelter
File size: 1458 byte(s)
Log Message:
Adding property set to svn entries

File Contents

# User Rev Content
1 tim 770 #ifndef INC_CommonASTWithHiddenTokens_hpp__
2     #define INC_CommonASTWithHiddenTokens_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 gezelter 1442 * $Id$
9 tim 770 */
10    
11     #include <antlr/config.hpp>
12     #include <antlr/CommonAST.hpp>
13    
14     #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
15     namespace antlr {
16     #endif
17    
18     /** A CommonAST whose initialization copies hidden token
19     * information from the Token used to create a node.
20     */
21     class ANTLR_API CommonASTWithHiddenTokens : public CommonAST {
22     public:
23     CommonASTWithHiddenTokens();
24     virtual ~CommonASTWithHiddenTokens();
25     virtual const char* typeName( void ) const
26     {
27     return CommonASTWithHiddenTokens::TYPE_NAME;
28     }
29     /// Clone this AST node.
30     virtual RefAST clone( void ) const;
31    
32     // Borland C++ builder seems to need the decl's of the first two...
33     virtual void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt);
34     virtual void initialize(RefAST t);
35     virtual void initialize(RefToken t);
36    
37     virtual RefToken getHiddenAfter() const
38     {
39     return hiddenAfter;
40     }
41    
42     virtual RefToken getHiddenBefore() const
43     {
44     return hiddenBefore;
45     }
46    
47     static RefAST factory();
48    
49     static const char* const TYPE_NAME;
50     protected:
51     RefToken hiddenBefore,hiddenAfter; // references to hidden tokens
52     };
53    
54     typedef ASTRefCount<CommonASTWithHiddenTokens> RefCommonASTWithHiddenTokens;
55    
56     #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
57     }
58     #endif
59    
60     #endif //INC_CommonASTWithHiddenTokens_hpp__

Properties

Name Value
svn:keywords Author Id Revision Date