ConForM.CoopnTools.CoKer
Class LexicalReader
java.lang.Object
|
+--ConForM.CoopnTools.CoKer.LexicalReader
- Direct Known Subclasses:
- LexicalAspectFileReader, LexicalCoalaFileReader, LexicalCocoFileReader, LexicalConsFileReader, LexicalCoopnFileReader, LexicalPackageFileReader, LexicalScenarioFileReader, LexicalSpecFileReader
- public abstract class LexicalReader
- extends java.lang.Object
Lexical Reader. This class defines an abstract lexical reader.
A lexical reader decompose an input stream in lexical tokens. It is likely
to be considered as a special kinf of enumeration, an enumeration
of lexical tokens.
- See Also:
LexicalToken
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
reader
protected java.io.Reader reader
env
protected CoopnEnv env
LexicalReader
public LexicalReader(CoopnEnv env,
java.io.Reader reader)
- Simple constructor.
- Parameters:
reader
- the input readerenv
- the environment
hasMoreTokens
public abstract boolean hasMoreTokens()
- Test the reader of more tokens.
- Returns:
- true if the reader has more tokens
nextToken
public abstract LexicalToken nextToken()
- Consult and consume the next token.
- Returns:
- the next token, or null if hasMoreTokens() is false
consultNextToken
public abstract LexicalToken consultNextToken()
- Consult the next token.
- Returns:
- the next token, or null if hasMoreTokens() is false