ANTLR Support Libraries 2.7.1+
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
LexerInputState Class Reference

#include <LexerSharedInputState.hpp>

Collaboration diagram for LexerInputState:
Collaboration graph
[legend]

Public Member Functions

 LexerInputState (InputBuffer *inbuf)
 
 LexerInputState (InputBuffer &inbuf)
 
 line (1)
 
 tokenStartColumn (1)
 
 tokenStartLine (1)
 
 guessing (0)
 
 filename ("")
 
 input (new CharBuffer(in))
 
 inputResponsible (true)
 
virtual void initialize (std::istream &in, const char *file="")
 
virtual void reset (void)
 
void setPosition (int line_, int column_)
 
virtual ~LexerInputState ()
 
InputBuffergetInput ()
 

Public Attributes

 __pad0__: column(1)
 
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.

Constructor & Destructor Documentation

LexerInputState::LexerInputState ( InputBuffer inbuf)
inline

Construct a new LexerInputState

Parameters
inbufthe InputBuffer to read from. The object is deleted together with the LexerInputState object.
LexerInputState::LexerInputState ( InputBuffer inbuf)
inline

Construct a new LexerInputState

Parameters
inbufthe InputBuffer to read from.
virtual LexerInputState::~LexerInputState ( )
inlinevirtual
LexerInputState::LexerInputState ( const LexerInputState )
private

Member Function Documentation

LexerInputState::filename ( ""  )
InputBuffer & LexerInputState::getInput ( )
inline
LexerInputState::guessing ( )
virtual void 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:
LexerInputState::input ( new   CharBufferin)
LexerInputState::inputResponsible ( true  )
inline
LexerInputState::line ( )
LexerInputState& LexerInputState::operator= ( const LexerInputState )
private
virtual void LexerInputState::reset ( void  )
inlinevirtual

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

void 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
LexerInputState::tokenStartColumn ( )
LexerInputState::tokenStartLine ( )

Member Data Documentation

LexerInputState::__pad0__

Construct a new LexerInputState

Parameters
inan istream to read from.
See Also
antlr.CharBuffer
int LexerInputState::column
std ::string LexerInputState::filename

What file (if known) caused the problem?

int LexerInputState::guessing
InputBuffer* LexerInputState::input
private

Input buffer we use.

bool LexerInputState::inputResponsible
private

Who is responsible for cleaning up the InputBuffer?

int LexerInputState::line
int LexerInputState::tokenStartColumn
int LexerInputState::tokenStartLine

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