Subversion Repositories tendra.SVN

Rev

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
6 7u83 3
 
2 7u83 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:-
6 7u83 12
 
2 7u83 13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
6 7u83 15
 
2 7u83 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;
6 7u83 19
 
2 7u83 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;
6 7u83 23
 
2 7u83 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 errors (VERSION 1.0)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef ERRORS_H_INCLUDED
36
#define ERRORS_H_INCLUDED
37
 
38
#ifndef errors_NAME
39
#define errors_NAME			"errors"
40
#define errors_VERSION			"1.0"
41
#define errors_SPECIFICATION		0
42
#define errors_IMPLEMENTATION		1
43
#endif
44
 
45
 
46
/* Prototype macros */
47
 
48
#ifndef CONST_S
49
#define CONST_S
50
#endif
51
 
52
 
53
/* Primitive types */
54
 
6 7u83 55
typedef char * string;
2 7u83 56
 
57
 
58
/* Basic types */
59
 
60
typedef union errors_tag {
6 7u83 61
    unsigned ag_tag;
62
    union errors_tag *ag_ptr;
63
    unsigned ag_enum;
64
    unsigned long ag_long_enum;
65
    int ag_prim_int;
66
    string ag_prim_string;
67
} errors;
2 7u83 68
 
6 7u83 69
typedef errors *errors_PTR;
2 7u83 70
 
71
#ifndef errors_DESTR_DEFINED
72
#define errors_DESTR_DEFINED
6 7u83 73
typedef void (*DESTROYER)(errors *, unsigned);
2 7u83 74
#endif
75
 
6 7u83 76
#define PTR(A)	errors_PTR
77
#define LIST(A)	errors_PTR
78
#define STACK(A)	errors_PTR
79
#define SIZE(A)	int
2 7u83 80
 
81
 
82
/* Assertion macros */
83
 
84
#ifdef ASSERTS
6 7u83 85
extern errors *check_null_errors(errors *, char *, int);
86
extern errors *check_tag_errors(errors *, unsigned, char *, int);
87
extern errors *check_tag_etc_errors(errors *, unsigned, unsigned, char *, int);
88
#define CHECK_NULL(P)\
89
    (check_null_errors((P), __FILE__, __LINE__))
90
#define CHECK_TAG(P, N)\
91
    (check_tag_errors((P), (unsigned)(N), __FILE__, __LINE__))
92
#define CHECK_TAG_ETC(P, L, U)\
93
    (check_tag_etc_errors((P), (unsigned)(L), (unsigned)(U), __FILE__, __LINE__))
2 7u83 94
#else
6 7u83 95
#define CHECK_NULL(P)			(P)
96
#define CHECK_TAG(P, N)			(P)
97
#define CHECK_TAG_ETC(P, L, U)		(P)
2 7u83 98
#endif
99
 
100
 
101
/* Enumeration definitions */
102
 
103
 
104
 
105
/* Union type definitions */
106
 
6 7u83 107
typedef errors *NAME;
108
typedef errors *MESSAGE;
109
typedef errors *MAP;
110
typedef errors *PARAM;
111
typedef errors *ENTRY;
2 7u83 112
 
113
 
114
/* Structure declarations */
115
 
116
 
117
 
118
/* Identity type definitions */
119
 
6 7u83 120
typedef NAME KEY;
121
typedef NAME PROPERTY;
122
typedef NAME TYPE;
123
typedef NAME USAGE;
2 7u83 124
 
125
 
126
/* Structure definitions */
127
 
128
#ifndef errors_STRUCT_DEFINED
129
#define errors_STRUCT_DEFINED
130
 
131
#endif /* errors_STRUCT_DEFINED */
132
 
133
 
134
/* Function declarations */
135
 
