KDevelop API Documentation

CommonToken.cpp

Go to the documentation of this file.
00001 /* ANTLR Translator Generator
00002  * Project led by Terence Parr at http://www.jGuru.com
00003  * Software rights: http://www.antlr.org/RIGHTS.html
00004  *
00005  * $Id: CommonToken.cpp,v 1.2 2003/05/02 00:36:20 okellogg Exp $
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 
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:50 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003