MUD-Dev
mailing list archive

[ Other Periods  | Other mailing lists  | Search  ]

Date:  [ Previous  | Next  ]      Thread:  [ Previous  | Next  ]      Index:  [ Author  | Date  | Thread  ]

[MUD-Dev] Re: Re: [MUD-Dev] Text Parsing



At 5/30/99 11:39:00 PM, you wrote:
>On Friday, May 28, 1999, Albert wrote:

<snip introduction>

>For a parser that I was developing, I used patterns.  I developed it
>to the point where there was a function for "trying" an input string
>against a particular pattern, which would return an empty array if the
>pattern was not matched, or an array filled with the matches for the
>variable parts of the pattern if it was matched.  It did as much
>processing as possible -- for example, the string:

Hehe, that's what I ended up doing, resorting to patterns and having
the parser try each of them out. Only my patterns are the following:

verb + direct object (i.e. get ball)
verb + indirect object (i.e. kill him)
verb + direct object + indirect object (i.e. give ball to him)
verb + indirect object + direct object (i.e. give him the ball)
verb + string (i.e. say 'hello everybody')

I believe all possible commands are simple variations of the above
mentioned patterns. Conjunctions merely compound the patterns.

The parser would handle conjunctions a bit differently. Basically,
"get ball and stick" would be broken down into "get ball" and
"get stick".

Author: Albert Yi (TheCheeseMan)  ICQ: 14617788
home.earthlink.net/~thecheezeman




_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev




[ Other Periods  | Other mailing lists  | Search  ]