6 7u83 136
extern errors *gen_errors(unsigned);
137
extern void destroy_errors(errors *, unsigned);
138
extern void dummy_destroy_errors (errors *, unsigned);
139
extern void destroy_errors_list (errors *, unsigned);
140
extern errors *append_errors_list(errors *, errors *);
141
extern errors *end_errors_list(errors *);
142
extern unsigned length_errors_list(errors *);
143
extern errors *reverse_errors_list(errors *);
2 7u83 144
#ifdef errors_IO_ROUTINES
6 7u83 145
extern unsigned crt_errors_alias;
146
extern void set_errors_alias(errors *, unsigned);
147
extern errors *find_errors_alias(unsigned);
148
extern void clear_errors_alias(void);
2 7u83 149
#endif
150
 
151
 
152
/* Run-time type information */
153
 
154
#ifndef GEN_errors
6 7u83 155
#define GEN_errors(A, B)		gen_errors((unsigned)(A))
2 7u83 156
#endif
6 7u83 157
#define TYPEID_ptr			((unsigned)0)
158
#define TYPEID_list			((unsigned)1)
159
#define TYPEID_stack			((unsigned)2)
160
#define TYPEID_name			((unsigned)3)
161
#define TYPEID_msg			((unsigned)4)
162
#define TYPEID_map			((unsigned)5)
163
#define TYPEID_param			((unsigned)6)
164
#define TYPEID_entry			((unsigned)7)
2 7u83 165
 
166
 
167
/* Definitions for pointers */
168
 
6 7u83 169
#define STEP_ptr(A, B)			(CHECK_NULL(A) + B)
170
#define SIZE_ptr(A)			1
171
#define NULL_ptr(A)			((errors *)0)
172
#define IS_NULL_ptr(A)			((A) == 0)
173
#define EQ_ptr(A, B)			((A) == (B))
174
#define MAKE_ptr(A)			GEN_errors((A), TYPEID_ptr)
175
#define DESTROY_ptr(A, B)		destroy_errors((A), (unsigned)(B))
176
#define UNIQ_ptr(A)			GEN_errors(1, TYPEID_ptr)
177
#define DESTROY_UNIQ_ptr(A)		destroy_errors((A), (unsigned)1)
2 7u83 178
#ifdef errors_IO_ROUTINES
6 7u83 179
#define VOIDSTAR_ptr(A)			((void *)(A))
2 7u83 180
#endif
181
 
6 7u83 182
#define COPY_ptr(A, B)			(CHECK_NULL(A)->ag_ptr = (B))
183
#define DEREF_ptr(A)			(CHECK_NULL(A)->ag_ptr)
184
#define CONS_ptr(A, B, C)\
2 7u83 185
    {\
6 7u83 186
	errors *x0_ = GEN_errors(2, TYPEID_list);\
187
	x0_[1].ag_ptr = (A);\
188
	x0_->ag_ptr = (B);\
189
	(C) = x0_;\
2 7u83 190
    }
191
 
6 7u83 192
#define UN_CONS_ptr(A, B, C)\
2 7u83 193
    {\
6 7u83 194
	errors *x1_ = CHECK_NULL(C);\
195
	(A) = x1_[1].ag_ptr;\
196
	(B) = x1_->ag_ptr;\
2 7u83 197
    }
198
 
6 7u83 199
#define DESTROY_CONS_ptr(D, A, B, C)\
2 7u83 200
    {\
6 7u83 201
	errors *x2_ = CHECK_NULL(C);\
202
	(A) = x2_[1].ag_ptr;\
203
	(B) = x2_->ag_ptr;\
204
	(D)(x2_, (unsigned)2);\
2 7u83 205
    }
206
 
6 7u83 207
#define PUSH_ptr(A, B)\
2 7u83 208
    {\
6 7u83 209
	errors **r3_ = &(B);\
210
	errors *x3_ = GEN_errors(2, TYPEID_stack);\
211
	x3_[1].ag_ptr = (A);\
212
	x3_->ag_ptr = *r3_;\
213
	*r3_ = x3_;\
2 7u83 214
    }
215
 
