MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
[MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa
[Richard Bartle:]
> >for me, the concept of "part of speech" isn't really part
> >of the server. So, my "tables" are just mappings of strings to
> >database items, which includes objects, rooms, code, arrays, etc.
> I find parts of speech useful because they allow single words to
>have different meanings depending on where they are used.
> WIND CLOCK verb
> GET WIND CHIME adjective
> SUMMON WIND noun
>
> It's especially helpful with abbreviations:
> G K get key
> K G kill goblin
> G K F G get key from goblin
> F flee
>
> Using parts of speech, you can point to entirely different objects
>from vocabulary entries by context.
Ah, but you can fake out that sort of thing with proper faking out of
part of speech. I assume that the first word in a command is a 'verb',
and so look it up in the grammar as such. A given word can be in a
grammar as either a verb, in one or more forms, or as a non-verb, which
has no additional information. For verbs like 'get X from Y', I would
store the word 'from' as one of these "non-verbs", and the description
of the 'get from' verb would reference it as its "separator word".
That's likely not a clear description. Here's a short, made-up example:
Verb0(G, "down", function_for_down);
Verb0(G, "in", function_for_in);
Synonym(G, "down", "d");
Synonym(G, "in", "i");
Verb1(G, "put", FindWord(G, "down"), function_for_put_down);
Verb2(G, "put", FindWord(G, "in"), function_for_put_in);
Synonym(G, "put", "p");
With that framework, the following user commands would work:
in; i
down; d
put <noun phrase>, <noun phrase> in <noun phrase>
put <noun phrase> down
p d <noun phrase>
It's all faked out, but works not bad. The first abbreviation conflict
shows up here, however - I use 'i' as an abbreviation for 'inventory',
instead of for 'in'. :-)
--
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA
- Thread context:
- [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa, (continued)
- [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa,
Richard Bartle 76703.3042#compuserve,com, Thu 09 Jul 1998, 16:22 GMT
- [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Fri 10 Jul 1998, 01:58 GMT
- [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa,
Richard Bartle 76703.3042#compuserve,com, Fri 10 Jul 1998, 11:12 GMT
- [MUD-Dev] Re: (fwd) Re: command parsers: a modest proposa,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Sat 11 Jul 1998, 22:35 GMT
- [MUD-Dev] Re: An Introduction,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Wed 08 Jul 1998, 14:16 GMT
[ Other Periods
| Other mailing lists
| Search
]