antlr
Class TokenBuffer

java.lang.Object
  extended byantlr.TokenBuffer

public class TokenBuffer
extends java.lang.Object


Constructor Summary
TokenBuffer(TokenStream input_)
          Create a token buffer
 
Method Summary
 void consume()
          Mark another token for deferred consumption
 TokenStream getInput()
          return the Tokenizer (needed by ParseView)
 int LA(int i)
          Get a lookahead token value
 Token LT(int i)
          Get a lookahead token
 int mark()
          Return an integer marker that can be used to rewind the buffer to its current state.
 void reset()
          Reset the input buffer to empty state
 void rewind(int mark)
          Rewind the token buffer to a marker.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenBuffer

public TokenBuffer(TokenStream input_)
Create a token buffer

Method Detail

reset

public final void reset()
Reset the input buffer to empty state


consume

public final void consume()
Mark another token for deferred consumption


getInput

public TokenStream getInput()
return the Tokenizer (needed by ParseView)


LA

public final int LA(int i)
             throws TokenStreamException
Get a lookahead token value

Throws:
TokenStreamException

LT

public final Token LT(int i)
               throws TokenStreamException
Get a lookahead token

Throws:
TokenStreamException

mark

public final int mark()
Return an integer marker that can be used to rewind the buffer to its current state.


rewind

public final void rewind(int mark)
Rewind the token buffer to a marker.

Parameters:
mark - Marker returned previously from mark()