Package antlr
Class TokenQueue
- java.lang.Object
-
- antlr.TokenQueue
-
class TokenQueue extends java.lang.Object
A private circular buffer object used by the token buffer
-
-
Field Summary
Fields Modifier and Type Field Description protected int
nbrEntries
number of tokens in the queue
-
Constructor Summary
Constructors Constructor Description TokenQueue(int minSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(Token tok)
Add token to end of the queueToken
elementAt(int idx)
Fetch a token from the queue by indexvoid
removeFirst()
Remove token from front of queuevoid
reset()
Clear the queue.
-
-
-
Method Detail
-
append
public final void append(Token tok)
Add token to end of the queue- Parameters:
tok
- The token to add
-
elementAt
public final Token elementAt(int idx)
Fetch a token from the queue by index- Parameters:
idx
- The index of the token to fetch, where zero is the token at the front of the queue
-
reset
public final void reset()
Clear the queue. Leaving the previous buffer alone.
-
removeFirst
public final void removeFirst()
Remove token from front of queue
-
-