[MUD-Dev] Text Parsers
efindel at earthlink.net
Fri Dec 15 13:39:13 New Zealand Daylight Time 2000
Thursday, December 14, 2000, 9:27:45 AM, Darren Henderson <darren at nighttide.net> wrote:
> On Wed, 13 Dec 2000 szii at sziisoft.com wrote:
>> Any recommendations? Doesn't have to be a natural-language parser,
>> but something (preferably cheap/free/open-source) that is relatively
>> easy to implement and extend for a text-based RPG framework. Could
>> code it from scratch, but if something's available I'd prefer to
>> spend my time extending the framework rather than reinventing the
> What kind of parsing are you looking for? At the simplest level you
> can break an input line on spaces and do with the pieces as you
> would. Or do you want something more complex?
> mudos, (http://www.mudos.org/), has text parsing, ("get the third
> green ball from the purple sack") capabilities built in. Can't really
> speak to the ease of implementation as it seems to generate a verbose
> style of interaction; which I personally don't care for.
One thing to remember with it, though, is that much of the verbiage is
optional. For example, the 'the's in your example can be handled by
the parser, but aren't required, so you could do:
get third green ball from purple sack
If there's only one ball and one sack, you could do:
get ball from sack
For that matter, if I remember right, the MudOS parser does a deep
search of the area for targets of commands, so if there's only one
ball in the room, and it's in the sack, you can do:
and the parser will automatically figure out that you mean the ball
that's in the sack.
Thus, in most cases you're not required to be more verbose than in
most muds today, and in some cases, it may be less verbose.
> It doesn't
> look to be overly difficult however if you are comfortable with lpc
> code bases. It does require the objects being manipulated to have
> interface code, which isnt as nasty as it might seem since you can
> take advantage of inheritance etc.
> Its essentially infinitely extendable.
Somewhere at home, I have a parser that I wrote in LPC that has
similar capabilities to what the MudOS parser did back then. If
anyone's interested, I'd be glad to give them a copy.
|\ _,,,---,,_ Travis S. Casey <efindel at earthlink.net>
ZZzz /,`.-'`' -. ;-;;,_ No one agrees with me. Not even me.
|,4- ) )-,_..;\ ( `'-'
MUD-Dev mailing list
MUD-Dev at kanga.nu
More information about the MUD-Dev