Search in sources :

Example 1 with APromotesMachineClause

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

the class BMachine method addPromotesClause.

public void addPromotesClause(List<String> operationList) {
    APromotesMachineClause promotes = new APromotesMachineClause();
    List<PExpression> opList = new ArrayList<>();
    for (String name : operationList) {
        List<TIdentifierLiteral> idList = new ArrayList<>();
        idList.add(new TIdentifierLiteral(name));
        AIdentifierExpression idExpr = new AIdentifierExpression(idList);
        opList.add(idExpr);
    }
    promotes.setOperationNames(opList);
    this.parseUnit.getMachineClauses().add(promotes);
}
Also used : AIdentifierExpression(de.be4.classicalb.core.parser.node.AIdentifierExpression) ArrayList(java.util.ArrayList) APromotesMachineClause(de.be4.classicalb.core.parser.node.APromotesMachineClause) PExpression(de.be4.classicalb.core.parser.node.PExpression) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral)

Aggregations

AIdentifierExpression (de.be4.classicalb.core.parser.node.AIdentifierExpression)1 APromotesMachineClause (de.be4.classicalb.core.parser.node.APromotesMachineClause)1 PExpression (de.be4.classicalb.core.parser.node.PExpression)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 ArrayList (java.util.ArrayList)1