CommonToken.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "antlr/CommonToken.hpp"
00009 #include "antlr/String.hpp"
00010
00011 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00012 namespace antlr {
00013 #endif
00014
00015 CommonToken::CommonToken() : Token(), line(1), col(1), text("")
00016 {}
00017
00018 CommonToken::CommonToken(int t, const ANTLR_USE_NAMESPACE(std)string& txt)
00019 : Token(t), line(1), col(1), text(txt)
00020 {}
00021
00022 CommonToken::CommonToken(const ANTLR_USE_NAMESPACE(std)string& s)
00023 : Token(), line(1), col(1), text(s)
00024 {}
00025
00026 ANTLR_USE_NAMESPACE(std)string CommonToken::toString() const
00027 {
00028 return "[\""+getText()+"\",<"+type+">,line="+line+",column="+col+"]";
00029 }
00030
00031 RefToken CommonToken::factory()
00032 {
00033 return RefToken(new CommonToken);
00034 }
00035
00036 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00037 }
00038 #endif
00039
This file is part of the documentation for KDevelop Version 3.1.2.