|
1 | | -/* $Id: expbasic.h,v 1.7 1997/01/21 19:17:11 dar Exp $ */ |
2 | 1 |
|
3 | 2 | /* |
4 | 3 | * This software was developed by U.S. Government employees as part of |
@@ -72,84 +71,81 @@ typedef char * Binary; |
72 | 71 | #define UNRESOLVED 0x0 |
73 | 72 | #define RESOLVED 0x1 |
74 | 73 | #define RESOLVE_FAILED 0x2 |
75 | | -#define RESOLVE_IN_PROGRESS 0x4 /* only if actively being resolved */ |
76 | | -/* not if it's just between passes */ |
| 74 | +#define RESOLVE_IN_PROGRESS 0x4 /**< only if actively being resolved not if it's just between passes */ |
77 | 75 |
|
78 | | -/* used during rename resolution to catch recursive USE/REFs */ |
| 76 | +/** used during rename resolution to catch recursive USE/REFs */ |
79 | 77 | #define is_resolve_in_progress_raw(x) ((x)->resolved & RESOLVE_IN_PROGRESS) |
80 | 78 | #define resolve_in_progress_raw(x) (x)->resolved |= RESOLVE_IN_PROGRESS |
81 | 79 | #define resolve_not_in_progress_raw(x) (x)->resolved &= ~RESOLVE_IN_PROGRESS |
82 | 80 |
|
83 | | -/* and type resolution to catch recursive types (A = B and B = A) */ |
| 81 | +/** and type resolution to catch recursive types (A = B and B = A) */ |
84 | 82 | #define resolve_in_progress(x) (x)->symbol.resolved |= RESOLVE_IN_PROGRESS |
85 | 83 |
|
86 | | -/* test/set whether anything has failed resolution */ |
| 84 | +/** test/set whether anything has failed resolution */ |
87 | 85 | #define is_resolve_failed(x) ((x)->symbol.resolved & RESOLVE_FAILED) |
88 | 86 | #define is_resolve_failed_raw(x) ((x)->resolved & RESOLVE_FAILED) |
89 | 87 | #define resolve_failed(x) (x)->symbol.resolved |= RESOLVE_FAILED |
90 | 88 | #define resolve_failed_raw(x) (x)->resolved |= RESOLVE_FAILED |
91 | 89 |
|
92 | | -/* test/set whether anything has succeeded resolution */ |
| 90 | +/** test/set whether anything has succeeded resolution */ |
93 | 91 | #define is_resolved(x) ((x)->symbol.resolved & RESOLVED) |
94 | 92 |
|
95 | | -/* test possibility of future resolution */ |
| 93 | +/** test possibility of future resolution */ |
96 | 94 | #define is_resolvable(x) (!is_not_resolvable(x)) |
97 | 95 | #define is_not_resolvable(x) ((x)->symbol.resolved & (RESOLVE_FAILED|RESOLVED|RESOLVE_IN_PROGRESS)) |
98 | 96 |
|
99 | | -/* mark something resolved */ |
| 97 | +/** mark something resolved */ |
100 | 98 | #define resolved_all(x) x->symbol.resolved = RESOLVED |
101 | 99 |
|
102 | 100 |
|
103 | | -/* define the object types that can appear in a symbol table */ |
104 | | -/* basically anything that is usefully named, but that cannot be */ |
105 | | -/* differentiated from another type when handed a generic pointer */ |
106 | | -/* Entity, schema and alg can be differentiated but it is just very */ |
107 | | -/* useful to be able to differentiate this way. */ |
108 | | -#define OBJ_ANY '*' /* Matches anything - special to DICT funcs */ |
109 | | -#define OBJ_EXPRESS '!' /* I can't figure out the mnemonic either! */ |
| 101 | +/** define the object types that can appear in a symbol table |
| 102 | + * basically anything that is usefully named, but that cannot be |
| 103 | + * differentiated from another type when handed a generic pointer |
| 104 | + * Entity, schema and alg can be differentiated but it is just very |
| 105 | + * useful to be able to differentiate this way. */ |
| 106 | +#define OBJ_ANY '*' /**< Matches anything - special to DICT funcs */ |
| 107 | +#define OBJ_EXPRESS '!' /**< I can't figure out the mnemonic either! */ |
110 | 108 | #define OBJ_PASS '#' |
111 | 109 |
|
112 | | -/* The following are all odd-ball scopes, that aren't ever looked up by */ |
113 | | -/* type - but the data structures might as well be descriptive */ |
| 110 | +/** The following are all odd-ball scopes, that aren't ever looked up by |
| 111 | + * type - but the data structures might as well be descriptive */ |
114 | 112 | #define OBJ_INCREMENT '+' |
115 | 113 | #define OBJ_ALIAS 'a' |
116 | | -#define OBJ_QUERY 'q' /* isn't even stored anywhere! */ |
| 114 | +#define OBJ_QUERY 'q' /**< isn't even stored anywhere! */ |
117 | 115 |
|
118 | 116 | #define OBJ_PROCEDURE 'p' |
119 | 117 | #define OBJ_RENAME 'n' |
120 | 118 | #define OBJ_RULE 'r' |
121 | 119 | #define OBJ_FUNCTION 'f' |
122 | | -#define OBJ_TAG 'g' /* a type, but only when used as a type tag */ |
| 120 | +#define OBJ_TAG 'g' /**< a type, but only when used as a type tag */ |
123 | 121 | #define OBJ_ENTITY 'e' |
124 | 122 | #define OBJ_SCHEMA 's' |
125 | 123 | #define OBJ_TYPE 't' |
126 | | -#define OBJ_UNKNOWN 'u' /*things that won't ever be looked up by type*/ |
| 124 | +#define OBJ_UNKNOWN 'u' /**< things that won't ever be looked up by type*/ |
127 | 125 | #define OBJ_VARIABLE 'v' |
128 | 126 | #define OBJ_WHERE 'w' |
129 | | -#define OBJ_EXPRESSION 'x' /* so far only enums get looked up by name & */ |
130 | | -#define OBJ_ENUM 'x' /* appear this way, perhaps they should be */ |
131 | | -/* variables? */ |
132 | | -#define OBJ_AMBIG_ENUM 'z' /* enumerations of the same name which are */ |
133 | | -/* visible in the same scope when qualified */ |
134 | | -/* z is of no mnemonic significance (so far) */ |
| 127 | +#define OBJ_EXPRESSION 'x' /**< so far only enums get looked up by name & */ |
| 128 | +#define OBJ_ENUM 'x' /**< appear this way, perhaps they should be variables? */ |
| 129 | +#define OBJ_AMBIG_ENUM 'z' /**< enumerations of the same name which are |
| 130 | + * visible in the same scope when qualified |
| 131 | + * z is of no mnemonic significance (so far) */ |
135 | 132 | #define IS_ENUM(x) (((x) == OBJ_ENUM) || ((x) == OBJ_AMBIG_ENUM)) |
136 | 133 |
|
137 | | -/* these represent a different way of selecting classes of objects */ |
138 | | -/* these are particularly useful when looking for multiple types concurrently */ |
| 134 | +/** these represent a different way of selecting classes of objects |
| 135 | + * these are particularly useful when looking for multiple types concurrently */ |
139 | 136 | #define OBJ_TYPE_BITS 0x1 |
140 | 137 | #define OBJ_ENTITY_BITS 0x2 |
141 | 138 | #define OBJ_FUNCTION_BITS 0x4 |
142 | 139 | #define OBJ_PROCEDURE_BITS 0x8 |
143 | | -#define OBJ_PASS_BITS 0x10 /* i.e., EXPRESSpass */ |
| 140 | +#define OBJ_PASS_BITS 0x10 /**< i.e., EXPRESSpass */ |
144 | 141 | #define OBJ_RULE_BITS 0x20 |
145 | | -#define OBJ_EXPRESSION_BITS 0x40 /* as above, only used for */ |
146 | | -/* finding enums */ |
| 142 | +#define OBJ_EXPRESSION_BITS 0x40 /**< as above, only used for finding enums */ |
147 | 143 | #define OBJ_SCHEMA_BITS 0x80 |
148 | 144 | #define OBJ_VARIABLE_BITS 0x100 |
149 | 145 | #define OBJ_WHERE_BITS 0x200 |
150 | 146 |
|
151 | 147 | #define OBJ_ANYTHING_BITS 0x0fffffff |
152 | | -#define OBJ_UNFINDABLE_BITS 0x10000000 /* should never be found */ |
| 148 | +#define OBJ_UNFINDABLE_BITS 0x10000000 /**< should never be found */ |
153 | 149 | #define OBJ_ALGORITHM_BITS (OBJ_FUNCTION_BITS | OBJ_PROCEDURE_BITS | \ |
154 | 150 | OBJ_RULE_BITS) |
155 | 151 | #define OBJ_SCOPE_BITS (OBJ_ALGORITHM_BITS | OBJ_ENTITY_BITS | \ |
|
0 commit comments