| 738 | test* dest_id_test); |
| 739 | |
| 740 | condition* parse_value_test_star(agent* thisAgent, char first_letter) |
| 741 | { |
| 742 | condition* c, *last_c, *first_c, *new_conds; |
| 743 | test value_test; |
| 744 | bool acceptable; |
| 745 | |
| 746 | if ((thisAgent->lexeme.type == MINUS_LEXEME) || |
| 747 | (thisAgent->lexeme.type == UP_ARROW_LEXEME) || |
| 748 | (thisAgent->lexeme.type == R_PAREN_LEXEME)) |
| 749 | { |
| 750 | /* --- value omitted, so create dummy value test --- */ |
| 751 | allocate_with_pool(thisAgent, &thisAgent->condition_pool, &c); |
| 752 | c->type = POSITIVE_CONDITION; |
| 753 | c->next = c->prev = NIL; |
| 754 | c->data.tests.id_test = NIL; |
| 755 | c->data.tests.attr_test = NIL; |
| 756 | c->data.tests.value_test = make_placeholder_test(thisAgent, first_letter); |
| 757 | c->test_for_acceptable_preference = false; |
| 758 | return c; |
| 759 | } |
| 760 | |
| 761 | first_c = NIL; |
| 762 | last_c = NIL; |
| 763 | do |
| 764 | { |
| 765 | if (thisAgent->lexeme.type == L_PAREN_LEXEME) |
| 766 | { |
| 767 | /* --- read <conds_for_one_id>, take the id_test from it --- */ |
| 768 | new_conds = parse_conds_for_one_id(thisAgent, first_letter, &value_test); |
| 769 | if (!new_conds) |
| 770 | { |
| 771 | deallocate_condition_list(thisAgent, first_c); |
| 772 | return NIL; |
| 773 | } |
| 774 | } |
| 775 | else |
| 776 | { |
| 777 | /* --- read <value_test> --- */ |
| 778 | new_conds = NIL; |
| 779 | value_test = parse_test(thisAgent); |
| 780 | if (!value_test) |
| 781 | { |
| 782 | deallocate_condition_list(thisAgent, first_c); |
| 783 | return NIL; |
| 784 | } |
| 785 | if (! test_includes_equality_test_for_symbol(value_test, NIL)) |
| 786 | { |
| 787 | add_new_test_to_test(thisAgent, &value_test, make_placeholder_test(thisAgent, first_letter)); |
| 788 | } |
| 789 | } |
| 790 | /* --- check for acceptable preference indicator --- */ |
| 791 | acceptable = false; |
| 792 | if (thisAgent->lexeme.type == PLUS_LEXEME) |
| 793 | { |
| 794 | acceptable = true; |
| 795 | get_lexeme(thisAgent); |
| 796 | } |
| 797 | /* --- build condition using the new value test --- */ |
no test coverage detected