public abstract class Token
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LineToParse |
toBeParsed |
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()
assuming canParse has been called, consume the next token;
parsed token is stored in LinetoParse object
|
abstract java.lang.String |
getEmsg() |
java.lang.String |
getTokenString()
basically this returns the last parsed token.
|
abstract Token |
klone(LineToParse l)
return copy of 'this'
|
abstract void |
parse()
actually parse toBeParsed given requested parsing task
|
void |
setLineToParse(LineToParse l)
only to be called in Pattern and Choose1 templates to set the current
line on the given pattern
set line to parse (l)
|
protected LineToParse toBeParsed
protected Token()
protected Token(LineToParse l)
l
- -- line to parsepublic void setLineToParse(LineToParse l)
l
- -- the LineToParse objectpublic abstract boolean canParse()
public abstract void consumeToken()
public abstract void parse()
public abstract Token klone(LineToParse l)
l
- -- line to parsepublic abstract java.lang.String getEmsg()
public java.lang.String getTokenString()