Chapter 6: Commands
6.17. Alternatives To Standard Parsing

Very occasionally, for out-of-the-ordinary games, we want to make major changes to the way that Inform ordinarily understands commands.

Cloves shows how we might read adverbs in the player's command: adverbs are challenging because they can legitimately appear anywhere in a command structure, so must be found and accounted for before the rest of the command is understood.

Fragment of a Greek Tragedy goes further, substituting a keyword-recognition parser for the usual structure of commands and objects.


350
** Example  Cloves
Accepting adverbs anywhere in a command, registering what the player typed but then cutting them out before interpreting the command.

WI
348
** Example  Fragment of a Greek Tragedy
Responding to the player's input based on keywords only, and overriding the original parser entirely.

WI


PreviousContentsNext