| 4463 | // |
| 4464 | |
| 4465 | static act* act_transaction(act_t type) |
| 4466 | { |
| 4467 | const TEXT* transaction = NULL; |
| 4468 | |
| 4469 | par_options(&transaction); |
| 4470 | MSC_match(KW_WORK); |
| 4471 | |
| 4472 | act* action = (act*) MSC_alloc(ACT_LEN); |
| 4473 | action->act_type = type; |
| 4474 | action->act_whenever = gen_whenever(); |
| 4475 | action->act_object = (ref*) transaction; |
| 4476 | |
| 4477 | if (MSC_match(KW_RELEASE)) |
| 4478 | { |
| 4479 | type = (type == ACT_commit) ? ACT_finish : ACT_rfinish; |
| 4480 | if (transaction) |
| 4481 | { |
| 4482 | action->act_rest = (act*) MSC_alloc(ACT_LEN); |
| 4483 | action->act_rest->act_type = type; |
| 4484 | } |
| 4485 | else |
| 4486 | action->act_type = type; |
| 4487 | } |
| 4488 | else if ((type == ACT_commit) && (MSC_match(KW_RETAIN))) |
| 4489 | { |
| 4490 | MSC_match(KW_SNAPSHOT); |
| 4491 | action->act_type = type = ACT_commit_retain_context; |
| 4492 | } |
| 4493 | else if ((type == ACT_rollback) && (MSC_match(KW_RETAIN))) |
| 4494 | { |
| 4495 | MSC_match(KW_SNAPSHOT); |
| 4496 | action->act_type = type = ACT_rollback_retain_context; |
| 4497 | } |
| 4498 | |
| 4499 | return action; |
| 4500 | } |
| 4501 | |
| 4502 | |
| 4503 | //____________________________________________________________ |
no test coverage detected