Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line 35... Line 35...
35
#ifndef SPEC_OPS_H_INCLUDED
35
#ifndef SPEC_OPS_H_INCLUDED
36
#define SPEC_OPS_H_INCLUDED
36
#define SPEC_OPS_H_INCLUDED
37
 
37
 
38
/* Operations for union SPECIFICATION */
38
/* Operations for union SPECIFICATION */
39
 
39
 
40
#define TAG_spec( P )			( ( unsigned ) 0 )
40
#define TAG_spec(P)			((unsigned) 0)
41
 
41
 
42
 
42
 
43
/* Operations for component major of union SPECIFICATION */
43
/* Operations for component major of union SPECIFICATION */
44
 
44
 
45
#define spec_major( P )			( CHECK_NULL ( P ) + 0 )
45
#define spec_major(P)			(CHECK_NULL(P) + 0)
46
 
46
 
47
 
47
 
48
/* Operations for component minor of union SPECIFICATION */
48
/* Operations for component minor of union SPECIFICATION */
49
 
49
 
50
#define spec_minor( P )			( CHECK_NULL ( P ) + 1 )
50
#define spec_minor(P)			(CHECK_NULL(P) + 1)
51
 
51
 
52
 
52
 
53
/* Operations for component sorts of union SPECIFICATION */
53
/* Operations for component sorts of union SPECIFICATION */
54
 
54
 
55
#define spec_sorts( P )			( CHECK_NULL ( P ) + 2 )
55
#define spec_sorts(P)			(CHECK_NULL(P) + 2)
56
 
56
 
57
 
57
 
58
/* Operations for component vars of union SPECIFICATION */
58
/* Operations for component vars of union SPECIFICATION */
59
 
59
 
60
#define spec_vars( P )			( CHECK_NULL ( P ) + 3 )
60
#define spec_vars(P)			(CHECK_NULL(P) + 3)
61
 
61
 
62
 
62
 
63
/* Operations for component eqns of union SPECIFICATION */
63
/* Operations for component eqns of union SPECIFICATION */
64
 
64
 
65
#define spec_eqns( P )			( CHECK_NULL ( P ) + 4 )
65
#define spec_eqns(P)			(CHECK_NULL(P) + 4)
66
 
66
 
67
 
67
 
68
/* Operations for component foreign of union SPECIFICATION */
68
/* Operations for component foreign of union SPECIFICATION */
69
 
69
 
70
#define spec_foreign( P )		( CHECK_NULL ( P ) + 5 )
70
#define spec_foreign(P)			(CHECK_NULL(P) + 5)
71
 
71
 
72
 
72
 
73
/* Operations for field basic of union SPECIFICATION */
73
/* Operations for field basic of union SPECIFICATION */
74
 
74
 
75
#define spec_basic_tag			( ( unsigned ) 0 )
75
#define spec_basic_tag			((unsigned)0)
76
#define IS_spec_basic( P )		1
76
#define IS_spec_basic(P)		1
77
 
77
 
78
 
78
 
79
#define MAKE_spec_basic( major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec )\
79
#define MAKE_spec_basic(major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec)\
80
    {\
80
    {\
81
	tdf *x99_ = GEN_tdf ( 6, TYPEID_spec ) ;\
81
	tdf *x99_ = GEN_tdf(6, TYPEID_spec);\
82
	COPY_unsigned ( x99_ + 0, ( major_ ) ) ;\
82
	COPY_unsigned(x99_ + 0, (major_));\
83
	COPY_unsigned ( x99_ + 1, ( minor_ ) ) ;\
83
	COPY_unsigned(x99_ + 1, (minor_));\
84
	COPY_list ( x99_ + 2, ( sorts_ ) ) ;\
84
	COPY_list(x99_ + 2, (sorts_));\
85
	COPY_list ( x99_ + 3, ( vars_ ) ) ;\
85
	COPY_list(x99_ + 3, (vars_));\
86
	COPY_list ( x99_ + 4, ( eqns_ ) ) ;\
86
	COPY_list(x99_ + 4, (eqns_));\
87
	COPY_list ( x99_ + 5, ( foreign_ ) ) ;\
87
	COPY_list(x99_ + 5, (foreign_));\
88
	( tdf_spec ) = x99_ ;\
88
	(tdf_spec) = x99_;\
89
    }
89
    }
90
 
90
 
91
#define DECONS_spec_basic( major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec )\
91
#define DECONS_spec_basic(major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec)\
92
    {\
92
    {\
93
	tdf *x100_ = ( tdf_spec ) ;\
93
	tdf *x100_ = (tdf_spec);\
94
	( major_ ) = DEREF_unsigned ( x100_ + 0 ) ;\
94
	(major_) = DEREF_unsigned(x100_ + 0);\
95
	( minor_ ) = DEREF_unsigned ( x100_ + 1 ) ;\
95
	(minor_) = DEREF_unsigned(x100_ + 1);\
96
	( sorts_ ) = DEREF_list ( x100_ + 2 ) ;\
96
	(sorts_) = DEREF_list(x100_ + 2);\
97
	( vars_ ) = DEREF_list ( x100_ + 3 ) ;\
97
	(vars_) = DEREF_list(x100_ + 3);\
98
	( eqns_ ) = DEREF_list ( x100_ + 4 ) ;\
98
	(eqns_) = DEREF_list(x100_ + 4);\
99
	( foreign_ ) = DEREF_list ( x100_ + 5 ) ;\
99
	(foreign_) = DEREF_list(x100_ + 5);\
100
    }
100
    }
101
 
101
 
102
#define DESTROY_spec_basic( destroyer_, major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec )\
102
#define DESTROY_spec_basic(destroyer_, major_, minor_, sorts_, vars_, eqns_, foreign_, tdf_spec)\
103
    {\
103
    {\
104
	tdf *x101_ = ( tdf_spec ) ;\
104
	tdf *x101_ = (tdf_spec);\
105
	( major_ ) = DEREF_unsigned ( x101_ + 0 ) ;\
105
	(major_) = DEREF_unsigned(x101_ + 0);\
106
	( minor_ ) = DEREF_unsigned ( x101_ + 1 ) ;\
106
	(minor_) = DEREF_unsigned(x101_ + 1);\
107
	( sorts_ ) = DEREF_list ( x101_ + 2 ) ;\
107
	(sorts_) = DEREF_list(x101_ + 2);\
108
	( vars_ ) = DEREF_list ( x101_ + 3 ) ;\
108
	(vars_) = DEREF_list(x101_ + 3);\
109
	( eqns_ ) = DEREF_list ( x101_ + 4 ) ;\
109
	(eqns_) = DEREF_list(x101_ + 4);\
110
	( foreign_ ) = DEREF_list ( x101_ + 5 ) ;\
110
	(foreign_) = DEREF_list(x101_ + 5);\
111
	( destroyer_ ) ( x101_, ( unsigned ) 6 ) ;\
111
	(destroyer_)(x101_, (unsigned)6);\
112
    }
112
    }
113
 
113
 
114
 
114
 
115
#endif
115
#endif