<!-- MHonArc v2.4.4 --> <!--X-Subject: [MUD-Dev] World-file parsing and RTTI? --> <!--X-From-R13: Fur Oeebj <neebjNgeryyrobet.znvy.gryvn.pbz> --> <!--X-Date: Wed, 10 Feb 1999 10:45:36 -0800 --> <!--X-Message-Id: Pine.LNX.4.04.9902100044360.430-100000#t8o3p24,telia.com --> <!--X-Content-Type: text/plain --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, [MUD-Dev] World-file parsing and RTTI?</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:arrow#trelleborg,mail.telia.com"> </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="msg00375.html">Previous</a> | <a href="msg00377.html">Next</a> ] Thread: [ <a href="msg00381.html">Previous</a> | <a href="msg00377.html">Next</a> ] Index: [ <A HREF="author.html#00376">Author</A> | <A HREF="#00376">Date</A> | <A HREF="thread.html#00376">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>[MUD-Dev] World-file parsing and RTTI?</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> <LI><em>Subject</em>: [MUD-Dev] World-file parsing and RTTI?</LI> <LI><em>From</em>: The Arrow <<A HREF="mailto:arrow#trelleborg,mail.telia.com">arrow#trelleborg,mail.telia.com</A>></LI> <LI><em>Date</em>: Wed, 10 Feb 1999 19:45:15 +0100 (CET)</LI> <LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI> </UL> <!--X-Head-of-Message-End--> <!--X-Head-Body-Sep-Begin--> <HR> <!--X-Head-Body-Sep-End--> <!--X-Body-of-Message--> <PRE> For my MUD, I have a simple yet pretty good (IMHO :) format for world-files. A file contains one or more objects (monsters, locations, etc.), and each object have a list of properties (key-value pairs). Right now I have a simple lexer in flex that search for certain keywords like "monster", "location", "item". When the parser finds such a keyword I create a new instance of that specific C++ class. My goal for the parser is to make it as flexible as possible, all anyone using my code should have to do, is to add a line to a table. Now comes the question: What is the best way to do this? I have though about using RTTI, but to my knowledge there exists no platform/compiler independant system. I could limit the MUD to just be compileable with gcc or egcs, but I don't like limiting myself in any way. Discussion? / Joachim ====================================================================== The Arrow Email: arrow#trelleborg,mail.telia.com Joachim Pileborg WWW: <A HREF="http://w1.410.telia.com/~u41003102/">http://w1.410.telia.com/~u41003102/</A> ====================================================================== "They say I don't give a shit about anything," -- Magnus Uggla "but I don't give a shit about that." (translated from swedish) </PRE> <!--X-Body-of-Message-End--> <!--X-MsgBody-End--> <!--X-Follow-Ups--> <HR> <ul compact><li><strong>Follow-Ups</strong>: <ul> <li><strong><A NAME="00377" HREF="msg00377.html">[MUD-Dev] Re: World-file parsing and RTTI?</A></strong> <ul compact><li><em>From:</em> Mark Gritter <mark#erdos,Stanford.EDU></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00375.html">[MUD-Dev] Re: optimizing code</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00377.html">[MUD-Dev] Re: World-file parsing and RTTI?</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00381.html">[MUD-Dev] Re: pet peeves</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00377.html">[MUD-Dev] Re: World-file parsing and RTTI?</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00376"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00376"><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-Dev] Re: pet peeves</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00654" HREF="msg00654.html">Re: [MUD-Dev] Re: pet peeves</A></strong>, J C Lawrence <a href="mailto:claw#varesearch,com">claw#varesearch,com</a>, Thu 18 Mar 1999, 18:07 GMT </LI> </ul> </LI> <LI><strong><A NAME="00378" HREF="msg00378.html">[MUD-Dev] pet peeves</A></strong>, diablo <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 11 Feb 1999, 21:29 GMT <UL> <LI><strong><A NAME="00379" HREF="msg00379.html">[MUD-Dev] Re: pet peeves</A></strong>, diablo <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 11 Feb 1999, 21:51 GMT <UL> <LI><strong><A NAME="00381" HREF="msg00381.html">[MUD-Dev] Re: pet peeves</A></strong>, Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Thu 11 Feb 1999, 23:02 GMT </LI> </UL> </LI> </UL> </LI> <LI><strong><A NAME="00376" HREF="msg00376.html">[MUD-Dev] World-file parsing and RTTI?</A></strong>, The Arrow <a href="mailto:arrow#trelleborg,mail.telia.com">arrow#trelleborg,mail.telia.com</a>, Wed 10 Feb 1999, 18:45 GMT <UL> <LI><strong><A NAME="00377" HREF="msg00377.html">[MUD-Dev] Re: World-file parsing and RTTI?</A></strong>, Mark Gritter <a href="mailto:mark#erdos,Stanford.EDU">mark#erdos,Stanford.EDU</a>, Wed 10 Feb 1999, 22:55 GMT </LI> </UL> </LI> <LI><strong><A NAME="00375" HREF="msg00375.html">[MUD-Dev] Re: optimizing code</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 10 Feb 1999, 02:41 GMT <LI><strong><A NAME="00371" HREF="msg00371.html">[MUD-Dev] code profiling</A></strong>, Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Tue 09 Feb 1999, 06:00 GMT <UL> <LI><strong><A NAME="00373" HREF="msg00373.html">[MUD-Dev] optimizing code</A></strong>, diablo <a href="mailto:diablo#best,com">diablo#best,com</a>, Tue 09 Feb 1999, 06:31 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>