1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
// Copyright (C) 2006-2007 Sandy Dunlop (sandy@sorn.net)
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
using System;
using System.IO;
using System.Collections;
namespace Wildcat.Cobol.Compiler.Structure
{
public class DataDescription : AST
{
private string _name;
private DataType _type;
private string _value;
private int _size;
private int _level;
private bool _isSpaces;
private bool _isHighValue;
private bool _isHighValues;
private string _redefines;
private DataDescription _redefinesDefinition;
private int _occurs;
private bool _isBinary;
private bool _isGroup;
private ArrayList _elements;
private DataDescription _parentGroup;
private string _lineNumber;
private Identifier _classId;
private bool _isClass;
private bool _isArray;
private ClassDefinition _classDef;
private string _extendedType; //TODO: This shouldn't be a string
private bool _isVariableDeclaration;
private FileAndSortDescriptionEntry _fsde;
public FileAndSortDescriptionEntry FSDE
{
get { return _fsde; }
set { _fsde = value; }
}
public bool IsVariableDeclaration
{
get { return _isVariableDeclaration; }
set { _isVariableDeclaration = value; }
}
public bool IsHighValue
{
get { return _isHighValue; }
set { _isHighValue = value; }
}
public bool IsHighValues
{
get { return _isHighValues; }
set { _isHighValues = value; }
}
public string ExtendedType
{
get { return _extendedType; }
set { _extendedType = value; }
}
public ClassDefinition ClassDefinition
{
get { return _classDef; }
set { _classDef = value; }
}
public DataDescription RedefinesDefinition
{
get { return _redefinesDefinition; }
set { _redefinesDefinition = value; }
}
public bool IsArray
{
get { return _isArray; }
set { _isArray = value; }
}
public bool IsClass
{
get { return _isClass; }
set { _isClass = value; }
}
public Identifier ClassId
{
get { return _classId; }
set { _classId = value; }
}
public string LineNumber
{
get { return _lineNumber; }
set { _lineNumber = value; }
}
public DataDescription ParentGroup
{
get { return _parentGroup; }
set { _parentGroup = value; }
}
public ArrayList Elements
{
get { return _elements; }
set { _elements = value; }
}
public bool IsGroup
{
get { return _isGroup; }
set { _isGroup = value; }
}
public bool IsBinary
{
get { return _isBinary; }
set { _isBinary = value; }
}
public int Occurs
{
get { return _occurs; }
set { _occurs = value; }
}
public string Redefines
{
get { return _redefines; }
set { _redefines = value; }
}
public bool IsSpaces
{
get { return _isSpaces; }
set { _isSpaces = value; }
}
public int Level
{
get { return _level; }
set { _level = value; }
}
public int Size
{
get { return _size; }
set { _size = value; }
}
public string Value
{
get { return _value; }
set { _value = value; }
}
public DataType Type
{
get { return _type; }
set { _type = value; }
}
public string Name
{
get{ return _name; }
set{ _name = value; }
}
public DataDescription()
{
_type = DataType.Unknown;
_isSpaces = false;
_isBinary = false;
_elements = new ArrayList();
_redefinesDefinition = null;
_redefines = null;
}
public string ToString()
{
return _name;
}
}
public enum DataType
{
Unknown,
String,
Integer,
Boolean
}
}
|