public abstract class FixedStringToken extends Token
toBeParsed
Constructor and Description |
---|
FixedStringToken(boolean saveToken)
Standard constructor
|
FixedStringToken(LineToParse l,
boolean saveToken)
Standard constructor with line to parse
|
Modifier and Type | Method and Description |
---|---|
boolean |
canParse()
can this token be parsed? is the next character
of toBeParsed consistent with the requested parsing task?
no changes to LineToParse are made
|
void |
consumeToken()
assuming canParse has been called, consume the next token;
parsed token is stored in LinetoParse object
|
abstract java.lang.String |
getTokenString()
basically this returns the last parsed token.
|
void |
parse()
actually parse toBeParsed given requested parsing task
|
getEmsg, klone, setLineToParse
public FixedStringToken(boolean saveToken)
saveToken
- - true if token should be output, false otherwisepublic FixedStringToken(LineToParse l, boolean saveToken)
l
- -- line to parsesaveToken
- - true if token should be output, false otherwisepublic abstract java.lang.String getTokenString()
Token
getTokenString
in class Token
public boolean canParse()
Token
public void consumeToken()
Token
consumeToken
in class Token