rankByTokenCount object | parser.t[6024]

Rank by token count. Other things being equal, we'd rather pick a longer match. If one match is shorter than the other in terms of the number of tokens it encompasses, then it means that the shorter match left more tokens at the end of the command to be interpreted as separate commands. If we have an interpretation that can take more of those tokens and parse them as part of the current command, that interpretation is probably better.

`rankByTokenCount : CommandRankingCriterion`

Superclass Tree (in declaration order)

`rankByTokenCount`
`CommandRankingCriterion`
`object`

Summary of Properties

``

``

(none)

Summary of Methods

`comparePass1`

Inherited from `CommandRankingCriterion` :
`comparePass2`

Properties

(none)

Methods

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

first pass - compare token counts

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