Grammar tokens...

I am going over Chapter 17 in the manual, and coming across section 17.13, there are a couple of examples–

[code]Understand “beneath/under/by/near/beside/alongside/against” or “next to” or “in front of” as “[beside]”.

Understand “on/in/inside” or “on top of” as “[within]”.[/code]

I am not sure that I understand this, are the prepositions in the brackets words already understood by Inform, and we are listing prepositions that can be understood as those…?? If so, why are the brackets needed? Are they to clarify that the word inside is meant to be one that is already in Inform’s vocabulary and not a command or some other kind of text…??


The words aren’t already understood by Inform–when you do something like this you’re creating “[beside]” or “[within]” as a new token that Inform can understand.

This doesn’t actually accomplish anything until you use the token somewhere else. (The main-text documentation does not communicate this very clearly–you have to look at the example.) So something like this:

[code]Understand “on/in/inside” or “on top of” as “[within]”.

Understand “stow [something] [within] [supporter]” as putting it on.[/code]

would allow commands like STOW BOOK ON DESK, STOW BOOK IN DESK, STOW BOOK ON TOP OF DESK, and STOW BOOK INSIDE DESK as putting the book on the desk, if the desk is a supporter. (The “[supporter]” token is already understood because supporter is a kind of thing.)

You can also use these tokens in asking it about rules, like this:

[code]Understand “canteloupe/watermelon/honeydew” as “[melons]”.

Instead of asking Grace about “[melons]”, say “Grace sighs. ‘I am so tired of that joke.’”[/code]


Excellent. (Clarity ensues). Thanks for the footnote.