public abstract class Pattern extends Token
Modifier and Type | Field and Description |
---|---|
protected Token[] |
sequence |
toBeParsed
Modifier | Constructor and Description |
---|---|
protected |
Pattern() |
|
Pattern(LineToParse l)
Standard constructor with line to parse
|
|
Pattern(Token[] array)
Standard constructor
|
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
|
java.lang.String |
getEmsg() |
abstract Token[] |
getSequence() |
void |
parse()
actually parse toBeParsed given requested parsing task
|
getTokenString, klone, setLineToParse
protected Token[] sequence
protected Pattern()
public Pattern(Token[] array)
array
- -- sequence of tokens to be parsedpublic Pattern(LineToParse l)
l
- -- line to parsepublic abstract Token[] getSequence()
public boolean canParse()
Token
public void consumeToken()
Token
consumeToken
in class Token
public java.lang.String getEmsg()