6 7u83 216
#define POP_ptr(A, B)\
2 7u83 217
    {\
6 7u83 218
	errors **r4_ = &(B);\
219
	errors *x4_ = CHECK_NULL(*r4_);\
220
	(A) = x4_[1].ag_ptr;\
221
	*r4_ = x4_->ag_ptr;\
222
	destroy_errors(x4_, (unsigned)2);\
2 7u83 223
    }
224
 
225
 
226
/* Definitions for lists */
227
 
6 7u83 228
#define HEAD_list(A)			(CHECK_NULL(A) + 1)
229
#define PTR_TAIL_list(A)		(CHECK_NULL(A))
230
#define TAIL_list(A)			(CHECK_NULL(A)->ag_ptr)
231
#define LENGTH_list(A)			length_errors_list((A))
232
#define END_list(A)			end_errors_list((A))
233
#define REVERSE_list(A)			reverse_errors_list((A))
234
#define APPEND_list(A, B)		append_errors_list((A), (B))
2 7u83 235
 
6 7u83 236
#define SIZE_list(A)			1
237
#define NULL_list(A)			((errors *) 0)
238
#define IS_NULL_list(A)			((A) == 0)
239
#define EQ_list(A, B)			((A) == (B))
240
#define UNIQ_list(A)			GEN_errors(1, TYPEID_list)
241
#define DESTROY_UNIQ_list(A)		destroy_errors((A), (unsigned)1)
2 7u83 242
#ifdef errors_IO_ROUTINES
6 7u83 243
#define VOIDSTAR_list(A)		((void *)(A))
2 7u83 244
#endif
245
 
6 7u83 246
#define DESTROY_list(A, B)\
2 7u83 247
    {\
6 7u83 248
	destroy_errors_list((A), (unsigned)(B));\
2 7u83 249
    }
250
 
6 7u83 251
#define COPY_list(A, B)			(CHECK_NULL(A)->ag_ptr = (B))
252
#define DEREF_list(A)			(CHECK_NULL(A)->ag_ptr)
253
#define CONS_list(A, B, C)\
2 7u83 254
    {\
6 7u83 255
	errors *x5_ = GEN_errors(2, TYPEID_list);\
256
	x5_[1].ag_ptr = (A);\
257
	x5_->ag_ptr = (B);\
258
	(C) = x5_;\
2 7u83 259
    }
260
 
6 7u83 261
#define UN_CONS_list(A, B, C)\
2 7u83 262
    {\
6 7u83 263
	errors *x6_ = CHECK_NULL(C);\
264
	(A) = x6_[1].ag_ptr;\
265
	(B) = x6_->ag_ptr;\
2 7u83 266
    }
267
 
6 7u83 268
#define DESTROY_CONS_list(D, A, B, C)\
2 7u83 269
    {\
6 7u83 270
	errors *x7_ = CHECK_NULL(C);\
271
	(A) = x7_[1].ag_ptr;\
272
	(B) = x7_->ag_ptr;\
273
	(D)(x7_, (unsigned)2);\
2 7u83 274
    }
275
 
6 7u83 276
#define PUSH_list(A, B)\
2 7u83 277
    {\
6 7u83 278
	errors **r8_ = &(B);\
279
	errors *x8_ = GEN_errors(2, TYPEID_stack);\
280
	x8_[1].ag_ptr = (A);\
281
	x8_->ag_ptr = *r8_;\
282
	*r8_ = x8_;\
2 7u83 283
    }
284
 
6 7u83 285
#define POP_list(A, B)\
2 7u83 286
    {\
6 7u83 287
	errors **r9_ = &(B);\
288
	errors *x9_ = CHECK_NULL(*r9_);\
289
	(A) = x9_[1].ag_ptr;\
290
	*r9_ = x9_->ag_ptr;\
291
	destroy_errors(x9_, (unsigned)2);\
2 7u83 292
    }
293
 
294
 
295
/* Definitions for stacks */
296
 
