public class Pattern extends Token
toBeParsed
Constructor and Description |
---|
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()
consume the next token if canParse()==true ; token is stored
in LinetoParse object
|
java.lang.String |
getEmsg() |
Pattern |
klone(LineToParse l)
return copy of 'this'
|
void |
parse()
actually parse toBeParsed given requested parsing task
|
setLineToParse
public Pattern(Token[] array)
array
- -- sequence of tokens to be parsedpublic Pattern(LineToParse l)
l
- -- line to parsepublic boolean canParse()
Token
public void consumeToken()
Token
consumeToken
in class Token
public java.lang.String getEmsg()
public Pattern klone(LineToParse l)
Token