| 225 | // |
| 226 | |
| 227 | gpre_ctx* EXP_context(gpre_req* request, gpre_sym* initial_symbol) |
| 228 | { |
| 229 | // Use the token (context name) to make up a symbol |
| 230 | // block. Then check for the keyword IN. If it's |
| 231 | // missing, either complain or punt, depending on the |
| 232 | // error flag. In either case, be sure to get rid of |
| 233 | // the symbol. If things look kosher, continue. |
| 234 | |
| 235 | gpre_sym* symbol = initial_symbol; |
| 236 | if (!symbol) |
| 237 | { |
| 238 | symbol = PAR_symbol(SYM_context); |
| 239 | if (!MSC_match(KW_IN)) |
| 240 | { |
| 241 | MSC_free(symbol); |
| 242 | CPR_s_error("IN"); |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | symbol->sym_type = SYM_context; |
| 247 | |
| 248 | gpre_rel* relation = EXP_relation(); |
| 249 | gpre_ctx* context = MSC_context(request); |
| 250 | context->ctx_symbol = symbol; |
| 251 | context->ctx_relation = relation; |
| 252 | symbol->sym_object = context; |
| 253 | |
| 254 | return context; |
| 255 | } |
| 256 | |
| 257 | |
| 258 | //____________________________________________________________ |
no test coverage detected