Search in sources :

Example 1 with ARuleOperation

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

the class RulesMachineChecker method caseARuleOperation.

@Override
public void caseARuleOperation(ARuleOperation node) {
    currentOperation = new RuleOperation(node.getRuleName(), this.fileName, this.machineName, machineReferences);
    if (containsRule(currentOperation.getName())) {
        errorList.add(new CheckException("Duplicate operation name '" + currentOperation.getName() + "'.", node.getRuleName()));
    }
    RuleOperation ruleOp = (RuleOperation) currentOperation;
    rulesMap.put(node, ruleOp);
    visitOperationAttributes(node.getAttributes());
    node.getRuleBody().apply(this);
    checkAllErrorTypesImplemented(ruleOp);
    currentOperation = null;
}
Also used : ARuleOperation(de.be4.classicalb.core.parser.node.ARuleOperation) CheckException(de.be4.classicalb.core.parser.exceptions.CheckException)

Aggregations

CheckException (de.be4.classicalb.core.parser.exceptions.CheckException)1 ARuleOperation (de.be4.classicalb.core.parser.node.ARuleOperation)1