1#ifndef INC_TokenBuffer_hpp__
2#define INC_TokenBuffer_hpp__
11#include <antlr/config.hpp>
12#include <antlr/TokenStream.hpp>
13#include <antlr/CircularQueue.hpp>
15#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
52 int LA(
unsigned int i );
65 void rewind(
unsigned int mark);
74 virtual unsigned int entries()
const;
78 void fill(
unsigned int amount);
104inline void TokenBuffer::syncConsume()
117#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
A Stream of Token objects fed to the parser from a TokenStream that can be rewound via mark()/rewind(...
TokenStream & input
Token source.
CircularQueue< RefToken > queue
Circular queue with Tokens.
unsigned int nMarkers
Number of active markers.
void reset(void)
Reset the input buffer to empty state.
unsigned int markerOffset
Additional offset used when markers are active.
void consume()
Mark another token for deferred consumption.
unsigned int numToConsume
Number of calls to consume() since last LA() or LT() call.
This interface allows any object to pretend it is a stream of tokens.