public abstract class AbstractParseRunner<V> extends Object implements ParseRunner<V>
| Constructor and Description |
|---|
AbstractParseRunner(Rule rule) |
| Modifier and Type | Method and Description |
|---|---|
protected ParsingResult<V> |
createParsingResult(boolean matched,
MatcherContext<V> rootContext) |
protected MatcherContext<V> |
createRootContext(InputBuffer inputBuffer,
MatchHandler matchHandler,
boolean fastStringMatching) |
List<ParseError> |
getParseErrors() |
Matcher |
getRootMatcher() |
ValueStack<V> |
getValueStack() |
protected void |
resetValueStack() |
ParsingResult<V> |
run(char[] input)
Performs the actual parse and creates a corresponding ParsingResult instance.
|
ParsingResult<V> |
run(String input)
Performs the actual parse and creates a corresponding ParsingResult instance.
|
ParseRunner<V> |
withParseErrors(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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunpublic AbstractParseRunner(Rule rule)
public Matcher getRootMatcher()
public ParseRunner<V> withParseErrors(List<ParseError> parseErrors)
ParseRunnerwithParseErrors in interface ParseRunner<V>parseErrors - the error list to start off withpublic List<ParseError> getParseErrors()
public ParseRunner<V> withValueStack(ValueStack<V> valueStack)
ParseRunnerwithValueStack in interface ParseRunner<V>valueStack - the ValueStack to usepublic ValueStack<V> getValueStack()
public ParsingResult<V> run(String input)
ParseRunnerrun in interface ParseRunner<V>input - the input text to parsepublic ParsingResult<V> run(char[] input)
ParseRunnerrun in interface ParseRunner<V>input - the input text to parseprotected void resetValueStack()
protected MatcherContext<V> createRootContext(InputBuffer inputBuffer, MatchHandler matchHandler, boolean fastStringMatching)
protected ParsingResult<V> createParsingResult(boolean matched, MatcherContext<V> rootContext)
Copyright © 2019. All rights reserved.