Public Member Functions | |
TokenQueue (int minSize) | |
final void | append (Token tok) |
final Token | elementAt (int idx) |
final void | reset () |
final void | removeFirst () |
Protected Attributes | |
int | nbrEntries |
A private circular buffer object used by the token buffer
antlr.TokenQueue.TokenQueue | ( | int | minSize | ) |
final void antlr.TokenQueue.append | ( | Token | tok | ) |
Add token to end of the queue
tok | The token to add |
References antlr.TokenQueue.nbrEntries.
final Token antlr.TokenQueue.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 |
Referenced by antlr.TokenBuffer.LA(), and antlr.TokenBuffer.LT().
final void antlr.TokenQueue.removeFirst | ( | ) |
Remove token from front of queue
References antlr.TokenQueue.nbrEntries.
final void antlr.TokenQueue.reset | ( | ) |
Clear the queue. Leaving the previous buffer alone.
References antlr.TokenQueue.nbrEntries.
Referenced by antlr.TokenBuffer.reset().
int antlr.TokenQueue.nbrEntries [protected] |
number of tokens in the queue
Referenced by antlr.TokenQueue.append(), antlr.TokenQueue.removeFirst(), and antlr.TokenQueue.reset().