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


15.4 Accessors

Function: int marpa_o_ambiguity_metric (Marpa_Order o)

Returns an ambiguity metric. The metric is 1 is the parse is unambiguous. If the metric is 2 or greater, the parse is ambiguous. It was originally intended to have values greater than 2 be an cheaply computed estimate of the degree of ambiguity, but a satisfactory scheme for this has yet to be implemented.

If the ordering is not already frozen, it will be frozen on return from marpa_o_ambiguity_metric(). marpa_o_ambiguity_metric() is considered an “accessor”, because it is assumed that the ordering is frozen when marpa_o_ambiguity_metric() is called.

Return value on success: 1 if the ordering is not for an ambiguous parse; 2 or greater if the ordering is for an ambiguous parse.

Failures: On failure, -2.

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.

Failures: On failure, -2.