Subject: Parsing or actually, matching

From: [email-masked] (Jonathan Bradshaw)
Date: Wed, 4 Aug 1993 13:45:21 -0700

I have been running a MOO for a year and the exact parsing matching stuff
is still somewhat of a mystery. Actually, what is wierd is:

$room:match
$room:match_object

Which should be used? Also, there is $match_utils which never gets called!
There are SO many matching and parsing verbs in the core that a manual
on it alone would be possible and VERY useful. A step by step look at
how a command travels from start to end would be highly interesting and
some guidelines on both modifying (to enhance for VR purposes) and properly
using the correct match_* verbs.

Thanks!

-- 
 Jonathan Bradshaw | Preferred E-Mail is [email-masked] | Ham N9OXE
 WNDU-AM/FM/TV South Bend, IN | Disclaimer "My opinions are not my employers"
 "If any girl rejects you, don't you doubt it's part of the .plan"- D. Gibson

---

From: Roger Crew <[email-masked]>
Date: Wed, 4 Aug 1993 14:35:27 -0700

part of your answer lies in `help object-matching' in $core_help, 
which discusses the distinction between

     object:match("foo")
     location:match_object("foo"[,player])
     player:my_match_object("foo"[,location])
     $string_utils:match_object("foo",location,player)

I should also point out that you should probably ignore $match_utils
on your first pass since those verbs and their main clients were
written long before we had gotten this all straight, i.e., if you're
looking at code that uses $match_utils verbs and wondering why it
doesn't seem to do quite what it should according to `help
object-matching', it's not necessarily your imagination.  Part of the
problem with updating $match_utils is doing it without trashing the
LambdaMOO RPG and various other pieces of old code present on
LambdaMOO itself (...actually, now I'm wondering if anything in the
current core actually depends on $match_utils anymore...)

As for how a command travels from start to end, the only really complicated 
part is what happens in the :huh verb once the builtin server stuff gives up
(everything prior to that is described in the Programmers' Manual).

By default, room:huh calls $command_utils:do_huh, which gives the 
basic outline
  (1) try player:my_huh(verb,args)
        Look for various player defined extra commands (e.g., features) 
  (2) try room:here_huh(verb,args)
        Look for various room-defined commands.
  (3) try player:last_huh(verb,args)
        Check for @message foo is "xxx" and other
        miscellaneous last-ditch efforts
  (4) try to figure out what the player might have meant and say something 
        vaguely intellegent
  (5) "I don't understand that."

--
Roger Crew
Internet:   [email-masked]
LambdaMOO:  Rog