1 #ifndef INC_CommonASTWithHiddenTokens_hpp__
2 #define INC_CommonASTWithHiddenTokens_hpp__
4 /* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
8 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/CommonASTWithHiddenTokens.hpp#2 $
11 #include <antlr/config.hpp>
12 #include <antlr/CommonAST.hpp>
14 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
18 /** A CommonAST whose initialization copies hidden token
19 * information from the Token used to create a node.
21 class ANTLR_API CommonASTWithHiddenTokens : public CommonAST {
23 CommonASTWithHiddenTokens();
24 virtual ~CommonASTWithHiddenTokens();
25 virtual const char* typeName( void ) const
27 return CommonASTWithHiddenTokens::TYPE_NAME;
29 /// Clone this AST node.
30 virtual RefAST clone( void ) const;
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);
37 virtual RefToken getHiddenAfter() const
42 virtual RefToken getHiddenBefore() const
47 static RefAST factory();
49 static const char* const TYPE_NAME;
51 RefToken hiddenBefore,hiddenAfter; // references to hidden tokens
54 typedef ASTRefCount<CommonASTWithHiddenTokens> RefCommonASTWithHiddenTokens;
56 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
60 #endif //INC_CommonASTWithHiddenTokens_hpp__