<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: mud grammar --> <!--X-From-R13: "Qnegre F Eubpx" <pgfbNhzvnpf.hzq.rqh> --> <!--X-Date: from fabius.globecomm.net [207.51.48.6] by mx4.ibm.net id 858073144.95724-1 Tue Mar 11 09:39:04 1997 --> <!--X-Message-Id: 199703110944.JAA18696#lupa,umiacs.umd.edu --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: mud grammar</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:ctso#umiacs,umd.edu"> </head> <body background="/backgrounds/paperback.gif" bgcolor="#ffffff" text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000"> <font size="+4" color="#804040"> <strong><em>MUD-Dev<br>mailing list archive</em></strong> </font> <br> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00086.html">Previous</a> | <a href="msg00088.html">Next</a> ] Thread: [ <a href="msg00128.html">Previous</a> | <a href="msg00091.html">Next</a> ] Index: [ <A HREF="author.html#00087">Author</A> | <A HREF="#00087">Date</A> | <A HREF="thread.html#00087">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: mud grammar</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>></LI> <LI><em>Subject</em>: Re: mud grammar </LI> <LI><em>From</em>: "Carter T Shock" <<A HREF="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</A>></LI> <LI><em>Date</em>: Tue, 11 Mar 1997 04:34:37 -0500</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> Hrmmm... I think we have a misunderstanding as to what a "context free grammar" is. As far as the purple dinosaur goes, in all of the examples, whether you are shooting in the next room, the left eye or whatever, the meaning of "shoot" doesn't change. lex/yacc grammars can easily capture the meaning of modifiers such as "with" or "in". The "whisper"/"say" example parses nicely as well. I agree that some commands should not be useful in all parts of the mud. It seems unfair to the player to have the mud simply refuse to recognize your news command when not in the post office. For a consistant interface with the player shouldn't the mud recognize the syntax of the command as valid, but simply deny the command's execution (tell them that the command doesn't work here as opposed to pretending the command doesn't exist). A agree wholeheartedly with the lament about whether to use "push" or "press" for the damned button (that may or may not respond to the keyword "button", but that's another issue entirely). It is the grammar that is context free; individual sentences are of course context sensitive. (or am I _really_ making a fool of myself?) The point about using a natural language processor is also well taken, but I don't think that's what you've implemented there. If you allowed natural language, I should be able to use any synonym of shoot and purple dinosaur... Let's consider when the user tries: "use gun on purple dinosaur" This is an example of context sensitive grammar. What does "use" mean? Shoot the dinosaur? Whack him over the head with it? Scratch his tummy with the butt of the rifle? It's ambiguous. Natural language processors try to do the "right thing" in these situations (is the dinosaur friend or foe? Is the rifle loaded? Are you a decent shot? Does his tummy itch?). If, however, you allow exactly one meaning for "use" (let's say it means "shoot") then the sentence is unambiguous and the grammar context free. Finally, don't think that I'm some devotee of lex/yacc. No reason you can't cook up your own parser. I'm just suggesting that it offers a relatively easy and structured implementation of a grammar. Also, once created, it's easy to modify the grammar (change meanings, add new verbs, etc). It is similar to the question of how you handle your mud's contents. Depending on how you've implemented the mud's catalog of items, "where sword" may do an iterative search of the entire mud contents, or it may do an SQL query into a set of tables. Both work, the difference is a question of style and portability -- portability not in the sense of cross-platform compilation, but in the sense of when someone else looks at your code if they know lex/yacc they will be able to understand the mud command structure quickly rather than having to pore over your home-grown parser. </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00086.html">Re: Just a bit of musing</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00088.html">Re: Just a bit of musing</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00128.html">Re: Just a bit of musing (VRML)</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00091.html">Re: mud grammar</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00087"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00087"><STRONG>Thread</STRONG></A></LI> </UL> </LI> </UL> <!--X-BotPNI-End--> <!--X-User-Footer--> <!--X-User-Footer-End--> <ul><li>Thread context: <BLOCKQUOTE><UL> <LI><STRONG>Re: Room coding</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00111" HREF="msg00111.html">Re: Room coding</A></strong>, S001GMU <a href="mailto:S001GMU#nova,wright.edu">S001GMU#nova,wright.edu</a>, Fri 14 Mar 1997, 23:19 GMT </LI> <LI><strong><A NAME="00119" HREF="msg00119.html">Re: Room coding</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 16 Mar 1997, 04:14 GMT </LI> </ul> </LI> <LI><strong><A NAME="00093" HREF="msg00093.html">Re: Just a bit of musing (VRML)</A></strong>, Dmitri Kondratiev <a href="mailto:dima#paragraph,com">dima#paragraph,com</a>, Wed 12 Mar 1997, 17:22 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00128" HREF="msg00128.html">Re: Just a bit of musing (VRML)</A></strong>, claw <a href="mailto:claw#null,net">claw#null,net</a>, Tue 18 Mar 1997, 01:49 GMT </LI> </UL> </LI> <LI><strong><A NAME="00087" HREF="msg00087.html">Re: mud grammar</A></strong>, Carter T Shock <a href="mailto:ctso#umiacs,umd.edu">ctso#umiacs,umd.edu</a>, Tue 11 Mar 1997, 17:39 GMT <UL> <li><Possible follow-up(s)><br> <LI><strong><A NAME="00091" HREF="msg00091.html">Re: mud grammar</A></strong>, Adam Wiggins <a href="mailto:nightfall#inficad,com">nightfall#inficad,com</a>, Wed 12 Mar 1997, 12:46 GMT </LI> <LI><strong><A NAME="00092" HREF="msg00092.html">Re: mud grammar</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Wed 12 Mar 1997, 13:23 GMT </LI> <LI><strong><A NAME="00094" HREF="msg00094.html">Re: mud grammar</A></strong>, Alex Oren <a href="mailto:alexo#europa,com">alexo#europa,com</a>, Wed 12 Mar 1997, 23:42 GMT </LI> <LI><strong><A NAME="00095" HREF="msg00095.html">Re: mud grammar</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Thu 13 Mar 1997, 03:10 GMT </LI> </UL> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>