|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.percederberg.grammatica.parser.Parser
A base parser class. This class provides the standard parser interface, as well as token handling.
| Method Summary | |
void |
addPattern(ProductionPattern pattern)
Adds a new production pattern to the parser. |
Node |
parse()
Parses the token stream and returns a parse tree. |
protected abstract Node |
parseStart()
Parses the token stream and returns a parse tree. |
void |
prepare()
Initializes the parser. |
java.lang.String |
toString()
Returns a string representation of this parser. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
public void addPattern(ProductionPattern pattern)
throws ParserCreationException
pattern - the pattern to add
ParserCreationException - if the pattern couldn't be
added correctly to the parser
public void prepare()
throws ParserCreationException
ParserCreationException - if the parser couldn't be
initialized correctly
public Node parse()
throws ParserCreationException,
ParserLogException
ParserCreationException - if the parser couldn't be
initialized correctly
ParserLogException - if the input couldn't be parsed
correctlyprepare()
protected abstract Node parseStart()
throws ParseException
ParseException - if the input couldn't be parsed
correctlypublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||