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 |
AUTOMATICALLY GENERATED FROM ALGEBRA tdf (VERSION 1.0)
|
|
|
32 |
BY calculus (VERSION 1.2)
|
|
|
33 |
*/
|
|
|
34 |
|
|
|
35 |
#ifndef CMD_OPS_H_INCLUDED
|
|
|
36 |
#define CMD_OPS_H_INCLUDED
|
|
|
37 |
|
|
|
38 |
/* Operations for union COMMAND */
|
|
|
39 |
|
|
|
40 |
#define TAG_cmd( P ) ( CHECK_NULL ( P )->ag_tag )
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
/* Operations for component line of union COMMAND */
|
|
|
44 |
|
|
|
45 |
#define cmd_line( P ) ( CHECK_NULL ( P ) + 1 )
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
/* Operations for field simple of union COMMAND */
|
|
|
49 |
|
|
|
50 |
#define cmd_simple_tag ( ( unsigned ) 0 )
|
|
|
51 |
#define IS_cmd_simple( P ) ( CHECK_NULL ( P )->ag_tag == 0 )
|
|
|
52 |
|
|
|
53 |
#define cmd_simple_text( P ) ( CHECK_TAG ( ( P ), 0 ) + 2 )
|
|
|
54 |
|
|
|
55 |
#define MAKE_cmd_simple( line_, text_, tdf_cmd )\
|
|
|
56 |
{\
|
|
|
57 |
tdf *x102_ = GEN_tdf ( 3, TYPEID_cmd ) ;\
|
|
|
58 |
x102_->ag_tag = 0 ;\
|
|
|
59 |
COPY_int ( x102_ + 1, ( line_ ) ) ;\
|
|
|
60 |
COPY_string ( x102_ + 2, ( text_ ) ) ;\
|
|
|
61 |
( tdf_cmd ) = x102_ ;\
|
|
|
62 |
}
|
|
|
63 |
|
|
|
64 |
#define DECONS_cmd_simple( line_, text_, tdf_cmd )\
|
|
|
65 |
{\
|
|
|
66 |
tdf *x103_ = CHECK_TAG ( ( tdf_cmd ), 0 ) ;\
|
|
|
67 |
( line_ ) = DEREF_int ( x103_ + 1 ) ;\
|
|
|
68 |
( text_ ) = DEREF_string ( x103_ + 2 ) ;\
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
#define DESTROY_cmd_simple( destroyer_, line_, text_, tdf_cmd )\
|
|
|
72 |
{\
|
|
|
73 |
tdf *x104_ = CHECK_TAG ( ( tdf_cmd ), 0 ) ;\
|
|
|
74 |
( line_ ) = DEREF_int ( x104_ + 1 ) ;\
|
|
|
75 |
( text_ ) = DEREF_string ( x104_ + 2 ) ;\
|
|
|
76 |
( destroyer_ ) ( x104_, ( unsigned ) 3 ) ;\
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
/* Operations for field compound of union COMMAND */
|
|
|
81 |
|
|
|
82 |
#define cmd_compound_tag ( ( unsigned ) 1 )
|
|
|
83 |
#define IS_cmd_compound( P ) ( CHECK_NULL ( P )->ag_tag == 1 )
|
|
|
84 |
|
|
|
85 |
#define cmd_compound_seq( P ) ( CHECK_TAG ( ( P ), 1 ) + 2 )
|
|
|
86 |
|
|
|
87 |
#define MAKE_cmd_compound( line_, seq_, tdf_cmd )\
|
|
|
88 |
{\
|
|
|
89 |
tdf *x105_ = GEN_tdf ( 3, TYPEID_cmd ) ;\
|
|
|
90 |
x105_->ag_tag = 1 ;\
|
|
|
91 |
COPY_int ( x105_ + 1, ( line_ ) ) ;\
|
|
|
92 |
COPY_list ( x105_ + 2, ( seq_ ) ) ;\
|
|
|
93 |
( tdf_cmd ) = x105_ ;\
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
#define DECONS_cmd_compound( line_, seq_, tdf_cmd )\
|
|
|
97 |
{\
|
|
|
98 |
tdf *x106_ = CHECK_TAG ( ( tdf_cmd ), 1 ) ;\
|
|
|
99 |
( line_ ) = DEREF_int ( x106_ + 1 ) ;\
|
|
|
100 |
( seq_ ) = DEREF_list ( x106_ + 2 ) ;\
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
#define DESTROY_cmd_compound( destroyer_, line_, seq_, tdf_cmd )\
|
|
|
104 |
{\
|
|
|
105 |
tdf *x107_ = CHECK_TAG ( ( tdf_cmd ), 1 ) ;\
|
|
|
106 |
( line_ ) = DEREF_int ( x107_ + 1 ) ;\
|
|
|
107 |
( seq_ ) = DEREF_list ( x107_ + 2 ) ;\
|
|
|
108 |
( destroyer_ ) ( x107_, ( unsigned ) 3 ) ;\
|
|
|
109 |
}
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
/* Operations for field loop of union COMMAND */
|
|
|
113 |
|
|
|
114 |
#define cmd_loop_tag ( ( unsigned ) 2 )
|
|
|
115 |
#define IS_cmd_loop( P ) ( CHECK_NULL ( P )->ag_tag == 2 )
|
|
|
116 |
|
|
|
117 |
#define cmd_loop_control( P ) ( CHECK_TAG ( ( P ), 2 ) + 2 )
|
|
|
118 |
#define cmd_loop_body( P ) ( CHECK_TAG ( ( P ), 2 ) + 3 )
|
|
|
119 |
|
|
|
120 |
#define MAKE_cmd_loop( line_, control_, body_, tdf_cmd )\
|
|
|
121 |
{\
|
|
|
122 |
tdf *x108_ = GEN_tdf ( 4, TYPEID_cmd ) ;\
|
|
|
123 |
x108_->ag_tag = 2 ;\
|
|
|
124 |
COPY_int ( x108_ + 1, ( line_ ) ) ;\
|
|
|
125 |
COPY_string ( x108_ + 2, ( control_ ) ) ;\
|
|
|
126 |
COPY_cmd ( x108_ + 3, ( body_ ) ) ;\
|
|
|
127 |
( tdf_cmd ) = x108_ ;\
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
#define DECONS_cmd_loop( line_, control_, body_, tdf_cmd )\
|
|
|
131 |
{\
|
|
|
132 |
tdf *x109_ = CHECK_TAG ( ( tdf_cmd ), 2 ) ;\
|
|
|
133 |
( line_ ) = DEREF_int ( x109_ + 1 ) ;\
|
|
|
134 |
( control_ ) = DEREF_string ( x109_ + 2 ) ;\
|
|
|
135 |
( body_ ) = DEREF_cmd ( x109_ + 3 ) ;\
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
#define DESTROY_cmd_loop( destroyer_, line_, control_, body_, tdf_cmd )\
|
|
|
139 |
{\
|
|
|
140 |
tdf *x110_ = CHECK_TAG ( ( tdf_cmd ), 2 ) ;\
|
|
|
141 |
( line_ ) = DEREF_int ( x110_ + 1 ) ;\
|
|
|
142 |
( control_ ) = DEREF_string ( x110_ + 2 ) ;\
|
|
|
143 |
( body_ ) = DEREF_cmd ( x110_ + 3 ) ;\
|
|
|
144 |
( destroyer_ ) ( x110_, ( unsigned ) 4 ) ;\
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
/* Operations for field cond of union COMMAND */
|
|
|
149 |
|
|
|
150 |
#define cmd_cond_tag ( ( unsigned ) 3 )
|
|
|
151 |
#define IS_cmd_cond( P ) ( CHECK_NULL ( P )->ag_tag == 3 )
|
|
|
152 |
|
|
|
153 |
#define cmd_cond_control( P ) ( CHECK_TAG ( ( P ), 3 ) + 2 )
|
|
|
154 |
#define cmd_cond_true_code( P ) ( CHECK_TAG ( ( P ), 3 ) + 3 )
|
|
|
155 |
#define cmd_cond_false_code( P ) ( CHECK_TAG ( ( P ), 3 ) + 4 )
|
|
|
156 |
|
|
|
157 |
#define MAKE_cmd_cond( line_, control_, true_code_, false_code_, tdf_cmd )\
|
|
|
158 |
{\
|
|
|
159 |
tdf *x111_ = GEN_tdf ( 5, TYPEID_cmd ) ;\
|
|
|
160 |
x111_->ag_tag = 3 ;\
|
|
|
161 |
COPY_int ( x111_ + 1, ( line_ ) ) ;\
|
|
|
162 |
COPY_string ( x111_ + 2, ( control_ ) ) ;\
|
|
|
163 |
COPY_cmd ( x111_ + 3, ( true_code_ ) ) ;\
|
|
|
164 |
COPY_cmd ( x111_ + 4, ( false_code_ ) ) ;\
|
|
|
165 |
( tdf_cmd ) = x111_ ;\
|
|
|
166 |
}
|
|
|
167 |
|
|
|
168 |
#define DECONS_cmd_cond( line_, control_, true_code_, false_code_, tdf_cmd )\
|
|
|
169 |
{\
|
|
|
170 |
tdf *x112_ = CHECK_TAG ( ( tdf_cmd ), 3 ) ;\
|
|
|
171 |
( line_ ) = DEREF_int ( x112_ + 1 ) ;\
|
|
|
172 |
( control_ ) = DEREF_string ( x112_ + 2 ) ;\
|
|
|
173 |
( true_code_ ) = DEREF_cmd ( x112_ + 3 ) ;\
|
|
|
174 |
( false_code_ ) = DEREF_cmd ( x112_ + 4 ) ;\
|
|
|
175 |
}
|
|
|
176 |
|
|
|
177 |
#define DESTROY_cmd_cond( destroyer_, line_, control_, true_code_, false_code_, tdf_cmd )\
|
|
|
178 |
{\
|
|
|
179 |
tdf *x113_ = CHECK_TAG ( ( tdf_cmd ), 3 ) ;\
|
|
|
180 |
( line_ ) = DEREF_int ( x113_ + 1 ) ;\
|
|
|
181 |
( control_ ) = DEREF_string ( x113_ + 2 ) ;\
|
|
|
182 |
( true_code_ ) = DEREF_cmd ( x113_ + 3 ) ;\
|
|
|
183 |
( false_code_ ) = DEREF_cmd ( x113_ + 4 ) ;\
|
|
|
184 |
( destroyer_ ) ( x113_, ( unsigned ) 5 ) ;\
|
|
|
185 |
}
|
|
|
186 |
|
|
|
187 |
|
|
|
188 |
/* Operations for field use of union COMMAND */
|
|
|
189 |
|
|
|
190 |
#define cmd_use_tag ( ( unsigned ) 4 )
|
|
|
191 |
#define IS_cmd_use( P ) ( CHECK_NULL ( P )->ag_tag == 4 )
|
|
|
192 |
|
|
|
193 |
#define cmd_use_sort( P ) ( CHECK_TAG ( ( P ), 4 ) + 2 )
|
|
|
194 |
#define cmd_use_cons( P ) ( CHECK_TAG ( ( P ), 4 ) + 3 )
|
|
|
195 |
|
|
|
196 |
#define MAKE_cmd_use( line_, sort_, cons_, tdf_cmd )\
|
|
|
197 |
{\
|
|
|
198 |
tdf *x114_ = GEN_tdf ( 4, TYPEID_cmd ) ;\
|
|
|
199 |
x114_->ag_tag = 4 ;\
|
|
|
200 |
COPY_int ( x114_ + 1, ( line_ ) ) ;\
|
|
|
201 |
COPY_string ( x114_ + 2, ( sort_ ) ) ;\
|
|
|
202 |
COPY_string ( x114_ + 3, ( cons_ ) ) ;\
|
|
|
203 |
( tdf_cmd ) = x114_ ;\
|
|
|
204 |
}
|
|
|
205 |
|
|
|
206 |
#define DECONS_cmd_use( line_, sort_, cons_, tdf_cmd )\
|
|
|
207 |
{\
|
|
|
208 |
tdf *x115_ = CHECK_TAG ( ( tdf_cmd ), 4 ) ;\
|
|
|
209 |
( line_ ) = DEREF_int ( x115_ + 1 ) ;\
|
|
|
210 |
( sort_ ) = DEREF_string ( x115_ + 2 ) ;\
|
|
|
211 |
( cons_ ) = DEREF_string ( x115_ + 3 ) ;\
|
|
|
212 |
}
|
|
|
213 |
|
|
|
214 |
#define DESTROY_cmd_use( destroyer_, line_, sort_, cons_, tdf_cmd )\
|
|
|
215 |
{\
|
|
|
216 |
tdf *x116_ = CHECK_TAG ( ( tdf_cmd ), 4 ) ;\
|
|
|
217 |
( line_ ) = DEREF_int ( x116_ + 1 ) ;\
|
|
|
218 |
( sort_ ) = DEREF_string ( x116_ + 2 ) ;\
|
|
|
219 |
( cons_ ) = DEREF_string ( x116_ + 3 ) ;\
|
|
|
220 |
( destroyer_ ) ( x116_, ( unsigned ) 4 ) ;\
|
|
|
221 |
}
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
/* Operations for field special of union COMMAND */
|
|
|
225 |
|
|
|
226 |
#define cmd_special_tag ( ( unsigned ) 5 )
|
|
|
227 |
#define IS_cmd_special( P ) ( CHECK_NULL ( P )->ag_tag == 5 )
|
|
|
228 |
|
|
|
229 |
#define cmd_special_sort( P ) ( CHECK_TAG ( ( P ), 5 ) + 2 )
|
|
|
230 |
#define cmd_special_cons( P ) ( CHECK_TAG ( ( P ), 5 ) + 3 )
|
|
|
231 |
|
|
|
232 |
#define MAKE_cmd_special( line_, sort_, cons_, tdf_cmd )\
|
|
|
233 |
{\
|
|
|
234 |
tdf *x117_ = GEN_tdf ( 4, TYPEID_cmd ) ;\
|
|
|
235 |
x117_->ag_tag = 5 ;\
|
|
|
236 |
COPY_int ( x117_ + 1, ( line_ ) ) ;\
|
|
|
237 |
COPY_string ( x117_ + 2, ( sort_ ) ) ;\
|
|
|
238 |
COPY_string ( x117_ + 3, ( cons_ ) ) ;\
|
|
|
239 |
( tdf_cmd ) = x117_ ;\
|
|
|
240 |
}
|
|
|
241 |
|
|
|
242 |
#define DECONS_cmd_special( line_, sort_, cons_, tdf_cmd )\
|
|
|
243 |
{\
|
|
|
244 |
tdf *x118_ = CHECK_TAG ( ( tdf_cmd ), 5 ) ;\
|
|
|
245 |
( line_ ) = DEREF_int ( x118_ + 1 ) ;\
|
|
|
246 |
( sort_ ) = DEREF_string ( x118_ + 2 ) ;\
|
|
|
247 |
( cons_ ) = DEREF_string ( x118_ + 3 ) ;\
|
|
|
248 |
}
|
|
|
249 |
|
|
|
250 |
#define DESTROY_cmd_special( destroyer_, line_, sort_, cons_, tdf_cmd )\
|
|
|
251 |
{\
|
|
|
252 |
tdf *x119_ = CHECK_TAG ( ( tdf_cmd ), 5 ) ;\
|
|
|
253 |
( line_ ) = DEREF_int ( x119_ + 1 ) ;\
|
|
|
254 |
( sort_ ) = DEREF_string ( x119_ + 2 ) ;\
|
|
|
255 |
( cons_ ) = DEREF_string ( x119_ + 3 ) ;\
|
|
|
256 |
( destroyer_ ) ( x119_, ( unsigned ) 4 ) ;\
|
|
|
257 |
}
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
#endif
|