Beispiel #1
0
 public DataOrConditionStorageArea(SymbolReference symbolReference)
     : base(StorageAreaKind.DataOrCondition)
 {
     SymbolReference = symbolReference;
     Subscripts = new List<SubscriptExpression>();
 }
Beispiel #2
0
        public StorageAreaPropertySpecialRegister(Token specialRegisterName, StorageArea storageAreaReference)
            : base(StorageAreaKind.StorageAreaPropertySpecialRegister)
        {
            SpecialRegisterName = specialRegisterName;
            OtherStorageAreaReference = storageAreaReference;

            // This is both a storage area definition and a reference to the same storage area
            var storageAreaName = storageAreaReference != null ? storageAreaReference.ToString() : "null";
            DataDescriptionEntry = new SpecialRegisterDescriptionEntry(specialRegisterName, storageAreaName);
            SymbolReference = new SymbolReference(DataDescriptionEntry.DataName);
        }
Beispiel #3
0
        public FilePropertySpecialRegister(Token specialRegisterName, SymbolReference fileNameReference)
            : base(StorageAreaKind.FilePropertySpecialRegister)
        {
            SpecialRegisterName = specialRegisterName;
            FileNameReference = fileNameReference;

            // This is both a storage area definition and a reference to the same storage area
            DataDescriptionEntry = new SpecialRegisterDescriptionEntry(specialRegisterName, fileNameReference.ToString());
            SymbolReference = new SymbolReference(DataDescriptionEntry.DataName);
        }
Beispiel #4
0
 public IndexStorageArea(SymbolReference indexNameReference)
     : base(StorageAreaKind.Index)
 {
     SymbolReference = indexNameReference;
 }
Beispiel #5
0
 public UserDefinedFunctionCall(SymbolReference functionName, CallSiteParameter[] arguments)
     : base(FunctionCallType.UserDefinedFunctionCall, arguments)
 {
     UserDefinedFunctionName = functionName;
 }
Beispiel #6
0
 public Variable(SymbolReference reference) : base(StorageDataType.Any, null)
 {
     SymbolReference = reference;
 }
Beispiel #7
0
 public virtual bool Visit(SymbolReference symbolReference)
 {
     return(true);
 }
Beispiel #8
0
 public IntrinsicStorageArea(SymbolReference symbolReference) : base(StorageAreaKind.DataOrCondition)
 {
     this.SymbolReference = symbolReference;
 }
Beispiel #9
0
 public SymbolDefinition(SymbolReference symbol)
     : this(symbol!=null? symbol.NameLiteral : null, symbol!=null? symbol.Type: SymbolType.TO_BE_RESOLVED)
 {
 }
Beispiel #10
0
 private void CheckNotInTable(SymbolTable table, SymbolReference symbol, CodeElement ce)
 {
     if (symbol == null) return;
     string message = "TCRFUN_NO_PERFORM_OF_ENCLOSING_PROGRAM";
     var found = table.GetSection(symbol.Name);
     if (found.Count > 0) DiagnosticUtils.AddError(ce, message);
     else {
     found = table.GetParagraph(symbol.Name);
     if (found.Count > 0) DiagnosticUtils.AddError(ce, message);
     }
 }
Beispiel #11
0
 public QualifiedSymbolReference(SymbolReference head, SymbolReference tail)
     : base(head.NameLiteral, head.Type)
 {
     IsAmbiguous = head.IsAmbiguous;
     IsQualifiedReference = true;
     Head = head;
     Tail = tail;
 }
Beispiel #12
0
 public Parameter(SymbolReference name, bool isCustom, DataType type, int length=int.MaxValue)
 {
     this.Name = name;
     this.Type   = type;
     this.Length = length;
     if (length < 1) throw new System.ArgumentOutOfRangeException("Length must be >0 (actual: "+length+')');
     this.IsCustom = isCustom;
 }
Beispiel #13
0
 public Parameter(SymbolReference name)
     : this(name, false, null, int.MaxValue)
 {
 }
Beispiel #14
0
 public ClassCondition(StorageArea dataItem, SymbolReference characterClassNameReference, SyntaxProperty<bool> invertResult)
     : base(ExpressionNodeType.ClassCondition)
 {
     DataItem = dataItem;
     CharacterClassNameReference = characterClassNameReference;
     InvertResult = invertResult;
 }
Beispiel #15
0
 public AlphanumericValue(SymbolReference symbolicCharacterReference) : base(symbolicCharacterReference.NameLiteral.Token)
 {
     IsSymbolicCharacterReference = true;
 }
Beispiel #16
0
 internal SymbolReference CreateSymbolReference(CodeElementsParser.SymbolReference12Context context, SymbolType symbolType)
 {
     AlphanumericValue nameLiteral = null;
     if (context.alphanumericValue4() != null)
     {
         nameLiteral = CreateAlphanumericValue(context.alphanumericValue4());
     }
     else if(context.DATE() != null)
     {
         nameLiteral = new AlphanumericValue(ParseTreeUtils.GetFirstToken(context.DATE()));
     }
     var symbolReference = new SymbolReference(nameLiteral, symbolType);
     symbolInformationForTokens[nameLiteral.Token] = symbolReference;
     return symbolReference;
 }
