class Gamefic::Syntax

Syntaxes provide rules for matching input patterns to existing responses. Common uses are to provide synonyms for response verbs and allow for variations in sentence structure.

The template and command patterns use words beginning with a colon (e.g., ‘:thing`) to identify phrases that should be tokenized into arguments.

@example All of these syntaxes will translate input into a command of the

form "look thing container"

  Syntax.new('examine :thing in :container', 'look :thing :container')
  Syntax.new('look at :thing inside :container', 'look :thing :container')
  Syntax.new('search :container for :thing', 'look :thing :container')