OpenMD  2.5
Molecular Dynamics in the Open
antlr::CommonToken Class Reference

#include <CommonToken.hpp>

Inheritance diagram for antlr::CommonToken:
antlr::Token antlr::CommonHiddenStreamToken

Public Member Functions

 CommonToken ()
 
 CommonToken (int t, const std ::string &txt)
 
 CommonToken (const std ::string &s)
 
virtual std ::string getText () const
 return contents of token More...
 
virtual void setText (const std ::string &s)
 set contents of token More...
 
virtual int getLine () const
 
virtual int getColumn () const
 
virtual void setLine (int l)
 set line for token More...
 
virtual void setColumn (int c)
 set column for token More...
 
virtual std ::string toString () const
 
- Public Member Functions inherited from antlr::Token
 Token ()
 
 Token (int t)
 
 Token (int t, const std ::string &txt)
 
virtual ~Token ()
 
virtual const std ::string & getFilename () const
 
virtual int getType () const
 
virtual void setType (int t)
 
virtual void setFilename (const std::string &file)
 

Static Public Member Functions

static RefToken factory ()
 

Protected Attributes

int line
 
int col
 
std ::string text
 

Private Member Functions

 CommonToken (const CommonToken &)
 
const CommonTokenoperator= (const CommonToken &)
 

Additional Inherited Members

- Static Public Attributes inherited from antlr::Token
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
 

Detailed Description

Definition at line 19 of file CommonToken.hpp.

Constructor & Destructor Documentation

◆ CommonToken() [1/4]

antlr::CommonToken::CommonToken ( )

Definition at line 15 of file CommonToken.cpp.

◆ CommonToken() [2/4]

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

Definition at line 18 of file CommonToken.cpp.

◆ CommonToken() [3/4]

antlr::CommonToken::CommonToken ( const std ::string &  s)

Definition at line 25 of file CommonToken.cpp.

◆ CommonToken() [4/4]

antlr::CommonToken::CommonToken ( const CommonToken )
private

Member Function Documentation

◆ factory()

RefToken antlr::CommonToken::factory ( )
static

Definition at line 37 of file CommonToken.cpp.

Referenced by antlr::CharScanner::CharScanner().

◆ getColumn()

virtual int antlr::CommonToken::getColumn ( ) const
inlinevirtual

gt the column the token is at (starting at 1)

See also
CharScanner::newline()
CharScanner::tab()

Reimplemented from antlr::Token.

Definition at line 49 of file CommonToken.hpp.

Referenced by toString().

◆ getLine()

virtual int antlr::CommonToken::getLine ( ) const
inlinevirtual

get the line the token is at (starting at 1)

See also
CharScanner::newline()
CharScanner::tab()

Reimplemented from antlr::Token.

Definition at line 41 of file CommonToken.hpp.

Referenced by toString().

◆ getText()

virtual std ::string antlr::CommonToken::getText ( ) const
inlinevirtual

return contents of token

Reimplemented from antlr::Token.

Definition at line 26 of file CommonToken.hpp.

Referenced by toString().

◆ operator=()

const CommonToken& antlr::CommonToken::operator= ( const CommonToken )
private

◆ setColumn()

virtual void antlr::CommonToken::setColumn ( int  c)
inlinevirtual

set column for token

Reimplemented from antlr::Token.

Definition at line 60 of file CommonToken.hpp.

References ANTLR_USE_NAMESPACE, and OpenMD::toString().

◆ setLine()

virtual void antlr::CommonToken::setLine ( int  l)
inlinevirtual

set line for token

Reimplemented from antlr::Token.

Definition at line 55 of file CommonToken.hpp.

◆ setText()

virtual void antlr::CommonToken::setText ( const std ::string &  s)
inlinevirtual

set contents of token

Reimplemented from antlr::Token.

Definition at line 32 of file CommonToken.hpp.

◆ toString()

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

Reimplemented from antlr::Token.

Definition at line 32 of file CommonToken.cpp.

References getColumn(), getLine(), getText(), and antlr::Token::getType().

Member Data Documentation

◆ col

int antlr::CommonToken::col
protected

Definition at line 71 of file CommonToken.hpp.

◆ line

int antlr::CommonToken::line
protected

Definition at line 70 of file CommonToken.hpp.

◆ text

std ::string antlr::CommonToken::text
protected

Definition at line 72 of file CommonToken.hpp.


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