6 7u83 297
#define SIZE_stack(A)			1
298
#define NULL_stack(A)			((errors *) 0)
299
#define IS_NULL_stack(A)		((A) == 0)
300
#define STACK_list(A)			(A)
301
#define LIST_stack(A)			(A)
2 7u83 302
 
6 7u83 303
#define COPY_stack(A, B)		(CHECK_NULL(A)->ag_ptr = (B))
304
#define DEREF_stack(A)			(CHECK_NULL(A)->ag_ptr)
305
#define CONS_stack(A, B, C)\
2 7u83 306
    {\
6 7u83 307
	errors *x10_ = GEN_errors(2, TYPEID_list);\
308
	x10_[1].ag_ptr = (A);\
309
	x10_->ag_ptr = (B);\
310
	(C) = x10_;\
2 7u83 311
    }
312
 
6 7u83 313
#define UN_CONS_stack(A, B, C)\
2 7u83 314
    {\
6 7u83 315
	errors *x11_ = CHECK_NULL(C);\
316
	(A) = x11_[1].ag_ptr;\
317
	(B) = x11_->ag_ptr;\
2 7u83 318
    }
319
 
6 7u83 320
#define DESTROY_CONS_stack(D, A, B, C)\
2 7u83 321
    {\
6 7u83 322
	errors *x12_ = CHECK_NULL(C);\
323
	(A) = x12_[1].ag_ptr;\
324
	(B) = x12_->ag_ptr;\
325
	(D)(x12_, (unsigned)2);\
2 7u83 326
    }
327
 
6 7u83 328
#define PUSH_stack(A, B)\
2 7u83 329
    {\
6 7u83 330
	errors **r13_ = &(B);\
331
	errors *x13_ = GEN_errors(2, TYPEID_stack);\
332
	x13_[1].ag_ptr = (A);\
333
	x13_->ag_ptr = *r13_;\
334
	*r13_ = x13_;\
2 7u83 335
    }
336
 
6 7u83 337
#define POP_stack(A, B)\
2 7u83 338
    {\
6 7u83 339
	errors **r14_ = &(B);\
340
	errors *x14_ = CHECK_NULL(*r14_);\
341
	(A) = x14_[1].ag_ptr;\
342
	*r14_ = x14_->ag_ptr;\
343
	destroy_errors(x14_, (unsigned)2);\
2 7u83 344
    }
345
 
346
 
347
/* Definitions for sizes */
348
 
6 7u83 349
#define SCALE(A, B)			((A)*(int)(B))
2 7u83 350
 
351
 
352
/* Definitions for primitive int */
353
 
354
#define SIZE_int			1
355
 
6 7u83 356
#define COPY_int(A, B)			(CHECK_NULL(A)->ag_prim_int = (B))
357
#define DEREF_int(A)			(CHECK_NULL(A)->ag_prim_int)
358
#define CONS_int(A, B, C)\
2 7u83 359
    {\
6 7u83 360
	errors *x15_ = GEN_errors(2, TYPEID_list);\
361
	COPY_int(x15_ + 1, (A));\
362
	x15_->ag_ptr = (B);\
363
	(C) = x15_;\
2 7u83 364
    }
365
 
6 7u83 366
#define UN_CONS_int(A, B, C)\
2 7u83 367
    {\
6 7u83 368
	errors *x16_ = CHECK_NULL(C);\
369
	(A) = DEREF_int(x16_ + 1);\
370
	(B) = x16_->ag_ptr;\
2 7u83 371
    }
372
 
6 7u83 373
#define DESTROY_CONS_int(D, A, B, C)\
2 7u83 374
    {\
6 7u83 375
	errors *x17_ = CHECK_NULL(C);\
376
	(A) = DEREF_int(x17_ + 1);\
377
	(B) = x17_->ag_ptr;\
378
	(D)(x17_, (unsigned)2);\
2 7u83 379
    }
380
 
