7.4.Name resolution (Since 1.1.0)

A gloss token's name (after removing a trailing ! and any (args)) resolves against the lexicon, case-insensitively:

  1. Exact match. If exactly one entry has that name, it is used. A draft entry resolves when it is the only match. If more than one entry has that name (a concrete entry and a draft included), the script is in error (ambiguous gloss name).
  2. Explicit variation NAME#var. If no entry is named NAME#var exactly, the token falls back to the entry named NAME (the same exact-match rule applies), never to a sibling variation. If neither exists, the name is unknown.
  3. Bare variation family. A name without # that matches no entry exactly, but heads entries named NAME#…, picks one member uniformly at random, choosing among concrete (non-draft) members when any exist, otherwise among all members. The pick is re-rolled on every compose, and a producer serializing the script MUST keep the bare NAME.
  4. Otherwise the name is unknown (unknown gloss), which is an error.

Expression names (@name) resolve the same way, without variations: one match is used; none is unknown expression; more than one is ambiguous expression name.

Aliases and composed glosses are lexicon-level entries, defined here only for resolution: