openjava.syntax
Class RestorableTokenSource
java.lang.Object
|
+--openjava.syntax.RestorableTokenSource
- All Implemented Interfaces:
- TokenSource
- public class RestorableTokenSource
- extends Object
- implements TokenSource
A TokenSource
which can be back-tracked.
- Since:
- %SOFTWARE% 1.0
- Version:
- 1.0
- Author:
- Michiaki Tatsubori
- See Also:
Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tokenSource
private TokenSource tokenSource
env
private Environment env
pointer
private int pointer
offset
private int offset
RestorableTokenSource
public RestorableTokenSource(TokenSource src,
Environment env)
RestorableTokenSource
public RestorableTokenSource(TokenSource src)
getEnvironment
public Environment getEnvironment()
- Specified by:
getEnvironment
in interface TokenSource
assume
public void assume()
restore
public void restore()
fix
public void fix()
getNextToken
public Token getNextToken()
- Specified by:
getNextToken
in interface TokenSource
getToken
public Token getToken(int i)
- Specified by:
getToken
in interface TokenSource