antlr
Class TokenBuffer

java.lang.Object
  |
  +--antlr.TokenBuffer

public class TokenBuffer
extends Object


Field Summary
protected  TokenStream input
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

protected TokenStream input
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

TokenStreamException

LT

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

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()


Copyright © 1999-2003 Oliver Zeigermann. All Rights Reserved.