]>
git.saurik.com Git - apple/security.git/blob - Security/libsecurity_codesigning/antlr2/src/CommonToken.cpp
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/CommonToken.cpp#2 $
8 #include "antlr/CommonToken.hpp"
9 #include "antlr/String.hpp"
11 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
15 CommonToken::CommonToken() : Token(), line(1), col(1), text("")
18 CommonToken::CommonToken(int t
, const ANTLR_USE_NAMESPACE(std
)string
& txt
)
25 CommonToken::CommonToken(const ANTLR_USE_NAMESPACE(std
)string
& s
)
32 ANTLR_USE_NAMESPACE(std
)string
CommonToken::toString() const
34 return "[\""+getText()+"\",<"+getType()+">,line="+getLine()+",column="+getColumn()+"]";
37 RefToken
CommonToken::factory()
39 return RefToken(new CommonToken
);
42 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE