private class RecoveringParseRunner.Handler extends java.lang.Object implements MatchHandler
MatchHandler
implementation that recognizes the special
Chars.RESYNC
character to overcome InvalidInputError
s at the respective
error indices.Modifier and Type | Field and Description |
---|---|
private int |
fringeIndex |
private IsSingleCharMatcherVisitor |
isSingleCharMatcherVisitor |
private MatcherPath |
lastMatchPath |
Modifier | Constructor and Description |
---|---|
private |
Handler() |
Modifier and Type | Method and Description |
---|---|
private int |
gobbleIllegalCharacters(MatcherContext context,
java.util.List<Matcher> followMatchers) |
boolean |
match(MatcherContext<?> context)
Runs the given MatcherContext.
|
private boolean |
prepareErrorLocation(MatcherContext context) |
private boolean |
qualifiesForResync(MatcherContext context) |
private void |
rerunAndExecuteErrorActions(MatcherContext context) |
private boolean |
resynchronize(MatcherContext context) |
private boolean |
runTestMatch(MatcherContext context) |
private boolean |
willMatchDelError(MatcherContext context) |
private boolean |
willMatchInsError(MatcherContext context) |
private final IsSingleCharMatcherVisitor isSingleCharMatcherVisitor
private int fringeIndex
private MatcherPath lastMatchPath
public boolean match(MatcherContext<?> context)
MatchHandler
match
in interface MatchHandler
context
- the MatcherContextprivate boolean qualifiesForResync(MatcherContext context)
private boolean prepareErrorLocation(MatcherContext context)
private boolean willMatchDelError(MatcherContext context)
private boolean willMatchInsError(MatcherContext context)
private boolean runTestMatch(MatcherContext context)
private boolean resynchronize(MatcherContext context)
private void rerunAndExecuteErrorActions(MatcherContext context)
private int gobbleIllegalCharacters(MatcherContext context, java.util.List<Matcher> followMatchers)