public Tuple2<Either<Set<ParseFailedException>, K>, Set<ParseFailedException>>
parseString(String input, Sort startSymbol, Scanner scanner, Source source, int startLine, int startColumn, boolean inferSortChecks) {
final Tuple2<Either<Set<ParseFailedException>, Term>, Set<ParseFailedException>> result
= parseStringTerm(input, startSymbol, scanner, source, startLine, startColumn, inferSortChecks);
Either<Set<ParseFailedException>, K> parseInfo;
if (result._1().isLeft()) {
parseInfo = Left.apply(result._1().left().get());
} else {
parseInfo = Right.apply(new TreeNodesToKORE(Outer::parseSort, inferSortChecks && strict).apply(result._1().right().get()));
}
return new Tuple2<>(parseInfo, result._2());
}