Search in sources :

Example 1 with AOperationAttribute

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

the class RulesMachineChecker method checkOperationExpressionAttribute.

private void checkOperationExpressionAttribute(OccurredAttributes occurredAttributes, POperationAttribute pOperationAttribute) throws AssertionError {
    AOperationAttribute attribute = (AOperationAttribute) pOperationAttribute;
    LinkedList<PExpression> arguments = attribute.getArguments();
    String name = attribute.getName().getText();
    occurredAttributes.add(name, pOperationAttribute);
    switch(name) {
        case RulesGrammar.DEPENDS_ON_RULE:
            checkDependsOnRuleAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.DEPENDS_ON_COMPUTATION:
            checkDependsOnComputationAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.RULEID:
            checkRuleIdAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.ERROR_TYPES:
            checkErrorTypesAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.CLASSIFICATION:
            checkClassificationAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.TAGS:
            checkTagsAttribute(pOperationAttribute, arguments);
            return;
        case RulesGrammar.REPLACES:
            checkReplacesAttribute(pOperationAttribute, arguments);
            return;
        default:
            throw new AssertionError("Unexpected operation attribute: " + name);
    }
}
Also used : AOperationAttribute(de.be4.classicalb.core.parser.node.AOperationAttribute) PExpression(de.be4.classicalb.core.parser.node.PExpression)

Aggregations

AOperationAttribute (de.be4.classicalb.core.parser.node.AOperationAttribute)1 PExpression (de.be4.classicalb.core.parser.node.PExpression)1