![]() | Chapter 16: Understanding | ![]() ![]() |
16.21. Precedence |
When several different lines of grammar are supplied to meet the same circumstances, it makes a big difference what order they are tried in. For instance, suppose we have:
Understand "photograph [a door]" as photographing.
Understand "photograph [an open door]" as photographing.
The second line is more specific than the first, so Inform takes these grammar lines the other way around: it checks for "open door" before it checks for "door". That didn't matter here, since both lines came out with the same result (the action of photographing), but it matters very much in the next example:
Understand "employ [a door]" as opening.
Understand "employ [an open door]" as entering.
More subtle is a line already seen:
Understand "on/in/inside" or "on top of" as "[within]".
Here Inform puts "on top of" before "on/in/inside", since otherwise only the "on" of "on top of" will be recognised.
Mistakes always take precedence over non-mistakes: this is intended to make sure that
Understand "take umbrage" as a mistake ("Nobody takes umbrage in this game, mister.").
will take precedence over
Understand "take [something]" as taking.
even if there is, in fact, a character called Mr Nimbus Umbrage so that the command could conceivably make sense.
| ![]() Building different styles of shirt from component sleeves and collars. |
|
| ![]() ![]() ![]() Similar to "Lemonade", but with bodies of liquid that can never be depleted, and some adjustments to the "fill" command so that it will automatically attempt to fill from a large liquid source if possible. |
|
Previous | Contents | Next |