public class RecursiveDescentParser extends Parser
| Constructor and Description |
|---|
RecursiveDescentParser(java.io.Reader input)
Creates a new parser.
|
RecursiveDescentParser(java.io.Reader input,
Analyzer analyzer)
Creates a new parser.
|
RecursiveDescentParser(Tokenizer tokenizer)
Creates a new parser.
|
RecursiveDescentParser(Tokenizer tokenizer,
Analyzer analyzer)
Creates a new parser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPattern(ProductionPattern pattern)
Adds a new production pattern to the parser.
|
protected Node |
parseStart()
Parses the input stream and creates a parse tree.
|
void |
prepare()
Initializes the parser.
|
getAnalyzer, getTokenizer, newAnalyzer, newProduction, newTokenizer, parse, reset, reset, toStringpublic RecursiveDescentParser(java.io.Reader input)
throws ParserCreationException
input - the input stream to read fromParserCreationException - if the tokenizer couldn't be
initialized correctlypublic RecursiveDescentParser(java.io.Reader input,
Analyzer analyzer)
throws ParserCreationException
input - the input stream to read fromanalyzer - the analyzer callback to useParserCreationException - if the tokenizer couldn't be
initialized correctlypublic RecursiveDescentParser(Tokenizer tokenizer)
tokenizer - the tokenizer to usepublic void addPattern(ProductionPattern pattern) throws ParserCreationException
addPattern in class Parserpattern - the pattern to addParserCreationException - if the pattern couldn't be
added correctly to the parserpublic void prepare()
throws ParserCreationException
prepare in class ParserParserCreationException - if the parser couldn't be
initialized correctlyprotected Node parseStart() throws ParseException
parseStart in class ParserParseException - if the input couldn't be parsed
correctly