6 7u83 381
#define PUSH_int(A, B)\
2 7u83 382
    {\
6 7u83 383
	errors **r18_ = &(B);\
384
	errors *x18_ = GEN_errors(2, TYPEID_stack);\
385
	COPY_int(x18_ + 1, (A));\
386
	x18_->ag_ptr = *r18_;\
387
	*r18_ = x18_;\
2 7u83 388
    }
389
 
6 7u83 390
#define POP_int(A, B)\
2 7u83 391
    {\
6 7u83 392
	errors **r19_ = &(B);\
393
	errors *x19_ = CHECK_NULL(*r19_);\
394
	(A) = DEREF_int(x19_ + 1);\
395
	*r19_ = x19_->ag_ptr;\
396
	destroy_errors(x19_, (unsigned)2);\
2 7u83 397
    }
398
 
399
 
400
/* Definitions for primitive string */
401
 
402
#define SIZE_string			1
403
 
6 7u83 404
#define COPY_string(A, B)		(CHECK_NULL(A)->ag_prim_string = (B))
405
#define DEREF_string(A)			(CHECK_NULL(A)->ag_prim_string)
406
#define CONS_string(A, B, C)\
2 7u83 407
    {\
6 7u83 408
	errors *x20_ = GEN_errors(2, TYPEID_list);\
409
	COPY_string(x20_ + 1, (A));\
410
	x20_->ag_ptr = (B);\
411
	(C) = x20_;\
2 7u83 412
    }
413
 
6 7u83 414
#define UN_CONS_string(A, B, C)\
2 7u83 415
    {\
6 7u83 416
	errors *x21_ = CHECK_NULL(C);\
417
	(A) = DEREF_string(x21_ + 1);\
418
	(B) = x21_->ag_ptr;\
2 7u83 419
    }
420
 
6 7u83 421
#define DESTROY_CONS_string(D, A, B, C)\
2 7u83 422
    {\
6 7u83 423
	errors *x22_ = CHECK_NULL(C);\
424
	(A) = DEREF_string(x22_ + 1);\
425
	(B) = x22_->ag_ptr;\
426
	(D)(x22_, (unsigned)2);\
2 7u83 427
    }
428
 
6 7u83 429
#define PUSH_string(A, B)\
2 7u83 430
    {\
6 7u83 431
	errors **r23_ = &(B);\
432
	errors *x23_ = GEN_errors(2, TYPEID_stack);\
433
	COPY_string(x23_ + 1, (A));\
434
	x23_->ag_ptr = *r23_;\
435
	*r23_ = x23_;\
2 7u83 436
    }
437
 
6 7u83 438
#define POP_string(A, B)\
2 7u83 439
    {\
6 7u83 440
	errors **r24_ = &(B);\
441
	errors *x24_ = CHECK_NULL(*r24_);\
442
	(A) = DEREF_string(x24_ + 1);\
443
	*r24_ = x24_->ag_ptr;\
444
	destroy_errors(x24_, (unsigned)2);\
2 7u83 445
    }
446
 
447
 
448
/* Definitions for union NAME */
449
 
6 7u83 450
#define ORDER_name			((unsigned) 1)
2 7u83 451
#define SIZE_name			1
6 7u83 452
#define NULL_name			((NAME) 0)
453
#define IS_NULL_name(A)			((A) == 0)
454
#define EQ_name(A, B)			((A) == (B))
2 7u83 455
 
6 7u83 456
#define COPY_name(A, B)			(CHECK_NULL(A)->ag_ptr = (B))
457
#define DEREF_name(A)			(CHECK_NULL(A)->ag_ptr)
2 7u83 458
 
6 7u83 459
#define CONS_name(A, B, C)\
2 7u83 460
    {\
6 7u83 461
	errors *x25_ = GEN_errors(2, TYPEID_list);\
462
	COPY_name(x25_ + 1, (A));\
463
	x25_->ag_ptr = (B);\
464
	(C) = x25_;\
2 7u83 465
    }
466
 
