use of de.prob.core.sablecc.node.AInterruptedResult in project probparsers by bendisposto.
the class PrologTermGenerator method toPrologTerm.
public static PrologTerm toPrologTerm(final Start node) throws ResultParserException {
PResult topnode = node.getPResult();
PrologTerm term = null;
if (topnode instanceof AYesResult) {
term = toPrologTerm(((AYesResult) topnode).getTerm());
} else if (topnode instanceof ANoResult) {
term = null;
} else if (topnode instanceof AInterruptedResult) {
term = null;
} else if (topnode instanceof AExceptionResult) {
String message = "ProB raised an exception: " + ((AExceptionResult) topnode).getString().getText();
throw new ResultParserException(message, null);
} else
throw new IllegalStateException("Unknown subclass of PResult: " + topnode.getClass().getCanonicalName());
return term;
}
Aggregations