Search in sources :

Example 1 with ABoolSetExpression

use of de.be4.classicalb.core.parser.node.ABoolSetExpression 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;
}
Also used : ABoolSetExpression(de.be4.classicalb.core.parser.node.ABoolSetExpression)

Example 2 with ABoolSetExpression

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

the class CreateFreetypeTest method createFreetype.

private AFreetypesMachineClause createFreetype() {
    final AConstructorFreetypeConstructor cons1 = new AConstructorFreetypeConstructor(new TIdentifierLiteral(CONS_BOOL), new ABoolSetExpression());
    final AConstructorFreetypeConstructor cons2 = new AConstructorFreetypeConstructor(new TIdentifierLiteral(CONS_INT), new AIntSetExpression());
    final AElementFreetypeConstructor cons3 = new AElementFreetypeConstructor(new TIdentifierLiteral(CONS_EMPTY));
    final AFreetype freetype = new AFreetype(new TIdentifierLiteral(FREETYPE_NAME), Arrays.<PFreetypeConstructor>asList(cons1, cons2, cons3));
    return new AFreetypesMachineClause(Arrays.<PFreetype>asList(freetype));
}
Also used : AElementFreetypeConstructor(de.be4.classicalb.core.parser.node.AElementFreetypeConstructor) AConstructorFreetypeConstructor(de.be4.classicalb.core.parser.node.AConstructorFreetypeConstructor) AFreetypesMachineClause(de.be4.classicalb.core.parser.node.AFreetypesMachineClause) ABoolSetExpression(de.be4.classicalb.core.parser.node.ABoolSetExpression) AIntSetExpression(de.be4.classicalb.core.parser.node.AIntSetExpression) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral) AFreetype(de.be4.classicalb.core.parser.node.AFreetype)

Example 3 with ABoolSetExpression

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

the class CreateFreetypeTest method createOperations.

private AOperationsMachineClause createOperations() {
    final AOperation op1 = createAdd("addBool", "b", new ABoolSetExpression(), CONS_BOOL);
    final AOperation op2 = createAdd("addInt", "i", new AIntSetExpression(), CONS_INT);
    final AOperation op3 = createSimpleAdd("addEmpty");
    final AOperationsMachineClause operations = new AOperationsMachineClause(Arrays.<POperation>asList(op1, op2, op3));
    return operations;
}
Also used : AOperationsMachineClause(de.be4.classicalb.core.parser.node.AOperationsMachineClause) AOperation(de.be4.classicalb.core.parser.node.AOperation) ABoolSetExpression(de.be4.classicalb.core.parser.node.ABoolSetExpression) AIntSetExpression(de.be4.classicalb.core.parser.node.AIntSetExpression)

Aggregations

ABoolSetExpression (de.be4.classicalb.core.parser.node.ABoolSetExpression)3 AIntSetExpression (de.be4.classicalb.core.parser.node.AIntSetExpression)2 AConstructorFreetypeConstructor (de.be4.classicalb.core.parser.node.AConstructorFreetypeConstructor)1 AElementFreetypeConstructor (de.be4.classicalb.core.parser.node.AElementFreetypeConstructor)1 AFreetype (de.be4.classicalb.core.parser.node.AFreetype)1 AFreetypesMachineClause (de.be4.classicalb.core.parser.node.AFreetypesMachineClause)1 AOperation (de.be4.classicalb.core.parser.node.AOperation)1 AOperationsMachineClause (de.be4.classicalb.core.parser.node.AOperationsMachineClause)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1