Search in sources :

Example 51 with AIdentifierExpression

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

the class DependencyWalker method registerMachineNames.

private void registerMachineNames(final List<PExpression> machineNames, final ERefType depType) {
    for (final PExpression machineName : machineNames) {
        if (machineName instanceof AIdentifierExpression) {
            final AIdentifierExpression identifier = (AIdentifierExpression) machineName;
            final String dest = extractMachineName(identifier.getIdentifier());
            // TODO test this
            addMachine(dest, depType == ERefType.USES ? dest : prefix, depType);
        }
    }
}
Also used : AIdentifierExpression(de.be4.classicalb.core.parser.node.AIdentifierExpression) PExpression(de.be4.classicalb.core.parser.node.PExpression)

Aggregations

AIdentifierExpression (de.be4.classicalb.core.parser.node.AIdentifierExpression)43 PExpression (de.be4.classicalb.core.parser.node.PExpression)27 ArrayList (java.util.ArrayList)25 CheckException (de.be4.classicalb.core.parser.exceptions.CheckException)22 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)14 Node (de.be4.classicalb.core.parser.node.Node)5 Test (org.junit.Test)5 BException (de.be4.classicalb.core.parser.exceptions.BException)4 VisitorException (de.be4.classicalb.core.parser.exceptions.VisitorException)4 HashSet (java.util.HashSet)4 LinkedList (java.util.LinkedList)4 AExpressionDefinitionDefinition (de.be4.classicalb.core.parser.node.AExpressionDefinitionDefinition)3 AFunctionExpression (de.be4.classicalb.core.parser.node.AFunctionExpression)3 AIntegerExpression (de.be4.classicalb.core.parser.node.AIntegerExpression)3 AStringExpression (de.be4.classicalb.core.parser.node.AStringExpression)3 BParser (de.be4.classicalb.core.parser.BParser)2 IDefinitions (de.be4.classicalb.core.parser.IDefinitions)2 Type (de.be4.classicalb.core.parser.IDefinitions.Type)2 AEqualPredicate (de.be4.classicalb.core.parser.node.AEqualPredicate)2 AExpressionParseUnit (de.be4.classicalb.core.parser.node.AExpressionParseUnit)2