<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: mud grammar --> <!--X-From-R13: ptNnzv-pt.UenlEntr.Sqzbagba.OP.QO (Quevf Uenl) --> <!--X-Date: from tacitus.globecomm.net [207.51.48.7] by mx01.ca.us.ibm.net id 858219102.58282-1 Thu Mar 13 02:11:42 1997 --> <!--X-Message-Id: 9703121417.7v7u@ami-cg.GraySage.Edmonton.AB.CA --> <!--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:cg#ami-cg,GraySage.Edmonton.AB.CA"> </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="msg00095.html">Previous</a> | <a href="msg00097.html">Next</a> ] Thread: [ <a href="msg00095.html">Previous</a> | <a href="msg00124.html">Next</a> ] Index: [ <A HREF="author.html#00096">Author</A> | <A HREF="#00096">Date</A> | <A HREF="thread.html#00096">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>: <A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A> (Chris Gray)</LI> <LI><em>Date</em>: Wed, 12 Mar 97 07:17:46 MST</LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> :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... Well, yes, but of course this is a computer program, so you can only use synonyms that have been defined for the various terms. I don't find that too different from a natural language - a listener only understands synonyms that they are familiar with. :"use gun on purple dinosaur" Well, I think of 'use' as a very generic verb. It should do little other than look up on the gun and the dinosaur, properties that tell it what it should do. This could be any of the examples that you discuss. So, as you say, the syntactic structure of the command is context free, but the semantic content of it isn't. I'm not feeling too bright this morning (the candidate I chose lost out in our provincial election yesterday!), so I'll leave it to someone else to find a relevant context sensitive example. :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. I will comment that I, for one, would not find a lex/yacc system easier to read than my home-grown one (obviously!). However, I would also claim that the same would be true of anyone who has never used lex/yacc, and of many who have. Given documenation that says that a "Verb1" form takes commands like "verb [separator] [art] {adj} <noun> [punctuation]" and "verb [art] {adj} <noun> [separator] [punctuation]", with examples like "pick the big red book up." and "Pick up the big red book", it seems pretty straightforward to add a new "put down" verb. Much easier for most folks that reading documentation that talks about avoiding shift/reduce conflicts! -- Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA </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="msg00095.html">Re: mud grammar</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00097.html">Re: Just a bit of musing</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00095.html">Re: mud grammar</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00124.html">Re: mud grammar</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00096"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00096"><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: mud grammar</STRONG>, <EM>(continued)</EM> <ul compact> <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> <LI><strong><A NAME="00096" HREF="msg00096.html">Re: mud grammar</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 13 Mar 1997, 10:11 GMT </LI> <LI><strong><A NAME="00124" HREF="msg00124.html">Re: mud grammar</A></strong>, claw <a href="mailto:claw#null,net">claw#null,net</a>, Tue 18 Mar 1997, 01:26 GMT </LI> <LI><strong><A NAME="00130" HREF="msg00130.html">Re: mud grammar</A></strong>, Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Tue 18 Mar 1997, 12:53 GMT </LI> <LI><strong><A NAME="00142" HREF="msg00142.html">Re: mud grammar</A></strong>, claw <a href="mailto:claw#null,net">claw#null,net</a>, Thu 20 Mar 1997, 00:16 GMT </LI> <LI><strong><A NAME="00152" HREF="msg00152.html">Re: mud grammar</A></strong>, Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Thu 20 Mar 1997, 15:01 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>