#include <CharBuffer.hpp>
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) | |
CharBuffer & | operator= (const CharBuffer &other) |
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.
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] |
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] |
std ::istream& CharBuffer::input [protected] |