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

#include <LexerSharedInputState.hpp>

Public Member Functions

 LexerInputState (InputBuffer *inbuf)
 
 LexerInputState (InputBuffer &inbuf)
 
 LexerInputState (std ::istream &in)
 
virtual void initialize (std ::istream &in, const char *file="")
 
virtual void reset (void)
 
void setPosition (int line_, int column_)
 
virtual ~LexerInputState ()
 
InputBuffergetInput ()
 

Public Attributes

int column
 
int line
 
int tokenStartColumn
 
int tokenStartLine
 
int guessing
 
std ::string filename
 

Private Member Functions

 LexerInputState (const LexerInputState &)
 
LexerInputStateoperator= (const LexerInputState &)
 

Private Attributes

InputBufferinput
 Input buffer we use. More...
 
bool inputResponsible
 Who is responsible for cleaning up the InputBuffer? More...
 

Detailed Description

This object contains the data associated with an input stream of characters. Multiple lexers share a single LexerSharedInputState to lex the same input stream.

Definition at line 26 of file LexerSharedInputState.hpp.

Constructor & Destructor Documentation

◆ LexerInputState() [1/4]

antlr::LexerInputState::LexerInputState ( InputBuffer inbuf)
inline

Construct a new LexerInputState

Parameters
inbufthe InputBuffer to read from. The object is deleted together with the LexerInputState object.

Definition at line 32 of file LexerSharedInputState.hpp.

◆ LexerInputState() [2/4]

antlr::LexerInputState::LexerInputState ( InputBuffer inbuf)
inline

Construct a new LexerInputState

Parameters
inbufthe InputBuffer to read from.

Definition at line 47 of file LexerSharedInputState.hpp.

◆ LexerInputState() [3/4]

antlr::LexerInputState::LexerInputState ( std ::istream &  in)
inline

Construct a new LexerInputState

Parameters
inan istream to read from.
See also
antlr.CharBuffer

Definition at line 63 of file LexerSharedInputState.hpp.

◆ ~LexerInputState()

virtual antlr::LexerInputState::~LexerInputState ( )
inlinevirtual

Definition at line 119 of file LexerSharedInputState.hpp.

◆ LexerInputState() [4/4]

antlr::LexerInputState::LexerInputState ( const LexerInputState )
private

Member Function Documentation

◆ getInput()

InputBuffer & antlr::LexerInputState::getInput ( )
inline

Definition at line 144 of file LexerSharedInputState.hpp.

◆ initialize()

virtual void antlr::LexerInputState::initialize ( std ::istream &  in,
const char *  file = "" 
)
inlinevirtual

Reset the LexerInputState with a specified stream and filename. This method is a hack, dunno what I was thinking when I added it. This should actually be done in a subclass.

Deprecated:

Definition at line 80 of file LexerSharedInputState.hpp.

◆ operator=()

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

◆ reset()

virtual void antlr::LexerInputState::reset ( void  )
inlinevirtual

Reset the LexerInputState to initial state. The underlying InputBuffer is also reset.

Definition at line 99 of file LexerSharedInputState.hpp.

◆ setPosition()

void antlr::LexerInputState::setPosition ( int  line_,
int  column_ 
)
inline

Set the file position of the SharedLexerInputState.

Parameters
line_line number to be set
column_column number to be set

Definition at line 113 of file LexerSharedInputState.hpp.

Member Data Documentation

◆ column

int antlr::LexerInputState::column

Definition at line 125 of file LexerSharedInputState.hpp.

◆ filename

std ::string antlr::LexerInputState::filename

What file (if known) caused the problem?

Definition at line 131 of file LexerSharedInputState.hpp.

◆ guessing

int antlr::LexerInputState::guessing

Definition at line 129 of file LexerSharedInputState.hpp.

◆ input

InputBuffer* antlr::LexerInputState::input
private

Input buffer we use.

Definition at line 135 of file LexerSharedInputState.hpp.

◆ inputResponsible

bool antlr::LexerInputState::inputResponsible
private

Who is responsible for cleaning up the InputBuffer?

Definition at line 137 of file LexerSharedInputState.hpp.

◆ line

int antlr::LexerInputState::line

Definition at line 126 of file LexerSharedInputState.hpp.

◆ tokenStartColumn

int antlr::LexerInputState::tokenStartColumn

Definition at line 127 of file LexerSharedInputState.hpp.

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

◆ tokenStartLine

int antlr::LexerInputState::tokenStartLine

Definition at line 128 of file LexerSharedInputState.hpp.

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


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