private void performReportingRun() { resetValueStack(); ParseRunner<V> reportingRunner = new ErrorReportingParseRunner<V>(rootMatcherWithoutPTB, errorIndex, getInnerHandler()) .withParseErrors(getParseErrors()) .withValueStack(getValueStack()); ParsingResult<V> result = reportingRunner.run(buffer); Preconditions.checkState(!result.matched); // we failed before so we should really be failing again currentError = (InvalidInputError) getParseErrors().get(getParseErrors().size() - 1); }
protected ParsingResult<V> runReportingMatch(InputBuffer inputBuffer, int errorIndex) { ParseRunner<V> reportingRunner = new ErrorReportingParseRunner<V>(getRootMatcher(), errorIndex) .withParseErrors(getParseErrors()) .withValueStack(getValueStack()); return reportingRunner.run(inputBuffer); } }