OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
antlr::Token Class Reference

A token is minimally a token type. More...

#include <Token.hpp>

+ Inheritance diagram for antlr::Token:

Public Member Functions

 Token (int t)
 
 Token (int t, const std ::string &txt)
 
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
 

Friends

struct TokenRef
 

Detailed Description

A token is minimally a token type.

Subclasses can add the text matched for the token and line info.

Definition at line 24 of file Token.hpp.

Constructor & Destructor Documentation

◆ Token() [1/3]

antlr::Token::Token ( )
inline

Definition at line 44 of file Token.hpp.

◆ Token() [2/3]

antlr::Token::Token ( int t)
inline

Definition at line 49 of file Token.hpp.

◆ Token() [3/3]

antlr::Token::Token ( int t,
const std ::string & txt )
inline

Definition at line 54 of file Token.hpp.

◆ ~Token()

virtual antlr::Token::~Token ( )
inlinevirtual

Definition at line 60 of file Token.hpp.

Member Function Documentation

◆ getColumn()

int antlr::Token::getColumn ( ) const
virtual

Reimplemented in antlr::CommonToken.

Definition at line 15 of file Token.cpp.

◆ getFilename()

const std::string & antlr::Token::getFilename ( ) const
virtual

Definition at line 58 of file Token.cpp.

◆ getLine()

int antlr::Token::getLine ( ) const
virtual

Reimplemented in antlr::CommonToken.

Definition at line 20 of file Token.cpp.

◆ getText()

std::string antlr::Token::getText ( ) const
virtual

Reimplemented in antlr::CommonToken.

Definition at line 25 of file Token.cpp.

◆ getType()

int antlr::Token::getType ( ) const
virtual

Definition at line 30 of file Token.cpp.

◆ setColumn()

void antlr::Token::setColumn ( int c)
virtual

Reimplemented in antlr::CommonToken.

Definition at line 35 of file Token.cpp.

◆ setFilename()

void antlr::Token::setFilename ( const std::string & file)
virtual

Definition at line 52 of file Token.cpp.

◆ setLine()

void antlr::Token::setLine ( int l)
virtual

Reimplemented in antlr::CommonToken.

Definition at line 39 of file Token.cpp.

◆ setText()

void antlr::Token::setText ( const std ::string & t)
virtual

Reimplemented in antlr::CommonToken.

Definition at line 43 of file Token.cpp.

◆ setType()

void antlr::Token::setType ( int t)
virtual

Definition at line 47 of file Token.cpp.

◆ toString()

std::string antlr::Token::toString ( ) const
virtual

Definition at line 63 of file Token.cpp.

Friends And Related Symbol Documentation

◆ TokenRef

friend struct TokenRef
friend

Definition at line 81 of file Token.hpp.

Member Data Documentation

◆ EOF_TYPE

const int antlr::Token::EOF_TYPE = 1
static

Definition at line 32 of file Token.hpp.

◆ INVALID_TYPE

const int antlr::Token::INVALID_TYPE = 0
static

Definition at line 31 of file Token.hpp.

◆ MIN_USER_TYPE

const int antlr::Token::MIN_USER_TYPE = 4
static

Definition at line 29 of file Token.hpp.

◆ NULL_TREE_LOOKAHEAD

const int antlr::Token::NULL_TREE_LOOKAHEAD = 3
static

Definition at line 30 of file Token.hpp.

◆ SKIP

const int antlr::Token::SKIP = -1
static

Definition at line 33 of file Token.hpp.


The documentation for this class was generated from the following files: