antlr
Class CharQueue
A circular buffer object used by CharBuffer
protected char[] | buffer - Physical circular buffer of tokens
|
protected int | nbrEntries - number of tokens in the queue
|
void | append(char tok) - Add token to end of the queue
|
char | elementAt(int idx) - Fetch a token from the queue by index
|
void | init(int size) - Initialize the queue.
|
void | removeFirst() - Remove char from front of queue
|
void | reset() - Clear the queue.
|
buffer
protected char[] buffer
Physical circular buffer of tokens
nbrEntries
protected int nbrEntries
number of tokens in the queue
CharQueue
public CharQueue(int minSize)
append
public final void append(char tok)
Add token to end of the queue
tok
- The token to add
elementAt
public final char elementAt(int idx)
Fetch a token from the queue by index
idx
- The index of the token to fetch, where zero is the token at the front of the queue
init
public void init(int size)
Initialize the queue.
size
- The initial size of the queue
removeFirst
public final void removeFirst()
Remove char from front of queue
reset
public final void reset()
Clear the queue. Leaving the previous buffer alone.