[214] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: match_template() needs help with consistancy

daemon@ATHENA.MIT.EDU (Thu Apr 28 09:06:37 1994 )

To: stewarta@netcom.com (Alex Stewart)
Cc: ghudson@MIT.EDU (Greg Hudson), coldstuff@MIT.EDU
In-Reply-To: Your message of Wed, 27 Apr 94 23:47:37 -0700.
Date: Thu, 28 Apr 94 09:03:26 EDT
From: Greg Hudson <ghudson@MIT.EDU>

>> * If the user wants to match a wildcard with something that includes
>> text that would match the next word pattern, the user should simply
>> quote the entire argument as a C string literal, and leave it at that.

> I don't think anybody's objecting to this (if I understand what
> you're referring to properly).

People are objecting to it; they are saying that the user should be
able to quote part of the argument as a C string literal.

>> * The user generally doesn't want any processing to get in the way
>> when it's not necessary; therefore, no processing at all is done on
>> the last argument.

> This is bad.  It is bad quite simply because it means parsing is
> handled differently in some cases than in others and it's not always
> immediately obvious which is which.  Rules should be consistent for
> the entire match or not exist at all.

I disagree.  For user-level parsing, the primary job of the parser is
to keep its nose out of the user's business (for examples of parsers
which forget this rule, see Mush).  Consistency is secondary; the user
spends a lot of time in the parser and will learn its rules quickly

On the other hand, assuming you retain the "quote the whole argument
or none of it" rule, it may be worth applying consistency here instead
of non-meddling; it's very rare for arguments to begin with quotes,
except when the user wants to quote them.  (On the other hand, it's
very common for arguments to *contain* quotes which the user does not
want stripped; see below.)

> No, MOO parsing does not function this way (iobjstr quoting is
> handled exactly the same as dobjstr quoting, the way it should be),
> nor does anything else that I am familiar with.

You are correct; it is Coolmud's verb-dobj-prep-iobj parsing which
works the same way as Coldmud's "verb * prep *" template matching.

Here are some examples of user commands which show why I prefer the
"quote the whole argument or none of it" rule.

	@desc here as A sign on the road says, "Burma Shave."
	whisper The spy told me, "Ken sent me." to dave

MOO mangles both of these.