use of de.be4.ltl.core.parser.internal.LtlAdapterException in project probparsers by bendisposto.
the class TemporalLogicParser method generatePrologTerm.
public PrologTerm generatePrologTerm(final String formula, final String stateID) throws LtlParseException {
T ast;
try {
ast = parseFormula(formula);
} catch (IOException e) {
String msg = "StringReader should not cause IOExceptions";
throw new IllegalStateException(msg);
}
StructuredPrologOutput pto = new StructuredPrologOutput();
try {
applyPrologGenerator(pto, stateID, specParser, ast);
} catch (LtlAdapterException e) {
throw e.getOriginalException();
}
pto.fullstop();
return pto.getSentences().iterator().next();
}
Aggregations