1 /* ANTLR Translator Generator
2 * Project led by Terence Parr at http://www.jGuru.com
3 * Software rights: http://www.antlr.org/license.html
5 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/src/Token.cpp#2 $
8 #include "antlr/Token.hpp"
9 #include "antlr/String.hpp"
11 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
15 int Token::getColumn() const
20 int Token::getLine() const
25 ANTLR_USE_NAMESPACE(std
)string
Token::getText() const
30 int Token::getType() const
35 void Token::setColumn(int)
39 void Token::setLine(int)
43 void Token::setText(const ANTLR_USE_NAMESPACE(std
)string
&)
47 void Token::setType(int t
)
52 void Token::setFilename(const ANTLR_USE_NAMESPACE(std
)string
&)
56 ANTLR_USE_NAMESPACE(std
)string
emptyString("");
58 const ANTLR_USE_NAMESPACE(std
)string
& Token::getFilename() const
63 ANTLR_USE_NAMESPACE(std
)string
Token::toString() const
65 return "[\""+getText()+"\",<"+type
+">]";
68 ANTLR_API RefToken nullToken
;
70 #ifndef NO_STATIC_CONSTS
71 const int Token::MIN_USER_TYPE
;
72 const int Token::NULL_TREE_LOOKAHEAD
;
73 const int Token::INVALID_TYPE
;
74 const int Token::EOF_TYPE
;
75 const int Token::SKIP
;
78 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE