Package quickparse.parsing
Class RecursiveDescentParser
java.lang.Object
quickparse.parsing.RecursiveDescentParser
- All Implemented Interfaces:
Parser
public class RecursiveDescentParser extends java.lang.Object implements Parser
-
Constructor Summary
Constructors Constructor Description RecursiveDescentParser(Grammar grammar) -
Method Summary
Modifier and Type Method Description SyntaxTreeparse(java.lang.CharSequence source)Parses aCharSequencestarting from the proper axiom of agrammarSyntaxTreeparse(java.lang.CharSequence source, java.lang.String axiom)Parses aCharSequencestarting from the specified construct of agrammarjava.lang.StringtoString()
-
Constructor Details
-
Method Details
-
parse
public SyntaxTree parse(java.lang.CharSequence source, java.lang.String axiom) throws ExpectedSymbolsException, UnexpectedSymbolExceptionDescription copied from interface:ParserParses aCharSequencestarting from the specified construct of agrammar- Specified by:
parsein interfaceParser- Parameters:
source- the sourceCharSequenceto parseaxiom- the construct name to use as the axiom for the parsing process- Returns:
- A
SyntaxTreeobject - Throws:
ExpectedSymbolsException- if an expected symbol is not found at some positionUnexpectedSymbolException- if an unexpected symbol is found at the end of the sourceCharSequence
-
parse
public SyntaxTree parse(java.lang.CharSequence source) throws ExpectedSymbolsException, UnexpectedSymbolExceptionDescription copied from interface:ParserParses aCharSequencestarting from the proper axiom of agrammar- Specified by:
parsein interfaceParser- Parameters:
source- the sourceCharSequenceto parse- Returns:
- A
SyntaxTreeobject - Throws:
ExpectedSymbolsException- if an expected symbol is not found at some positionUnexpectedSymbolException- if an unexpected symbol is found at the end of the sourceCharSequence
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-