! ReviseMulti revises the multiple object which already exists, in the ! light of information which has come along since then (i.e., the second ! parameter). It returns a parser error number, or else 0 if all is well. ! This only ever throws things out, never adds new ones. ! ---------------------------------------------------------------------------- [ ReviseMulti second_p i low; #ifdef DEBUG; if (parser_trace>=4) print " Revising multiple object list of size ", multiple_object-->0, " with 2nd ", (name) second_p, "^"; #endif; if (multi_context==MULTIEXCEPT_TOKEN or MULTIINSIDE_TOKEN) { for (i=1, low=0:i<=multiple_object-->0:i++) { if ( (multi_context==MULTIEXCEPT_TOKEN && multiple_object-->i ~= second_p) || (multi_context==MULTIINSIDE_TOKEN && multiple_object-->i in second_p)) { low++; multiple_object-->low = multiple_object-->i; } } multiple_object-->0 = low; } if (multi_context==MULTI_TOKEN && action_to_be == ##Take) { for (i=1, low=0:i<=multiple_object-->0:i++) if (ScopeCeiling(multiple_object-->i)==ScopeCeiling(actor)) low++; #ifdef DEBUG; if (parser_trace>=4) print " Token 2 plural case: number with actor ", low, "^"; #endif; if (take_all_rule==2 || low>0) { for (i=1, low=0:i<=multiple_object-->0:i++) { if (ScopeCeiling(multiple_object-->i)==ScopeCeiling(actor)) { low++; multiple_object-->low = multiple_object-->i; } } multiple_object-->0 = low; } } i=multiple_object-->0; #ifdef DEBUG; if (parser_trace>=4) print " Done: new size ", i, "^"; #endif; if (i==0) return NOTHING_PE; return 0; ];