Package org.parboiled.support
Class ParsingResult<V>
java.lang.Object
org.parboiled.support.ParsingResult<V>
A simple container encapsulating the result of a parsing run.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal InputBuffer
The underlying input buffer.final boolean
Indicates whether the input was successfully parsed.final List<ParseError>
The list of parse errors created during the parsing run.The root node of the parse tree created by the parsing run.final V
The top value of the value stack at the end of the parsing run or null, if the value stack is empty.final ValueStack<V>
The ValueStack used during the parsing run containing all values not popped of the stack by the parser. -
Constructor Summary
ConstructorsConstructorDescriptionParsingResult
(boolean matched, Node<V> parseTreeRoot, ValueStack<V> valueStack, List<ParseError> parseErrors, InputBuffer inputBuffer) Creates a new ParsingResult. -
Method Summary
-
Field Details
-
matched
public final boolean matchedIndicates whether the input was successfully parsed. -
parseTreeRoot
The root node of the parse tree created by the parsing run. This field will only be non-null when parse-tree-building has been enabled. -
resultValue
The top value of the value stack at the end of the parsing run or null, if the value stack is empty. -
valueStack
The ValueStack used during the parsing run containing all values not popped of the stack by the parser. -
parseErrors
The list of parse errors created during the parsing run. -
inputBuffer
The underlying input buffer.
-
-
Constructor Details
-
ParsingResult
public ParsingResult(boolean matched, Node<V> parseTreeRoot, ValueStack<V> valueStack, List<ParseError> parseErrors, InputBuffer inputBuffer) Creates a new ParsingResult.- Parameters:
matched
- true if the rule matched the inputparseTreeRoot
- the parse tree root nodevalueStack
- the value stack of the parsing runparseErrors
- the list of parse errorsinputBuffer
- the input buffer
-
-
Method Details
-
hasErrors
public boolean hasErrors()- Returns:
- true if this parsing result contains parsing errors.
-