public abstract class Token
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LineToParse |
toBeParsed
string to be parsed
|
Modifier | Constructor and Description |
---|---|
protected |
Token()
used when defining statements -- a sequence of tokens
|
protected |
Token(LineToParse l)
used when parsing -- an actual line l is needed
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canParse()
can this token be parsed? is the next character
of toBeParsed consistent with the requested parsing task?
|
abstract void |
parse()
actually parse toBeParsed given requested parsing task
|
void |
setLineToParse(LineToParse l)
set line to parse (l)
|
protected LineToParse toBeParsed
protected Token()
protected Token(LineToParse l)
l
- -- line to parsepublic abstract boolean canParse()
public abstract void parse()
public void setLineToParse(LineToParse l)
l
- -- the LineToParse object