lima-1.0b5/
lima-1.0b5/driver/
lima-1.0b5/driver/ChangeLog.old/
lima-1.0b5/driver/Win32/
lima-1.0b5/driver/compat/
lima-1.0b5/driver/include/
lima-1.0b5/driver/testsuite/
lima-1.0b5/driver/testsuite/clone/
lima-1.0b5/driver/testsuite/command/
lima-1.0b5/driver/testsuite/data/
lima-1.0b5/driver/testsuite/etc/
lima-1.0b5/driver/testsuite/include/
lima-1.0b5/driver/testsuite/inherit/
lima-1.0b5/driver/testsuite/inherit/master/
lima-1.0b5/driver/testsuite/log/
lima-1.0b5/driver/testsuite/single/
lima-1.0b5/driver/testsuite/single/tests/compiler/
lima-1.0b5/driver/testsuite/single/tests/efuns/
lima-1.0b5/driver/testsuite/single/tests/operators/
lima-1.0b5/driver/testsuite/u/
lima-1.0b5/driver/tmp/
lima-1.0b5/etc/
lima-1.0b5/lib/WWW/help/
lima-1.0b5/lib/cmds/
lima-1.0b5/lib/cmds/create/
lima-1.0b5/lib/cmds/player/attic/
lima-1.0b5/lib/contrib/bboard/
lima-1.0b5/lib/contrib/boards/
lima-1.0b5/lib/contrib/marriage/
lima-1.0b5/lib/contrib/roommaker/
lima-1.0b5/lib/contrib/transient_effect/
lima-1.0b5/lib/daemons/channel/
lima-1.0b5/lib/daemons/imud/
lima-1.0b5/lib/data/
lima-1.0b5/lib/data/config/
lima-1.0b5/lib/data/links/
lima-1.0b5/lib/data/news/
lima-1.0b5/lib/data/players/
lima-1.0b5/lib/data/secure/
lima-1.0b5/lib/domains/
lima-1.0b5/lib/domains/std/2.4.5/maze1/
lima-1.0b5/lib/domains/std/2.4.5/npc/
lima-1.0b5/lib/domains/std/2.4.5/post_dir/
lima-1.0b5/lib/domains/std/2.4.5/sub/
lima-1.0b5/lib/domains/std/camera/
lima-1.0b5/lib/domains/std/config/
lima-1.0b5/lib/domains/std/cult/
lima-1.0b5/lib/domains/std/effects/
lima-1.0b5/lib/domains/std/misc/
lima-1.0b5/lib/domains/std/monsters/
lima-1.0b5/lib/domains/std/recorder/
lima-1.0b5/lib/domains/std/rooms/
lima-1.0b5/lib/domains/std/rooms/beach/
lima-1.0b5/lib/domains/std/rooms/labyrinth/
lima-1.0b5/lib/domains/std/school/
lima-1.0b5/lib/domains/std/school/O/
lima-1.0b5/lib/domains/std/spells/
lima-1.0b5/lib/domains/std/spells/stock-mage/
lima-1.0b5/lib/domains/std/spells/stock-priest/
lima-1.0b5/lib/help/
lima-1.0b5/lib/help/admin/
lima-1.0b5/lib/help/hints/General_Questions/
lima-1.0b5/lib/help/hints/Pirate_Quest/
lima-1.0b5/lib/help/player/
lima-1.0b5/lib/help/player/bin/
lima-1.0b5/lib/help/player/quests/
lima-1.0b5/lib/help/wizard/
lima-1.0b5/lib/help/wizard/coding/guilds/
lima-1.0b5/lib/help/wizard/coding/rooms/
lima-1.0b5/lib/help/wizard/lib/daemons/
lima-1.0b5/lib/help/wizard/lib/lfun/
lima-1.0b5/lib/help/wizard/lib/std/
lima-1.0b5/lib/help/wizard/mudos_doc/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/interactive/
lima-1.0b5/lib/help/wizard/mudos_doc/applies/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/concepts/
lima-1.0b5/lib/help/wizard/mudos_doc/driver/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/arrays/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/buffers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/compile/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/filesystem/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/floats/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/functions/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/general/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mappings/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/mixed/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/numbers/
lima-1.0b5/lib/help/wizard/mudos_doc/efuns/parsing/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/constructs/
lima-1.0b5/lib/help/wizard/mudos_doc/lpc/types/
lima-1.0b5/lib/include/driver/
lima-1.0b5/lib/log/
lima-1.0b5/lib/obj/admtool/
lima-1.0b5/lib/obj/admtool/internal/
lima-1.0b5/lib/obj/admtool/mudinfo/
lima-1.0b5/lib/obj/admtool/secure/
lima-1.0b5/lib/obj/secure/
lima-1.0b5/lib/obj/secure/cmd/
lima-1.0b5/lib/obj/secure/mailers/
lima-1.0b5/lib/obj/secure/shell/
lima-1.0b5/lib/obj/secure/shell/classes/
lima-1.0b5/lib/obj/tasktool/
lima-1.0b5/lib/obj/tasktool/internal/
lima-1.0b5/lib/open/
lima-1.0b5/lib/secure/
lima-1.0b5/lib/secure/cgi/
lima-1.0b5/lib/secure/modules/
lima-1.0b5/lib/secure/simul_efun/
lima-1.0b5/lib/std/adversary/
lima-1.0b5/lib/std/adversary/advancement/
lima-1.0b5/lib/std/adversary/armor/
lima-1.0b5/lib/std/adversary/blows/
lima-1.0b5/lib/std/adversary/death/
lima-1.0b5/lib/std/adversary/formula/
lima-1.0b5/lib/std/adversary/health/
lima-1.0b5/lib/std/adversary/pulse/
lima-1.0b5/lib/std/adversary/wield/
lima-1.0b5/lib/std/classes/event_info/
lima-1.0b5/lib/std/container/
lima-1.0b5/lib/std/living/
lima-1.0b5/lib/std/modules/contrib/
lima-1.0b5/lib/std/patterns/
lima-1.0b5/lib/std/race/
lima-1.0b5/lib/std/race/restricted/
lima-1.0b5/lib/std/room/
lima-1.0b5/lib/tmp/
lima-1.0b5/lib/trans/
lima-1.0b5/lib/trans/admincmds/
lima-1.0b5/lib/trans/obj/
lima-1.0b5/lib/wiz/
Anyway, here is the spec:

