CommandRankingByWeakness class | parser.t[5889]

A "weakness" criterion. This is similar to the rank-by-problem criterion, but rather than ranking on an actual structural problem, it ranks on a structural weakness. This is suitable for things like adjective endings and truncations, where the weakness isn't on the same order as a "problem" but where we'd still rather avoid the weakness if we can.

The point of the separate "weakness" criterion is that we only allow weaknesses to come into play on pass 2, after we've already discriminated based on problems. If we can discriminate based on problems, we'll do so in pass 1 and won't even get to pass 2; we'll only discriminate based on weakness if we can't tell the difference based on real problems.

`class CommandRankingByWeakness : CommandRankingCriterion`

Superclass Tree (in declaration order)

`CommandRankingByWeakness`
`CommandRankingCriterion`
`object`

Subclass Tree

(none)

Global Objects

`rankByEndAdj rankByPluralTrunc rankByPronoun rankByTrunc rankByWeakness`

Summary of Properties

`prop_`

``

Summary of Methods

`comparePass1 comparePass2`

``

Properties

`prop_` | `parser.t[5897]`

our command-ranking property

Methods

`comparePass1 (a, b)`OVERRIDDEN | `parser.t[5891]`

on pass 1, ignore weaknesses

`comparePass2 (a, b)`OVERRIDDEN | `parser.t[5894]`

on pass 2, compare based on weaknesses

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2