Public Member Functions | |
CharQueue (int minSize) | |
final void | append (char tok) |
final char | elementAt (int idx) |
void | init (int size) |
final void | reset () |
final void | removeFirst () |
Protected Attributes | |
char[] | buffer |
int | nbrEntries |
A circular buffer object used by CharBuffer
antlr.CharQueue.CharQueue | ( | int | minSize | ) |
References antlr.CharQueue.init().
final void antlr.CharQueue.append | ( | char | tok | ) |
Add token to end of the queue
tok | The token to add |
References antlr.CharQueue.buffer, and antlr.CharQueue.nbrEntries.
Referenced by antlr.CharBuffer.fill(), and antlr.ByteBuffer.fill().
final char antlr.CharQueue.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 |
References antlr.CharQueue.buffer.
Referenced by antlr.InputBuffer.getLAChars(), antlr.InputBuffer.getMarkedChars(), and antlr.InputBuffer.LA().
void antlr.CharQueue.init | ( | int | size | ) |
Initialize the queue.
size | The initial size of the queue |
References antlr.CharQueue.buffer, and antlr.CharQueue.nbrEntries.
Referenced by antlr.CharQueue.CharQueue().
final void antlr.CharQueue.removeFirst | ( | ) |
Remove char from front of queue
References antlr.CharQueue.nbrEntries.
Referenced by antlr.InputBuffer.syncConsume().
final void antlr.CharQueue.reset | ( | ) |
Clear the queue. Leaving the previous buffer alone.
References antlr.CharQueue.nbrEntries.
Referenced by antlr.InputBuffer.reset().
char [] antlr.CharQueue.buffer [protected] |
Physical circular buffer of tokens
Referenced by antlr.CharQueue.append(), antlr.CharQueue.elementAt(), and antlr.CharQueue.init().
int antlr.CharQueue.nbrEntries [protected] |
number of tokens in the queue
Referenced by antlr.CharQueue.append(), antlr.CharBuffer.fill(), antlr.ByteBuffer.fill(), antlr.InputBuffer.getLAChars(), antlr.CharQueue.init(), antlr.CharQueue.removeFirst(), and antlr.CharQueue.reset().