|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--mark.core.text.Scanner
A Scanner returns tokens from a character source until there are no tokens left.
| Constructor Summary | |
Scanner()
|
|
| Method Summary | |
static Scanner |
forName(java.lang.String n,
java.io.Reader r)
Given a scanner class' name and a java.io.Reader token source, returns an instance of the scanner set up to read from the given token source. |
abstract Token |
getNextToken()
|
Token |
nextToken()
Returns the next token or null if there are no tokens left. |
protected java.lang.String |
nextTokenString()
Returns a string representation of the next token. |
void |
pushBack(Token t)
Places the given token at the front of the Scanner's token queue. |
void |
readTokens(boolean lowerCase,
java.util.Collection c)
Adds all token strings from the given token source to the given collection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Scanner()
| Method Detail |
public abstract Token getNextToken()
public Token nextToken()
throws java.lang.Exception
java.lang.Exception - if something goes wrong.public void pushBack(Token t)
t - the token to push back.
protected java.lang.String nextTokenString()
throws java.lang.Exception
java.lang.Exception - if something goes wrong.
public void readTokens(boolean lowerCase,
java.util.Collection c)
throws java.lang.Exception
lowerCase - whether to convert to lower-case.c - the Collection.
java.lang.Exception - if something goes wrong.
public static Scanner forName(java.lang.String n,
java.io.Reader r)
throws java.lang.Exception
n - the name of the scanner class.r - a java.io.Reader the token source.
java.lang.Exception - if something goes wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||