public static StorageArea CreateReceivingStorageArea(SymbolDefinition symbol) { if (symbol == null) return null; var storage = new DataOrConditionStorageArea(new SymbolReference(symbol)); return storage; }
public ConditionNameConditionOrSwitchStatusCondition(DataOrConditionStorageArea conditionReference) : base(ExpressionNodeType.ConditionNameConditionOrSwitchStatusCondition) { ConditionReference = conditionReference; }
internal Variable CreateVariable(CodeElementsParser.Variable2Context context) { SymbolReference qualifiedDataName = CobolWordsBuilder.CreateQualifiedDataName(context.qualifiedDataName()); StorageArea storageArea = new DataOrConditionStorageArea(qualifiedDataName); return new Variable(storageArea); }
internal Variable CreateVariable(CodeElementsParser.Variable5Context context) { if (context.dataNameReference() != null) { SymbolReference dataNameReference = CobolWordsBuilder.CreateDataNameReference(context.dataNameReference()); StorageArea storageArea = new DataOrConditionStorageArea(dataNameReference); return new Variable(storageArea); } else if (context.numericValue() != null) { return new Variable( CobolWordsBuilder.CreateNumericValue(context.numericValue())); } else { return new Variable( CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue3())); } }
internal DataOrConditionStorageArea CreateDataItemReferenceOrConditionReferenceOrIndexName(CodeElementsParser.DataItemReferenceOrConditionReferenceOrIndexNameContext context) { SymbolReference qualifiedDataNameOrQualifiedConditionNameOrIndexName = CobolWordsBuilder.CreateQualifiedDataNameOrQualifiedConditionNameOrIndexName(context.qualifiedDataNameOrQualifiedConditionNameOrIndexName()); DataOrConditionStorageArea storageArea = null; if (context.subscript() == null || context.subscript().Length == 0) { storageArea = new DataOrConditionStorageArea(qualifiedDataNameOrQualifiedConditionNameOrIndexName); } else { storageArea = new DataOrConditionStorageArea(qualifiedDataNameOrQualifiedConditionNameOrIndexName, CreateSubscriptExpressions(context.subscript())); } storageArea.AlternativeSymbolType = SymbolType.IndexName; return storageArea; }
internal StorageArea CreateOtherStorageAreaReference([CanBeNull]CodeElementsParser.OtherStorageAreaReferenceContext context) { if (context == null) return null; if (context.intrinsicDataNameReference() != null) { SymbolReference specialRegisterName = CobolWordsBuilder.CreateInstrinsicDataNameReference(context.intrinsicDataNameReference()); StorageArea specialRegister = new DataOrConditionStorageArea(specialRegisterName); return specialRegister; } else if (context.autoAllocatedDataItemReference() != null) { if (context.autoAllocatedDataItemReference().linageCounterSpecialRegister() != null) { return CreateLinageCounterSpecialRegister(context.autoAllocatedDataItemReference().linageCounterSpecialRegister()); } else if (context.autoAllocatedDataItemReference().addressOfSpecialRegister() != null) { return CreateAddressOfSpecialRegister(context.autoAllocatedDataItemReference().addressOfSpecialRegister()); } else { return CreateLengthOfSpecialRegister(context.autoAllocatedDataItemReference().lengthOfSpecialRegister()); } } else { return CreateFunctionIdentifier(context.functionIdentifier()); } }
private static CallTargetParameter CreateCallTargetParameter(ParameterDescriptionEntry param) { var symbolReference = new SymbolReference(param.DataName); var storageArea = new DataOrConditionStorageArea(symbolReference); var callParameter = new CallTargetParameter { StorageArea = storageArea }; return callParameter; }
internal Variable CreateVariable(CodeElementsParser.Variable5Context context) { Variable variable = null; if (context.dataNameReference() != null) { SymbolReference dataNameReference = CobolWordsBuilder.CreateDataNameReference(context.dataNameReference()); StorageArea storageArea = new DataOrConditionStorageArea(dataNameReference); variable = new Variable(storageArea); } else if (context.numericValue() != null) { variable = new Variable( CobolWordsBuilder.CreateNumericValue(context.numericValue())); } else { variable = new Variable( CobolWordsBuilder.CreateAlphanumericValue(context.alphanumericValue3())); } // Collect storage area read/writes at the code element level if (variable.StorageArea != null) { this.storageAreaReads.Add(variable.StorageArea); } return variable; }
internal Variable CreateVariable(CodeElementsParser.Variable2Context context) { SymbolReference qualifiedDataName = CobolWordsBuilder.CreateQualifiedDataName(context.qualifiedDataName()); StorageArea storageArea = new DataOrConditionStorageArea(qualifiedDataName); // Collect storage area read/writes at the code element level this.storageAreaReads.Add(storageArea); return new Variable(storageArea); }
public virtual bool Visit(DataOrConditionStorageArea storageArea) { return(true); }