Public Member Functions | Protected Attributes

antlr.CharQueue Class Reference

List of all members.

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

Detailed Description

A circular buffer object used by CharBuffer


Constructor & Destructor Documentation

antlr.CharQueue.CharQueue ( int  minSize  ) 

Member Function Documentation

final void antlr.CharQueue.append ( char  tok  ) 

Add token to end of the queue

Parameters:
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

Parameters:
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.

Parameters:
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().


Member Data Documentation

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]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties