|
|||||||||||
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. |
abstract Node |
parse()
Parses the token stream and returns a parse tree. |
void |
prepare()
Initializes the parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 parserpublic void prepare() throws ParserCreationException
ParserCreationException
- if the parser couldn't be
initialized correctlypublic abstract Node parse() throws ParserCreationException, ParseException
ParserCreationException
- if the parser couldn't be
initialized correctly
ParseException
- if the input couldn't be parsed
correctlyprepare()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |