CharBuffer Class Reference

#include <CharBuffer.hpp>

List of all members.

Public Member Functions

 CharBuffer (std::istream &input)
 Create a character buffer.
int getChar ()
 Get the next character from the stream.

Protected Attributes

std::istream & input

Private Member Functions

 CharBuffer (const CharBuffer &other)
CharBufferoperator= (const CharBuffer &other)

Detailed Description

A Stream of characters fed to the lexer from a InputStream that can be rewound via mark()/rewind() methods.

A dynamic array is used to buffer up all the input characters. Normally, "k" characters are stored in the buffer. More characters may be stored during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. Consumption of characters is deferred. In other words, reading the next character is not done by consume(), but deferred until needed by LA or LT.

See also:
antlr.CharQueue

Constructor & Destructor Documentation

CharBuffer::CharBuffer ( std::istream &  input_  ) 

Create a character buffer.

Create a character buffer. Enable fail and bad exceptions, if supported by platform.

CharBuffer::CharBuffer ( const CharBuffer other  )  [private]

Member Function Documentation

int CharBuffer::getChar (  ) 

Get the next character from the stream.

Get the next character from the stream. May throw CharStreamIOException when something bad happens (not EOF) (if supported by platform).

CharBuffer& CharBuffer::operator= ( const CharBuffer other  )  [private]

Member Data Documentation

std ::istream& CharBuffer::input [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on 16 Nov 2015 for ANTLR Support Libraries 2.7.1+ by  doxygen 1.6.1