Interactive Parsing

version 3 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next

  • Section 2 - Single letters link to particular verbs directly

        To make typing a single letter fast, we hard-code what letter suggests what verb. This could be altered by the authored if you liked. Note the value column is ignored by the game, it's just there for human reference.

    Table of Single-Letter Verb Associations
    ascii value   letter  text  
    97  "a"  "ask"  
    98  "b"  "buy"  
    99  "c"  "cut"  
    100  "d"  "down"  
    101  "e"  "east"  
    102  "f"  "feel"  
    103  "g"  "get"  
    104  "h"  "hello"  
    105  "i"  "inventory"  
    106  "j"  "jump"  
    107  "k"  "kick"  
    108  "l"  "look"  
    109  "m"  "move"  
    110  "n"  "north"  
    111  "o"  "open"  
    112  "p"  "put"  
    113  "q"  "quit"  
    114  "r"  "read"  
    115  "s"  "south"  
    116  "t"  "take"  
    117  "u"  "up"  
    118  "v"  "version"  
    119  "w"  "west"  
    120  "x"  "examine"  
    121  "y"  "yes"  
    122  "z"  "wait"  

    The initial verb letter is a number that varies.
    The verb suggestion is a text that varies.

    This is the suggest verb from single letter rule:
        if initial verb letter is an ascii value listed in the Table of Single-Letter Verb Associations:
            now the verb suggestion is the text corresponding to an ascii value of the initial verb letter in the Table of Single-Letter Verb Associations;

    To decide which number is (a - a text) as a number:
        (- ({a}) -).