# Parsing Problems

Kipp the Kidd (mcmudge@mailbox.syr.edu)
Sat, 2 Sep 1995 04:53:09 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    On Fri, 1 Sep 1995, Sam Weber wrote:

    >   -- every object declares which command-line verbs it will handle
    >      (just the verb -- no argument specification)
    >   -- when a player types a command, then the first word of the command
    >      is considered to be the verb
    >   -- a list of all objects in the player's environment which are willing
    >      to handle that verb is constructed.  The environment includes the
    >      player's object, the player's location, objects inside the player,
    >      and objects in the player's location.  The ordering is done according
    >      to certain rules.
    >   -- the first object in the list has the appropriate verb called to attempt
    >      to handle the player's command.  If the verb returns an failure value,
    >      then the next object in the list is tried.  This continues until either
    >      some object is found which successfully handles the command, or until
    >      the end of the list is reached, in which case an error message is
    >      printed.

    I did exactly the same thing, but the moo doesn't make a list of the
    possible verbs, it instead searches for them and processes them as it
    finds them.  If it goes through them all, then it prints an error message.
    BTW-- it does ask the verb if it wants to parse or not.

    - Kipp