6 7u83 467
#define UN_CONS_name(A, B, C)\
2 7u83 468
    {\
6 7u83 469
	errors *x26_ = CHECK_NULL(C);\
470
	(A) = DEREF_name(x26_ + 1);\
471
	(B) = x26_->ag_ptr;\
2 7u83 472
    }
473
 
6 7u83 474
#define DESTROY_CONS_name(D, A, B, C)\
2 7u83 475
    {\
6 7u83 476
	errors *x27_ = CHECK_NULL(C);\
477
	(A) = DEREF_name(x27_ + 1);\
478
	(B) = x27_->ag_ptr;\
479
	(D)(x27_, (unsigned)2);\
2 7u83 480
    }
481
 
6 7u83 482
#define PUSH_name(A, B)\
2 7u83 483
    {\
6 7u83 484
	errors **r28_ = &(B);\
485
	errors *x28_ = GEN_errors(2, TYPEID_stack);\
486
	COPY_name(x28_ + 1, (A));\
487
	x28_->ag_ptr = *r28_;\
488
	*r28_ = x28_;\
2 7u83 489
    }
490
 
6 7u83 491
#define POP_name(A, B)\
2 7u83 492
    {\
6 7u83 493
	errors **r29_ = &(B);\
494
	errors *x29_ = CHECK_NULL(*r29_);\
495
	(A) = DEREF_name(x29_ + 1);\
496
	*r29_ = x29_->ag_ptr;\
497
	destroy_errors(x29_, (unsigned)2);\
2 7u83 498
    }
499
 
500
 
501
/* Definitions for union MESSAGE */
502
 
6 7u83 503
#define ORDER_msg			((unsigned) 2)
2 7u83 504
#define SIZE_msg			1
6 7u83 505
#define NULL_msg			((MESSAGE) 0)
506
#define IS_NULL_msg(A)			((A) == 0)
507
#define EQ_msg(A, B)			((A) == (B))
2 7u83 508
 
6 7u83 509
#define COPY_msg(A, B)			(CHECK_NULL(A)->ag_ptr = (B))
510
#define DEREF_msg(A)			(CHECK_NULL(A)->ag_ptr)
2 7u83 511
 
6 7u83 512
#define CONS_msg(A, B, C)\
2 7u83 513
    {\
6 7u83 514
	errors *x30_ = GEN_errors(2, TYPEID_list);\
515
	COPY_msg(x30_ + 1, (A));\
516
	x30_->ag_ptr = (B);\
517
	(C) = x30_;\
2 7u83 518
    }
519
 
6 7u83 520
#define UN_CONS_msg(A, B, C)\
2 7u83 521
    {\
6 7u83 522
	errors *x31_ = CHECK_NULL(C);\
523
	(A) = DEREF_msg(x31_ + 1);\
524
	(B) = x31_->ag_ptr;\
2 7u83 525
    }
526
 
6 7u83 527
#define DESTROY_CONS_msg(D, A, B, C)\
2 7u83 528
    {\
6 7u83 529
	errors *x32_ = CHECK_NULL(C);\
530
	(A) = DEREF_msg(x32_ + 1);\
531
	(B) = x32_->ag_ptr;\
532
	(D)(x32_, (unsigned)2);\
2 7u83 533
    }
534
 
6 7u83 535
#define PUSH_msg(A, B)\
2 7u83 536
    {\
6 7u83 537
	errors **r33_ = &(B);\
538
	errors *x33_ = GEN_errors(2, TYPEID_stack);\
539
	COPY_msg(x33_ + 1, (A));\
540
	x33_->ag_ptr = *r33_;\
541
	*r33_ = x33_;\
2 7u83 542
    }
543
 
6 7u83 544
#define POP_msg(A, B)\
2 7u83 545
    {\
6 7u83 546
	errors **r34_ = &(B);\
547
	errors *x34_ = CHECK_NULL(*r34_);\
548
	(A) = DEREF_msg(x34_ + 1);\
549
	*r34_ = x34_->ag_ptr;\
550
	destroy_errors(x34_, (unsigned)2);\
2 7u83 551
    }