Beispiel #17
0
 public CharacterValue(SymbolReference symbolicCharacterReference) : base(symbolicCharacterReference)
 {
 }
Beispiel #18
0
 public IndexStorageArea(SymbolReference indexNameReference) : base(StorageAreaKind.Index)
 {
     SymbolReference = indexNameReference;
 }
Beispiel #19
0
 public RepeatedCharacterValue(Token optionalALLToken, SymbolReference symbolicCharacterReference) : base(symbolicCharacterReference)
 {
     ALLToken = optionalALLToken;
 }
Beispiel #20
0
 public SymbolReferenceVariable(StorageDataType symbolType, SymbolReference symbolReference) : base(symbolType, null)
 {
     SymbolReference = symbolReference;
 }
 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;
 }
Beispiel #22
0
 public VariableOrExpression(SymbolReference symbolReference) :
     base(symbolReference)
 {
 }
Beispiel #23
0
 public TypeCobolQualifiedSymbolReference(SymbolReference head, SymbolReference tail) : base(head, tail)
 {
     IsTypeCobolQualifiedReference = true;
 }
Beispiel #24
0
        public FunctionCallResult(FunctionCall functionCall)
            : base(StorageAreaKind.FunctionCallResult)
        {
            FunctionCall = functionCall;

            // This is both a storage area definition and a reference to the same storage area
            int uniqueCounter = Interlocked.Increment(ref callSiteCounter);
            DataDescriptionEntry = new FunctionCallResultDescriptionEntry(functionCall, uniqueCounter);
            SymbolReference = new SymbolReference(DataDescriptionEntry.DataName);
        }
 internal SymbolReference CreateSymbolReference(CodeElementsParser.SymbolReference11Context context, SymbolType symbolType)
 {
     AlphanumericValue nameLiteral = CreateAlphanumericValue(context.alphanumericValue11());
     var symbolReference = new SymbolReference(nameLiteral, symbolType);
     symbolInformationForTokens[nameLiteral.Token] = symbolReference;
     return symbolReference;
 }
Beispiel #26
0
 public ProcedureCall(SymbolReference name, List<CallSiteParameter> inputs, List<CallSiteParameter> inouts, List<CallSiteParameter> outputs)
     : base(FunctionCallType.UserDefinedFunctionCall, null)
 {
     ProcedureName = name;
     InputParameters  = inputs  ?? new List<CallSiteParameter>();
     InoutParameters  = inouts  ?? new List<CallSiteParameter>();
     OutputParameters = outputs ?? new List<CallSiteParameter>();
 }
Beispiel #27
0
 public FilePropertySpecialRegister(Token specialRegisterName, SymbolReference fileNameReference)
     : base(StorageAreaKind.FilePropertySpecialRegister)
 {
     SpecialRegisterName = specialRegisterName;
     SymbolReference = fileNameReference;
 }
Beispiel #28
0
 public DataOrConditionStorageArea(SymbolReference subscriptedSymbolReference, SubscriptExpression[] subscripts)
     : base(StorageAreaKind.DataOrCondition)
 {
     SymbolReference = subscriptedSymbolReference;
     Subscripts = new List<SubscriptExpression>(subscripts);
 }
Beispiel #29
0
 public DataOrConditionStorageArea(SymbolReference symbolReference)
     : base(StorageAreaKind.DataOrCondition)
 {
     SymbolReference = symbolReference;
     Subscripts      = new List <SubscriptExpression>();
 }
Beispiel #30
0
 public UserDefinedFunctionCall(SymbolReference functionName, CallSiteParameter[] arguments)
     : base(FunctionCallType.UserDefinedFunctionCall, arguments)
 {
     UserDefinedFunctionName = functionName;
 }
Beispiel #31
0
 public DataOrConditionStorageArea(SymbolReference subscriptedSymbolReference, SubscriptExpression[] subscripts)
     : base(StorageAreaKind.DataOrCondition)
 {
     SymbolReference = subscriptedSymbolReference;
     Subscripts      = new List <SubscriptExpression>(subscripts);
 }
 public TableSortingKey(SymbolReference sortKey, SyntaxProperty<SortDirection> sortDirection)
 {
     SortKey = sortKey;
     SortDirection = sortDirection;
 }
Beispiel #33
0
 private SymbolReference CreateQualifiedSymbolReference(SymbolReference head, SymbolReference tail, bool isCOBOL = true)
 {
     if (isCOBOL) return new QualifiedSymbolReference(head, tail);
     else return new TypeCobolQualifiedSymbolReference(head, tail);
 }