Next: , Previous: , Up: Ordering methods   [Contents][Index]


20.5 Accessors

Accessor function: int marpa_o_ambiguity_metric (Marpa_Order o)

On success, returns an ambiguity metric. If the parse is unambiguous, the metric is 1. If the parse is ambiguous, the metric is 2 or greater, and is otherwise unspecified. See Better defined ambiguity metric.

If “high rank only” is in effect, this ambiguity metric may differ from that returned by marpa_b_ambiguity_metric(). In particular, a “high rank only” ordering may be unambiguous even if its base bocage is ambiguous. But note also, because multiple parses choices may have the same rank, a “high rank only” ordering may be ambiguous.

If the ordering is not already frozen, it will be frozen on return from marpa_o_ambiguity_metric(). For our purposes, marpa_o_ambiguity_metric() is considered an “accessor”, because it treats its ordering as if it was frozen before the call to marpa_o_ambiguity_metric().

Return value: On success, the ambiguity metric, which is non-negative. On hard failure, -2.

Accessor function: int marpa_o_is_null (Marpa_Order o)

Return value: On success: A number greater than or equal to 1 if the ordering is for a null parse; otherwise, 0. On hard failure, -2.