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


22.6 Non-default ordering

Accessor function: int marpa_o_high_rank_only ( Marpa_Order o)

On success, returns, the “high rank only” flag of ordering o. See marpa_o_high_rank_only_set().

Return value: On success, the value of the “high rank only” flag, which is a boolean. On hard failure, -2.

Mutator function: int marpa_o_high_rank_only_set ( Marpa_Order o, int flag)

Sets the “high rank only” flag of ordering o. A flag of 1 indicates that, when ranking, all choices should be discarded except those of the highest rank. A flag of 0 indicates that no choices should be discarded on the basis of their rank.

A value of 1 is the default. The value of the “high rank only” flag has no effect until ranking is turned on using the marpa_o_rank() method.

Hards fails if the ordering is frozen.

Return value: On success, a boolean which is the value of the “high rank only” flag after the call. On hard failure, -2.

Mutator function: int marpa_o_rank ( Marpa_Order o )

By default, the ordering of parse trees is arbitrary. On success, the following happens:

Return value: On success, a non-negative value. On hard failure, -2.