Search in sources :

Example 1 with ASetsContextClause

use of de.be4.classicalb.core.parser.node.ASetsContextClause in project probparsers by bendisposto.

the class MachineContext method caseASetsContextClause.

@Override
public void caseASetsContextClause(ASetsContextClause node) {
    this.setsMachineClause = node;
    List<PSet> copy = new ArrayList<PSet>(node.getSet());
    for (PSet e : copy) {
        e.apply(this);
    }
}
Also used : PSet(de.be4.classicalb.core.parser.node.PSet) ArrayList(java.util.ArrayList)

Example 2 with ASetsContextClause

use of de.be4.classicalb.core.parser.node.ASetsContextClause in project prob2 by bendisposto.

the class ContextTranslator method processSets.

private ASetsContextClause processSets() {
    List<PSet> sets = new ArrayList<>();
    for (Set bSet : context.getSets()) {
        List<TIdentifierLiteral> names = new ArrayList<>();
        names.add(new TIdentifierLiteral(bSet.getName()));
        sets.add(new ADeferredSetSet(names));
    }
    return new ASetsContextClause(sets);
}
Also used : ADeferredSetSet(de.be4.classicalb.core.parser.node.ADeferredSetSet) Set(de.prob.model.representation.Set) PSet(de.be4.classicalb.core.parser.node.PSet) ASetsContextClause(de.be4.classicalb.core.parser.node.ASetsContextClause) PSet(de.be4.classicalb.core.parser.node.PSet) ArrayList(java.util.ArrayList) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral) ADeferredSetSet(de.be4.classicalb.core.parser.node.ADeferredSetSet)

Aggregations

PSet (de.be4.classicalb.core.parser.node.PSet)2 ArrayList (java.util.ArrayList)2 ADeferredSetSet (de.be4.classicalb.core.parser.node.ADeferredSetSet)1 ASetsContextClause (de.be4.classicalb.core.parser.node.ASetsContextClause)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 Set (de.prob.model.representation.Set)1