The efun interface:

void parse_init()

   This efun alerts the driver that this_object() is an object that the
   parser should recognize as a 'game' object.  All objects that do not
   call parse_init() are ignored by the parser.  Nothing is actually
   done at this time; the internal parser structures for the object are
   set up, and the object is marked as being a parseable object, and is
   marked as being in a non-setup state.

   Objects that are not setup will have the parse_* functions called on
   them *once* at a later point when the driver decides it needs the
   information for that object.  After that, the driver remembers what
   the functions returned.  See parse_refresh().

void parse_refresh()
   
   Notifies the driver that the result of the parse_* functions may have
   changed.  Basically, the driver throws away it's saved information and
   marks the object as not being set up.

void parse_add_rule(string verb, string rule, int flags)

   Adds rule 'rule' for verb 'verb' to the internal parse tables.  Rule
   is in the form 'OBJ in OBJ'.  'flags' is reserved for future use.

mixed parse_sentence(string input)

   Asks the driver to handle the input string 'input'.  Return values are
   1 for everything went spiffy, 0 for 'I haven't a clue what the hell that
   is' and a string error message if 'input' doesn't make sense, but the
   parser has a good idea what was intended.  parse_sentence("put belboz in
   trashcan") -> "Belboz vehemently refuses to be put anywhere."; many of
   these messages are the result of negotiation with the mudlib, altough
   there are some canned ones (parse_sentence("get foo") -> "There is no
   foo here.").

   This is by far the most complex one.  The others are bookkeeping/interface
   more or less.  The algorithm is more or less as follows:

   1. Find the first word and lookup the appropriate verb.
   2. For each rule for the verb, match it to the remaining input string
      and attempt to fit parse the sub parts
      (i.e. for 'belboz in bag' and 'OBJ in OBJ' try to parse 'belboz'
       and 'bag' as OBJs)
      -> at this moment, support for OBJ, OBS, and LIV is planned.  Probably
         more to specified stuff like 'an object I am holding' etc
   3. The basic algorithm for parsing an object is to first check if
      the object table has been loaded (from a previous attempt to parse
      an OBJ rule).  If not, parsing information is loaded from the
      objects in environment(this_player()).
   4. The substring is then iterated over, checking the grammatical types
      of the words, and seeing if it makes sense/matches an object
   5. Assuming a rule is properly matched (there is a non-ambiguous object
      that matches each OBJ rule, etc) the parser then attempts to check if
      the rule make sense.  It calls the following:
      -> can_verb() in the zorker object
           e.g. can_look() { if (!light) return "It is dark"; }
      -> if there is a direct object, ob->can_verb()
           e.g. ob::can_drop() { return "It appears attached to your hand with super-glue."; }
      -> if there is an indirect object:
           do->can_verb_prep(io)
           io->can_verb_it_prep()
           e.g. belboz->can_put_in(bag)
                bag->can_put_it_in(belboz)
      (also, if 'all' is involved, there is an implicit loop here assuming
       that here->can_verb_all() gives us permission to use all with that
       verb.  Maybe handle this in verb flags.  I dunno)
   6. Actually execute the verb.  verb_obj->do_verb(object io, object do)

There are some details about imprecise matches, error recovery, and error
priorities which have been left out here for simplicity.  They only improve
the error messages, not the functionality.

-Beek

if you need any more info, mail me during the week.  I will be stopping in
occasionally, just won't have time for any heavy work :)
---
Tim Hollebeek                   'There will be a better sig when I have time'