Previous: , Up: Bocage methods   [Contents]

14.4 Accessors

Function: int marpa_b_ambiguity_metric (Marpa_Bocage b)

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.

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

Failures: On failure, -2.

Function: int marpa_b_is_null (Marpa_Bocage b)

Return value on success: A number greater than or equal to 1 if the bocage is for a null parse; otherwise, 0.

Failures: On failure, -2.