Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/**********************************************************************
32
$Author: release $
33
$Date: 1998/01/17 15:55:46 $
34
$Revision: 1.1.1.1 $
35
$Log: diagtypes.h,v $
36
 * Revision 1.1.1.1  1998/01/17  15:55:46  release
37
 * First version to be checked into rolling release.
38
 *
39
 * Revision 1.4  1998/01/11  18:45:10  pwe
40
 * consistent new/old diags
41
 *
42
 * Revision 1.3  1997/12/04  19:36:45  pwe
43
 * ANDF-DE V1.9
44
 *
45
 * Revision 1.2  1997/08/23  13:27:17  pwe
46
 * initial ANDF-DE
47
 *
48
 * Revision 1.1  1995/04/06  10:42:55  currie
49
 * Initial revision
50
 *
51
***********************************************************************/
52
#ifndef diagtypes_key
53
#define diagtypes_key 1
54
 
55
 
56
#ifdef NEWDIAGS
57
 
58
typedef dg_name diag_descriptor;
59
typedef dg_name_list diag_descriptor_list;
60
typedef dg_name_list diag_unit;
61
typedef dg_tag diag_tag;
62
typedef dgtag_struct diag_tagdef;
63
typedef int diag_tagdef_list;
64
typedef dg_type diag_type;
65
typedef dg_type_list diag_type_list;
66
typedef dg_enum enum_values;
67
typedef dg_enum_list enum_values_list;
68
typedef dg_classmem diag_field;
69
typedef dg_classmem_list diag_field_list;
70
typedef int diag_tq;
71
typedef dg_filename filename;
72
typedef dg_sourcepos sourcemark;
73
typedef int diag_type_unit;
74
 
75
 
76
#else
77
 
78
				/* temp hacsk to check syntax */
79
 
80
				/* end hacks */
81
				/* dummy defs of lists */
82
 
83
				/* end dummy defs */
84
				/* forward defns for compiler pacification */
85
 
86
#include "diagtypes1.h"
87
 
88
 
89
				/* end forward defns */
90
 
91
struct filename_t 
92
{
93
  nat		date;
94
  tdfstring	machine;
95
  tdfstring	file;
96
};
97
 
98
typedef	struct sourcemark_t
99
{
100
  filename	file;
101
  nat		line_no;
102
  nat		char_off;
103
} sourcemark;
104
 
105
struct enum_values_t
106
{
107
  exp		val;
108
  tdfstring	nme;
109
};
110
 
111
typedef struct enum_values_t *	enum_values;
112
 
113
struct enum_values_list_t 
114
{
115
  int		len;
116
  int		lastused;
117
  enum_values *		array;
118
};
119
 
120
typedef struct enum_values_list_t *	enum_values_list;
121
 
122
struct diag_field_t
123
{
124
  tdfstring	field_name;
125
  exp		where;
126
  diag_type	field_type;
127
};
128
 
129
typedef struct diag_field_t *diag_field;
130
 
131
struct diag_field_list_t 
132
{
133
  int		len;
134
  int		lastused;
135
  diag_field *	array;
136
};
137
 
138
typedef struct diag_field_list_t *	diag_field_list;
139
 
140
struct diag_type_list_t
141
{
142
  int		len;
143
  int		lastused;
144
  diag_type 		*array;
145
};
146
 
147
typedef struct diag_type_list_t *diag_type_list;
148
 
149
typedef struct 
150
{	 	
151
  unsigned	is_const:1;
152
  unsigned	is_volatile:1;
153
} diag_tq;
154
 
155
 
156
typedef tdfint diag_tag;
157
 
158
struct diag_tagdef_t
159
{
160
  diag_tag	d_tag;
161
  char        *	ext_name;
162
  diag_type	d_type;
163
};
164
 
165
typedef struct diag_tagdef_t diag_tagdef;
166
 
167
typedef enum 
168
{
169
  DIAG_TYPE_UNINIT,
170
  DIAG_TYPE_ARRAY,
171
  DIAG_TYPE_BITFIELD,
172
  DIAG_TYPE_ENUM,
173
  DIAG_TYPE_FLOAT,
174
  DIAG_TYPE_LOC,
175
  DIAG_TYPE_PROC,
176
  DIAG_TYPE_PTR,
177
  DIAG_TYPE_STRUCT,
178
  DIAG_TYPE_NULL,
179
  DIAG_TYPE_UNION,
180
  DIAG_TYPE_VARIETY,
181
  DIAG_TYPE_INITED
182
} diag_type_key;
183
 
184
struct diag_type_t 
185
{
186
  diag_type_key	key;
187
  OUTPUT_REC been_outed;
188
  union
189
  {
190
    struct
191
    {
192
      diag_type		element_type;
193
      exp		stride;
194
      exp		lower_b;
195
      exp		upper_b;
196
      diag_type		index_type;
197
    } array;
198
    struct
199
    {
200
      diag_type		result_type;
201
      nat		no_of_bits;
202
    } bitfield;
203
    struct
204
    {
205
      diag_type		base_type;
206
      tdfstring		nme;
207
      enum_values_list	values;
208
    } t_enum;
209
    floating_variety	f_var;
210
    struct
211
    {
212
      diag_type		object;
213
      diag_tq		qualifier;
214
    } loc;
215
    struct
216
    {
217
      diag_type_list	params;
218
      bool 		opt_args;
219
      diag_type		result_type;
220
    } proc;
221
    struct
222
    {
223
      diag_type		object;
224
      diag_tq		qualifier;
225
    } ptr;
226
    struct
227
    {
228
      shape		tdf_shape;
229
      tdfstring		nme;
230
      diag_field_list fields;
231
    } t_struct;
232
    struct
233
    {
234
      shape		tdf_shape;
235
      tdfstring		nme;
236
      diag_field_list fields;
237
    } t_union;
238
    variety		var;
239
  } data;
240
};
241
 
242
typedef enum 
243
{
244
  DIAG_UNINIT,
245
  DIAG_ID_KEY,
246
  DIAG_STRUCT_KEY,
247
  DIAG_TYPEDEF_KEY
248
} diag_desc_key;
249
 
250
typedef struct diagdef_t
251
{
252
  diag_desc_key 	key;
253
  char * 		ext_name;
254
  union	
255
  {
256
    struct 
257
    {
258
      tdfstring 	nme;
259
      diag_type 	new_type;
260
      sourcemark 	whence;
261
      exp		access;
262
    } id;
263
    struct
264
    {
265
      tdfstring 	nme;
266
      diag_type		new_type;
267
      sourcemark 	whence;
268
    } struc;
269
    struct
270
    {
271
      tdfstring		nme;
272
      diag_type		new_type;
273
      sourcemark 	whence;
274
    } typ;
275
  } data;
276
} diagdef;
277
				/* diag_descriptor is in diagtypes1.h */
278
 
279
typedef struct diag_unit_t
280
{
281
  int		len;
282
  int		lastused;
283
  diag_descriptor *	array;
284
} diag_unit;
285
 
286
typedef diag_unit diag_descriptor_list;
287
 
288
typedef int diag_type_unit;
289
typedef diag_type_unit diag_tagdef_list;
290
 
291
#include "diaginfo.h"
292
 
293
#endif
294
#endif
295