use of de.be4.classicalb.core.parser.analysis.prolog.ASTProlog in project probparsers by bendisposto.
the class ClassicalBParser method printAst.
private void printAst(final IPrologTermOutput pto, Start ast, final boolean wrap, final String wrapper) {
NodeIdAssignment na = new NodeIdAssignment();
ast.apply(na);
ClassicalPositionPrinter pprinter = new ClassicalPositionPrinter(na, -1, 0);
final ASTProlog prologPrinter = new ASTProlog(pto, pprinter);
if (wrap) {
pto.openTerm(wrapper);
}
ast.apply(prologPrinter);
if (wrap) {
pto.closeTerm();
}
}
use of de.be4.classicalb.core.parser.analysis.prolog.ASTProlog in project prob2 by bendisposto.
the class EventB method printProlog.
@Override
public void printProlog(final IPrologTermOutput pout) {
if (ast == null) {
ensureParsed();
}
if (EvalElementType.ASSIGNMENT.equals(getKind())) {
throw new EvaluationException("Assignments are currently unsupported for evaluation");
}
assert ast != null;
final ASTProlog prolog = new ASTProlog(pout, null);
ast.apply(prolog);
}
Aggregations