use of de.prob.parserbase.ProBParseException in project probparsers by bendisposto.
the class ClassicalBParser method parsePredicate.
@Override
public void parsePredicate(final IPrologTermOutput pto, final String predicate, final boolean wrap) throws ProBParseException {
try {
Start ast = new BParser().parsePredicate(predicate);
printAst(pto, ast, wrap, WRAPPER_PRED);
} catch (BCompoundException e) {
throw new ProBParseException(e.getFirstException().getLocalizedMessage());
}
}
use of de.prob.parserbase.ProBParseException in project probparsers by bendisposto.
the class ClassicalBParser method parseExpression.
@Override
public void parseExpression(final IPrologTermOutput pto, final String expression, final boolean wrap) throws ProBParseException {
try {
Start ast = new BParser().parseExpression(expression);
printAst(pto, ast, wrap, WRAPPER_EXPR);
} catch (BCompoundException e) {
throw new ProBParseException(e.getFirstException().getLocalizedMessage());
}
}
use of de.prob.parserbase.ProBParseException in project probparsers by bendisposto.
the class ClassicalBParser method parseTransitionPredicate.
@Override
public void parseTransitionPredicate(final IPrologTermOutput pto, final String trans, final boolean wrap) throws ProBParseException {
try {
Start ast = new BParser().parseTranstion(trans);
printAst(pto, ast, wrap, WRAPPER_TRANS);
} catch (BCompoundException e) {
throw new ProBParseException(e.getFirstException().getLocalizedMessage());
}
}
use of de.prob.parserbase.ProBParseException in project prob2 by bendisposto.
the class EventBParserBase method parseTransitionPredicate.
@Override
public void parseTransitionPredicate(IPrologTermOutput pto, String transPredicate, boolean wrap) throws ProBParseException {
Start ast;
try {
ast = BParser.parse(BParser.OPERATION_PATTERN_PREFIX + transPredicate);
} catch (BCompoundException e) {
throw (ProBParseException) new ProBParseException(e.getLocalizedMessage()).initCause(e);
}
toPrologTerm(pto, ast, wrap, TRANS_WRAPPER);
}
Aggregations