antlr::Token Class Reference

#include <Token.hpp>

Collaboration diagram for antlr::Token:
[legend]

List of all members.

Public Member Functions

 Token ()
 Token (int t)
 Token (int t, const std::string &txt)
virtual ~Token ()
virtual int getColumn () const
virtual int getLine () const
virtual std::string getText () const
virtual const std::string & getFilename () const
virtual int getType () const
virtual void setColumn (int c)
virtual void setLine (int l)
virtual void setText (const std::string &t)
virtual void setType (int t)
virtual void setFilename (const std::string &file)
virtual std::string toString () const

Static Public Attributes

static const int MIN_USER_TYPE = 4
static const int NULL_TREE_LOOKAHEAD = 3
static const int INVALID_TYPE = 0
static const int EOF_TYPE = 1
static const int SKIP = -1

Private Member Functions

 Token (RefToken other)
Tokenoperator= (const Token &other)
Tokenoperator= (RefToken other)
 Token (const Token &)

Private Attributes

TokenRefref
int type
 the type of the token

Friends

struct TokenRef

Detailed Description

A token is minimally a token type. Subclasses can add the text matched for the token and line info.


Constructor & Destructor Documentation

antlr::Token::Token (  )  [inline]
antlr::Token::Token ( int  t  )  [inline]
antlr::Token::Token ( int  t,
const std::string &  txt 
) [inline]
virtual antlr::Token::~Token (  )  [inline, virtual]
antlr::Token::Token ( RefToken  other  )  [private]
antlr::Token::Token ( const Token  )  [private]

Member Function Documentation

int antlr::Token::getColumn (  )  const [virtual]
const std::string & antlr::Token::getFilename (  )  const [virtual]
int antlr::Token::getLine (  )  const [virtual]
std::string antlr::Token::getText (  )  const [virtual]
int antlr::Token::getType (  )  const [virtual]
Token& antlr::Token::operator= ( RefToken  other  )  [private]
Token& antlr::Token::operator= ( const Token other  )  [private]
void antlr::Token::setColumn ( int  c  )  [virtual]
void antlr::Token::setFilename ( const std::string &  file  )  [virtual]
void antlr::Token::setLine ( int  l  )  [virtual]
void antlr::Token::setText ( const std::string &  t  )  [virtual]
void antlr::Token::setType ( int  t  )  [virtual]
std::string antlr::Token::toString (  )  const [virtual]

Friends And Related Function Documentation

friend struct TokenRef [friend]

Member Data Documentation

const int antlr::Token::EOF_TYPE = 1 [static]
const int antlr::Token::INVALID_TYPE = 0 [static]
const int antlr::Token::MIN_USER_TYPE = 4 [static]
const int antlr::Token::NULL_TREE_LOOKAHEAD = 3 [static]
const int antlr::Token::SKIP = -1 [static]
int antlr::Token::type [private]

the type of the token


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on 16 Nov 2015 for ANTLR Support Libraries 2.7.1+ by  doxygen 1.6.1