Package org.parboiled.parserunners
Class AbstractParseRunner<V>
- java.lang.Object
-
- org.parboiled.parserunners.AbstractParseRunner<V>
-
- All Implemented Interfaces:
ParseRunner<V>
- Direct Known Subclasses:
BasicParseRunner,ErrorLocatingParseRunner,ErrorReportingParseRunner,ProfilingParseRunner,RecoveringParseRunner,ReportingParseRunner
public abstract class AbstractParseRunner<V> extends java.lang.Object implements ParseRunner<V>
-
-
Constructor Summary
Constructors Constructor Description AbstractParseRunner(Rule rule)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParsingResult<V>createParsingResult(boolean matched, MatcherContext<V> rootContext)protected MatcherContext<V>createRootContext(InputBuffer inputBuffer, MatchHandler matchHandler, boolean fastStringMatching)java.util.List<ParseError>getParseErrors()MatchergetRootMatcher()ValueStack<V>getValueStack()protected voidresetValueStack()ParsingResult<V>run(char[] input)Performs the actual parse and creates a corresponding ParsingResult instance.ParsingResult<V>run(java.lang.String input)Performs the actual parse and creates a corresponding ParsingResult instance.ParseRunner<V>withParseErrors(java.util.List<ParseError> parseErrors)Initializes the parse runner with the given error list.ParseRunner<V>withValueStack(ValueStack<V> valueStack)Initializes the parse runner with the given ValueStack instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.parboiled.parserunners.ParseRunner
run
-
-
-
-
Constructor Detail
-
AbstractParseRunner
public AbstractParseRunner(Rule rule)
-
-
Method Detail
-
getRootMatcher
public Matcher getRootMatcher()
-
withParseErrors
public ParseRunner<V> withParseErrors(java.util.List<ParseError> parseErrors)
Description copied from interface:ParseRunnerInitializes the parse runner with the given error list.- Specified by:
withParseErrorsin interfaceParseRunner<V>- Parameters:
parseErrors- the error list to start off with- Returns:
- this instance
-
getParseErrors
public java.util.List<ParseError> getParseErrors()
-
withValueStack
public ParseRunner<V> withValueStack(ValueStack<V> valueStack)
Description copied from interface:ParseRunnerInitializes the parse runner with the given ValueStack instance.- Specified by:
withValueStackin interfaceParseRunner<V>- Parameters:
valueStack- the ValueStack to use- Returns:
- this instance
-
getValueStack
public ValueStack<V> getValueStack()
-
run
public ParsingResult<V> run(java.lang.String input)
Description copied from interface:ParseRunnerPerforms the actual parse and creates a corresponding ParsingResult instance.- Specified by:
runin interfaceParseRunner<V>- Parameters:
input- the input text to parse- Returns:
- the ParsingResult for the run
-
run
public ParsingResult<V> run(char[] input)
Description copied from interface:ParseRunnerPerforms the actual parse and creates a corresponding ParsingResult instance.- Specified by:
runin interfaceParseRunner<V>- Parameters:
input- the input text to parse- Returns:
- the ParsingResult for the run
-
resetValueStack
protected void resetValueStack()
-
createRootContext
protected MatcherContext<V> createRootContext(InputBuffer inputBuffer, MatchHandler matchHandler, boolean fastStringMatching)
-
createParsingResult
protected ParsingResult<V> createParsingResult(boolean matched, MatcherContext<V> rootContext)
-
-