552
 
553
 
554
/* Definitions for union MAP */
555
 
6 7u83 556
#define ORDER_map			((unsigned) 1)
2 7u83 557
#define SIZE_map			1
6 7u83 558
#define NULL_map			((MAP) 0)
559
#define IS_NULL_map(A)			((A) == 0)
560
#define EQ_map(A, B)			((A) == (B))
2 7u83 561
 
6 7u83 562
#define COPY_map(A, B)			(CHECK_NULL(A)->ag_ptr = (B))
563
#define DEREF_map(A)			(CHECK_NULL(A)->ag_ptr)
2 7u83 564
 
6 7u83 565
#define CONS_map(A, B, C)\
2 7u83 566
    {\
6 7u83 567
	errors *x35_ = GEN_errors(2, TYPEID_list);\
568
	COPY_map(x35_ + 1, (A));\
569
	x35_->ag_ptr = (B);\
570
	(C) = x35_;\
2 7u83 571
    }
572
 
6 7u83 573
#define UN_CONS_map(A, B, C)\
2 7u83 574
    {\
6 7u83 575
	errors *x36_ = CHECK_NULL(C);\
576
	(A) = DEREF_map(x36_ + 1);\
577
	(B) = x36_->ag_ptr;\
2 7u83 578
    }
579
 
6 7u83 580
#define DESTROY_CONS_map(D, A, B, C)\
2 7u83 581
    {\
6 7u83 582
	errors *x37_ = CHECK_NULL(C);\
583
	(A) = DEREF_map(x37_ + 1);\
584
	(B) = x37_->ag_ptr;\
585
	(D)(x37_, (unsigned)2);\
2 7u83 586
    }
587
 
6 7u83 588
#define PUSH_map(A, B)\
2 7u83 589
    {\
6 7u83 590
	errors **r38_ = &(B);\
591
	errors *x38_ = GEN_errors(2, TYPEID_stack);\
592
	COPY_map(x38_ + 1, (A));\
593
	x38_->ag_ptr = *r38_;\
594
	*r38_ = x38_;\
2 7u83 595
    }
596
 
6 7u83 597
#define POP_map(A, B)\
2 7u83 598
    {\
6 7u83 599
	errors **r39_ = &(B);\
600
	errors *x39_ = CHECK_NULL(*r39_);\
601
	(A) = DEREF_map(x39_ + 1);\
602
	*r39_ = x39_->ag_ptr;\
603
	destroy_errors(x39_, (unsigned)2);\
2 7u83 604
    }
605
 
606
 
607
/* Definitions for union PARAM */
608
 
6 7u83 609
#define ORDER_param			((unsigned) 1)
2 7u83 610
#define SIZE_param			1
6 7u83 611
#define NULL_param			((PARAM) 0)
612
#define IS_NULL_param(A)		((A) == 0)
613
#define EQ_param(A, B)			((A) == (B))
2 7u83 614
 
6 7u83 615
#define COPY_param(A, B)		(CHECK_NULL(A)->ag_ptr = (B))
616
#define DEREF_param(A)			(CHECK_NULL(A)->ag_ptr)
2 7u83 617
 
6 7u83 618
#define CONS_param(A, B, C)\
2 7u83 619
    {\
6 7u83 620
	errors *x40_ = GEN_errors(2, TYPEID_list);\
621
	COPY_param(x40_ + 1, (A));\
622
	x40_->ag_ptr = (B);\
623
	(C) = x40_;\
2 7u83 624
    }
625
 
6 7u83 626
#define UN_CONS_param(A, B, C)\
2 7u83 627
    {\
6 7u83 628
	errors *x41_ = CHECK_NULL(C);\
629
	(A) = DEREF_param(x41_ + 1);\
630
	(B) = x41_->ag_ptr;\
2 7u83 631
    }
