Search in sources :

Example 1 with AEventBContextParseUnit

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

the class ContextTranslator method translateContext.

public Node translateContext() {
    AEventBContextParseUnit ast = new AEventBContextParseUnit();
    ast.setName(new TIdentifierLiteral(context.getName()));
    List<PContextClause> clauses = new ArrayList<>();
    clauses.add(processExtends());
    clauses.addAll(processConstants());
    clauses.addAll(processAxiomsAndTheorems());
    clauses.add(processSets());
    ast.setContextClauses(clauses);
    return ast;
}
Also used : AEventBContextParseUnit(de.be4.classicalb.core.parser.node.AEventBContextParseUnit) ArrayList(java.util.ArrayList) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral) PContextClause(de.be4.classicalb.core.parser.node.PContextClause)

Aggregations

AEventBContextParseUnit (de.be4.classicalb.core.parser.node.AEventBContextParseUnit)1 PContextClause (de.be4.classicalb.core.parser.node.PContextClause)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 ArrayList (java.util.ArrayList)1