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 NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable2Context context)
 {
     return new NumericVariable(
             new DataOrConditionStorageArea(
                 CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));
 }
 internal ReceivingStorageArea CreateStorageArea(CodeElementsParser.StorageArea2Context context)
 {
     return new ReceivingStorageArea(StorageDataType.Any,
         new DataOrConditionStorageArea(
             CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));
 }
 internal IntegerVariable CreateIntegerVariable(CodeElementsParser.IntegerVariable2Context context)
 {
     if (context.dataNameReference() != null)
     {
         return new IntegerVariable(
             new DataOrConditionStorageArea(
                 CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));
     }
     else
     {
         return new IntegerVariable(
             CobolWordsBuilder.CreateIntegerValue(context.integerValue()));
     }
 }
Ejemplo n.º 5
0
        internal NumericVariable CreateNumericVariable(CodeElementsParser.NumericVariable2Context context)
        {
            var variable = new NumericVariable(
                    new DataOrConditionStorageArea(
                        CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));

            // Collect storage area read/writes at the code element level
            if (variable.StorageArea != null)
            {
                this.storageAreaReads.Add(variable.StorageArea);
            }

            return variable;
        }
Ejemplo n.º 6
0
        internal IntegerVariable CreateIntegerVariable(CodeElementsParser.IntegerVariable2Context context)
        {
            IntegerVariable variable = null;
            if (context.dataNameReference() != null)
            {
                variable = new IntegerVariable(
                    new DataOrConditionStorageArea(
                        CobolWordsBuilder.CreateDataNameReference(context.dataNameReference())));
            }
            else
            {
                variable = new IntegerVariable(
                    CobolWordsBuilder.CreateIntegerValue(context.integerValue()));
            }

            // Collect storage area read/writes at the code element level
            if (variable.StorageArea != null)
            {
                this.storageAreaReads.Add(variable.StorageArea);
            }

            return variable;
        }
Ejemplo n.º 7
0
        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;
        }
Ejemplo n.º 8
0
 internal StorageArea CreateSharedStorageArea(CodeElementsParser.SharedStorageArea2Context context)
 {
     return new DataOrConditionStorageArea(CobolWordsBuilder.CreateDataNameReference(context.dataNameReference()));
 }