Search in sources :

Example 1 with AIntSetExpression

use of de.be4.classicalb.core.parser.node.AIntSetExpression 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 2 with AIntSetExpression

use of de.be4.classicalb.core.parser.node.AIntSetExpression 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)2 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