Magnetic Scrolls' magical parser
Greg Munt
greg at uni-corn.demon.co.uk
Mon Apr 28 21:50:49 CEST 1997
On Sun, 27 Apr 1997, Chris Gray wrote:
> [Raz]
> :It even supported the command that Magnetic Scrolls made such a big deal
> :about, namely:
> : > put the pot plant in the plant pot
> :
> :Though, apparently, there's nothing very complicated about that syntax at
> :all =3D)
>
> That's pretty straightforward. My 'putIn' verb just tells you that you
> can't put something into itself.
A pot plant is not a plant pot :) Also, the whole 'big deal' about this
was that 'plant' was able to be used as a verb, a noun *and* an
adjective, IIRC the input was actually:
> plant pot plant in plant pot
This sort of complexity seems to be lacking from the current mud
'mainstream' in its entirety. Most of which I have come across seems to
be parsing such as:
* First word of input is the command, look it up in our hash
table of commands
* Call the function corresponding to the command, passing the
rest of the input (ie everything after the first word) as
parameters to the function
So, you might have function prototypes for your command functions as:
void function (Player player, String parameters);
All command functions would have their own parameter parsing algorithms;
so, for the above example, function 'plant' would be passed 'pot plant in
plant pot' as its parameters.
This is utterly simplistic, and although quite easy to implement, does
not make me happy in any way! I've looked about the web for things on
NLP, but I think I'd need a PhD to understand it all :(
The best I can come up with is to have hash tables of verbs, nouns,
adjectives, adverbs, etc - but beyond that I'm pretty much lost. Is
anyone able to give me a few pointers on this? One of my goals is to have
a parser of *at least* 'Infocom' complexity.
As an aside, does anyone have any comments on the current
rec.games.mud.design 'thing' now making noises in the newsgroups? My
original 'analysis' post was really to suggest a new name for rgm.admin,
because I felt that that was really what it was being used for. I feel
that if rgm.design were to be created, rgm.admin would become nothing more
than a cesspit of spam, ads and flamage.
------------------------------------------------------------------------------
T H E F R O N T I E R S P R O J E C T
http://www.uni-corn.demon.co.uk telnet://linux2.cms.shu.ac.uk:9999
I'll stay out of animals' way if they'll stay out of mine
"Hey you, get off my plate"
More information about the mud-dev-archive
mailing list