Subversion Repositories tendra.SVN

Rev

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

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997, 1998
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 c_class (VERSION 1.1)
32
    BY calculus (VERSION 1.2)
33
*/
34
 
35
#ifndef INST_OPS_H_INCLUDED
36
#define INST_OPS_H_INCLUDED
37
 
38
/* Operations for union INSTANCE */
39
 
7 7u83 40
#define TAG_inst(P)			(CHECK_NULL(P)->ag_tag)
2 7u83 41
 
42
 
43
/* Operations for component form of union INSTANCE */
44
 
7 7u83 45
#define inst_form(P)			(CHECK_NULL(P) + 1)
2 7u83 46
 
47
 
48
/* Operations for component alias of union INSTANCE */
49
 
7 7u83 50
#define inst_alias(P)			(CHECK_NULL(P) + 2)
2 7u83 51
 
52
 
53
/* Operations for component next of union INSTANCE */
54
 
7 7u83 55
#define inst_next(P)			(CHECK_NULL(P) + 3)
2 7u83 56
 
57
 
58
/* Operations for field templ of union INSTANCE */
59
 
7 7u83 60
#define inst_templ_tag			((unsigned)0)
61
#define IS_inst_templ(P)		(CHECK_NULL(P)->ag_tag == 0)
2 7u83 62
 
7 7u83 63
#define inst_templ_id(P)		(CHECK_TAG((P), 0) + 4)
64
#define inst_templ_spec(P)		(CHECK_TAG((P), 0) + 5)
65
#define inst_templ_access(P)		(CHECK_TAG((P), 0) + 6)
66
#define inst_templ_mode(P)		(CHECK_TAG((P), 0) + 7)
67
#define inst_templ_mems(P)		(CHECK_TAG((P), 0) + 8)
68
#define inst_templ_prev(P)		(CHECK_TAG((P), 0) + 9)
2 7u83 69
 
7 7u83 70
#define MAKE_inst_templ(form_, next_, id_, access_, prev_, c_class_inst)\
2 7u83 71
    {\
7 7u83 72
	c_class *x851_ = GEN_c_class(10, TYPEID_inst);\
73
	x851_->ag_tag = 0;\
74
	COPY_type(x851_ + 1, (form_));\
75
	COPY_inst(x851_ + 2, x851_);\
76
	COPY_inst(x851_ + 3, (next_));\
77
	COPY_id(x851_ + 4, (id_));\
78
	COPY_type(x851_ + 5, NULL_type);\
79
	COPY_dspec(x851_ + 6, (access_));\
80
	COPY_pptok(x851_ + 7, NULL);\
81
	COPY_list(x851_ + 8, NULL_list ( IDENTIFIER ));\
82
	COPY_inst(x851_ + 9, (prev_));\
83
	(c_class_inst) = x851_;\
2 7u83 84
    }
85
 
7 7u83 86
#define DECONS_inst_templ(form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst)\
2 7u83 87
    {\
7 7u83 88
	c_class *x852_ = CHECK_TAG((c_class_inst), 0);\
89
	(form_) = DEREF_type(x852_ + 1);\
90
	(alias_) = DEREF_inst(x852_ + 2);\
91
	(next_) = DEREF_inst(x852_ + 3);\
92
	(id_) = DEREF_id(x852_ + 4);\
93
	(spec_) = DEREF_type(x852_ + 5);\
94
	(access_) = DEREF_dspec(x852_ + 6);\
95
	(mode_) = DEREF_pptok(x852_ + 7);\
96
	(mems_) = DEREF_list(x852_ + 8);\
97
	(prev_) = DEREF_inst(x852_ + 9);\
2 7u83 98
    }
99
 
7 7u83 100
#define DESTROY_inst_templ(destroyer_, form_, alias_, next_, id_, spec_, access_, mode_, mems_, prev_, c_class_inst)\
2 7u83 101
    {\
7 7u83 102
	c_class *x853_ = CHECK_TAG((c_class_inst), 0);\
103
	(form_) = DEREF_type(x853_ + 1);\
104
	(alias_) = DEREF_inst(x853_ + 2);\
105
	(next_) = DEREF_inst(x853_ + 3);\
106
	(id_) = DEREF_id(x853_ + 4);\
107
	(spec_) = DEREF_type(x853_ + 5);\
108
	(access_) = DEREF_dspec(x853_ + 6);\
109
	(mode_) = DEREF_pptok(x853_ + 7);\
110
	(mems_) = DEREF_list(x853_ + 8);\
111
	(prev_) = DEREF_inst(x853_ + 9);\
112
	(destroyer_)(x853_, (unsigned)10);\
2 7u83 113
    }
114
 
115
 
116
/* Operations for field token of union INSTANCE */
117
 
7 7u83 118
#define inst_token_tag			((unsigned)1)
119
#define IS_inst_token(P)		(CHECK_NULL(P)->ag_tag == 1)
2 7u83 120
 
7 7u83 121
#define inst_token_no(P)		(CHECK_TAG((P), 1) + 4)
2 7u83 122
 
7 7u83 123
#define MAKE_inst_token(form_, next_, c_class_inst)\
2 7u83 124
    {\
7 7u83 125
	c_class *x854_ = GEN_c_class(5, TYPEID_inst);\
126
	x854_->ag_tag = 1;\
127
	COPY_type(x854_ + 1, (form_));\
128
	COPY_inst(x854_ + 2, x854_);\
129
	COPY_inst(x854_ + 3, (next_));\
130
	COPY_ulong(x854_ + 4, LINK_NONE);\
131
	(c_class_inst) = x854_;\
2 7u83 132
    }
133
 
7 7u83 134
#define DECONS_inst_token(form_, alias_, next_, no_, c_class_inst)\
2 7u83 135
    {\
7 7u83 136
	c_class *x855_ = CHECK_TAG((c_class_inst), 1);\
137
	(form_) = DEREF_type(x855_ + 1);\
138
	(alias_) = DEREF_inst(x855_ + 2);\
139
	(next_) = DEREF_inst(x855_ + 3);\
140
	(no_) = DEREF_ulong(x855_ + 4);\
2 7u83 141
    }
142
 
7 7u83 143
#define DESTROY_inst_token(destroyer_, form_, alias_, next_, no_, c_class_inst)\
2 7u83 144
    {\
7 7u83 145
	c_class *x856_ = CHECK_TAG((c_class_inst), 1);\
146
	(form_) = DEREF_type(x856_ + 1);\
147
	(alias_) = DEREF_inst(x856_ + 2);\
148
	(next_) = DEREF_inst(x856_ + 3);\
149
	(no_) = DEREF_ulong(x856_ + 4);\
150
	(destroyer_)(x856_, (unsigned)5);\
2 7u83 151
    }
152
 
153
 
154
#endif