CommonToken Class Reference

#include <CommonToken.hpp>

Inheritance diagram for CommonToken:

Inheritance graph
[legend]
Collaboration diagram for CommonToken:

Collaboration graph
[legend]

Public Member Functions

 CommonToken ()
 CommonToken (int t, const ANTLR_USE_NAMESPACE(std) string &txt)
 CommonToken (const ANTLR_USE_NAMESPACE(std) string &s)
virtual ANTLR_USE_NAMESPACE (std) string getText() const
 return contents of token
virtual void setText (const ANTLR_USE_NAMESPACE(std) string &s)
 set contents of token
virtual int getLine () const
virtual int getColumn () const
virtual void setLine (int l)
 set line for token
virtual void setColumn (int c)
 set column for token
virtual ANTLR_USE_NAMESPACE (std) string toString() const

Static Public Member Functions

static RefToken factory ()

Protected Member Functions

 ANTLR_USE_NAMESPACE (std) string text

Protected Attributes

int line
int col

Private Member Functions

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

Detailed Description

Definition at line 19 of file CommonToken.hpp.


Constructor & Destructor Documentation

CommonToken::CommonToken (  ) 

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

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

CommonToken::CommonToken ( const CommonToken  )  [private]


Member Function Documentation

virtual CommonToken::ANTLR_USE_NAMESPACE ( std   )  const [inline, virtual]

return contents of token

Reimplemented from Token.

Definition at line 26 of file CommonToken.hpp.

virtual void CommonToken::setText ( const ANTLR_USE_NAMESPACE(std) string &  s  )  [inline, virtual]

set contents of token

Reimplemented from Token.

Definition at line 32 of file CommonToken.hpp.

virtual int CommonToken::getLine (  )  const [inline, virtual]

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

See also:
CharScanner::newline()

CharScanner::tab()

Reimplemented from Token.

Definition at line 41 of file CommonToken.hpp.

virtual int CommonToken::getColumn (  )  const [inline, virtual]

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

See also:
CharScanner::newline()

CharScanner::tab()

Reimplemented from Token.

Definition at line 49 of file CommonToken.hpp.

virtual void CommonToken::setLine ( int  l  )  [inline, virtual]

set line for token

Reimplemented from Token.

Definition at line 55 of file CommonToken.hpp.

virtual void CommonToken::setColumn ( int  c  )  [inline, virtual]

set column for token

Reimplemented from Token.

Definition at line 60 of file CommonToken.hpp.

virtual CommonToken::ANTLR_USE_NAMESPACE ( std   )  const [virtual]

Reimplemented from Token.

static RefToken CommonToken::factory (  )  [static]

Reimplemented in CommonHiddenStreamToken.

CommonToken::ANTLR_USE_NAMESPACE ( std   )  [protected]

const CommonToken& CommonToken::operator= ( const CommonToken  )  [private]


Field Documentation

int CommonToken::line [protected]

Definition at line 70 of file CommonToken.hpp.

int CommonToken::col [protected]

Definition at line 71 of file CommonToken.hpp.


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

Generated on Tue Mar 31 20:19:25 2009 for ctrump by  doxygen 1.5.6