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()
Standard constructor
|
protected |
Token(LineToParse l)
Standard constructor with line to parse
|
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?
no changes to LineToParse are made
|
abstract void |
consumeToken()
consume the next token if canParse()==true ; token is stored
in LinetoParse object
|
abstract java.lang.String |
getEmsg() |
abstract Token |
klone(LineToParse l)
return copy of 'this'
|
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 consumeToken()
public abstract void parse()
public void setLineToParse(LineToParse l)
l
- -- the LineToParse objectpublic abstract Token klone(LineToParse l)
l
- -- line to parsepublic abstract java.lang.String getEmsg()