632
 
6 7u83 633
#define DESTROY_CONS_param(D, A, B, C)\
2 7u83 634
    {\
6 7u83 635
	errors *x42_ = CHECK_NULL(C);\
636
	(A) = DEREF_param(x42_ + 1);\
637
	(B) = x42_->ag_ptr;\
638
	(D)(x42_, (unsigned)2);\
2 7u83 639
    }
640
 
6 7u83 641
#define PUSH_param(A, B)\
2 7u83 642
    {\
6 7u83 643
	errors **r43_ = &(B);\
644
	errors *x43_ = GEN_errors(2, TYPEID_stack);\
645
	COPY_param(x43_ + 1, (A));\
646
	x43_->ag_ptr = *r43_;\
647
	*r43_ = x43_;\
2 7u83 648
    }
649
 
6 7u83 650
#define POP_param(A, B)\
2 7u83 651
    {\
6 7u83 652
	errors **r44_ = &(B);\
653
	errors *x44_ = CHECK_NULL(*r44_);\
654
	(A) = DEREF_param(x44_ + 1);\
655
	*r44_ = x44_->ag_ptr;\
656
	destroy_errors(x44_, (unsigned)2);\
2 7u83 657
    }
658
 
659
 
660
/* Definitions for union ENTRY */
661
 
6 7u83 662
#define ORDER_entry			((unsigned) 1)
2 7u83 663
#define SIZE_entry			1
6 7u83 664
#define NULL_entry			((ENTRY) 0)
665
#define IS_NULL_entry(A)		((A) == 0)
666
#define EQ_entry(A, B)			((A) == (B))
2 7u83 667
 
6 7u83 668
#define COPY_entry(A, B)		(CHECK_NULL(A)->ag_ptr = (B))
669
#define DEREF_entry(A)			(CHECK_NULL(A)->ag_ptr)
2 7u83 670
 
6 7u83 671
#define CONS_entry(A, B, C)\
2 7u83 672
    {\
6 7u83 673
	errors *x45_ = GEN_errors(2, TYPEID_list);\
674
	COPY_entry(x45_ + 1, (A));\
675
	x45_->ag_ptr = (B);\
676
	(C) = x45_;\
2 7u83 677
    }
678
 
6 7u83 679
#define UN_CONS_entry(A, B, C)\
2 7u83 680
    {\
6 7u83 681
	errors *x46_ = CHECK_NULL(C);\
682
	(A) = DEREF_entry(x46_ + 1);\
683
	(B) = x46_->ag_ptr;\
2 7u83 684
    }
685
 
6 7u83 686
#define DESTROY_CONS_entry(D, A, B, C)\
2 7u83 687
    {\
6 7u83 688
	errors *x47_ = CHECK_NULL(C);\
689
	(A) = DEREF_entry(x47_ + 1);\
690
	(B) = x47_->ag_ptr;\
691
	(D)(x47_, (unsigned)2);\
2 7u83 692
    }
693
 
6 7u83 694
#define PUSH_entry(A, B)\
2 7u83 695
    {\
6 7u83 696
	errors **r48_ = &(B);\
697
	errors *x48_ = GEN_errors(2, TYPEID_stack);\
698
	COPY_entry(x48_ + 1, (A));\
699
	x48_->ag_ptr = *r48_;\
700
	*r48_ = x48_;\
2 7u83 701
    }
702
 
6 7u83 703
#define POP_entry(A, B)\
2 7u83 704
    {\
6 7u83 705
	errors **r49_ = &(B);\
706
	errors *x49_ = CHECK_NULL(*r49_);\
707
	(A) = DEREF_entry(x49_ + 1);\
708
	*r49_ = x49_->ag_ptr;\
709
	destroy_errors(x49_, (unsigned)2);\
2 7u83 710
    }
711
 
712
 
713
/* Maximum allocation size */
714
 
715
#define errors_GEN_MAX			8
716
 
717
#endif