use of de.be4.classicalb.core.parser.node.PExpression in project probparsers by bendisposto.
the class MachineContext method caseAEnumeratedSetSet.
@Override
public void caseAEnumeratedSetSet(AEnumeratedSetSet node) {
{
List<TIdentifierLiteral> copy = new ArrayList<TIdentifierLiteral>(node.getIdentifier());
String name = Utils.getTIdentifierListAsString(copy);
exist(node.getIdentifier());
enumeratedSets.put(name, node);
}
List<PExpression> copy = new ArrayList<PExpression>(node.getElements());
for (PExpression e : copy) {
AIdentifierExpression v = (AIdentifierExpression) e;
String name = Utils.getTIdentifierListAsString(v.getIdentifier());
exist(v.getIdentifier());
enumValues.put(name, v);
}
}
use of de.be4.classicalb.core.parser.node.PExpression in project probparsers by bendisposto.
the class BoolType method createASTNode.
public PExpression createASTNode(Typechecker typechecker) {
ABoolSetExpression node = new ABoolSetExpression();
typechecker.setType(node, new SetType(this));
return node;
}
use of de.be4.classicalb.core.parser.node.PExpression in project probparsers by bendisposto.
the class FunctionType method createASTNode.
@Override
public PExpression createASTNode(Typechecker typechecker) {
APartialFunctionExpression node = new APartialFunctionExpression(domain.createASTNode(typechecker), range.createASTNode(typechecker));
typechecker.setType(node, new SetType(this));
return node;
}
use of de.be4.classicalb.core.parser.node.PExpression in project probparsers by bendisposto.
the class TranslatingVisitor method caseACoupleExpression.
@Override
public void caseACoupleExpression(ACoupleExpression node) {
List<BObject> s = new ArrayList<BObject>();
for (PExpression e : node.getList()) {
e.apply(this);
s.add(this.getResult());
}
this.setResult(new Tuple(s));
}
use of de.be4.classicalb.core.parser.node.PExpression in project probparsers by bendisposto.
the class TranslatingVisitor method caseASequenceExtensionExpression.
@Override
public void caseASequenceExtensionExpression(ASequenceExtensionExpression node) {
List<BObject> s = new ArrayList<BObject>();
for (PExpression e : node.getExpression()) {
e.apply(this);
s.add(this.getResult());
}
this.setResult(new Sequence(s));
}
Aggregations