New Mob/World/Etc format: Bison and You

From: Chris Jacobson (fear@ATHENET.NET)
Date: 05/02/98


Well, I've been looking through BIND 8.1, and `named' source code.

`named' uses Bison to generate a parser for its preferences file.  I've
been considering using Bison to generate a C-syntax-ish parser for my own
lib files.

Is there any interest in this out there?  Perhaps someone else already
experienced with Bison able to give a few hints?  I've been reading the
.info files for Bison, still am actually, but I hope to start working
with it soon.

I wouldn't recommend this as the future for world/mob/obj file formats
for CircleMUD, as it would require knowledge of bison to be able to
modify/add to/remove from the format.  Plus it requires Bison itself
(which is available for every platform, but not quite as easy to use on
some as Makefiles provide)

Also, I've been thinking, if the syntax is fairly easy to work with, I
might just write up my own parser, since Bison is really meant for more
complex systems.


Sample format: (model still being refined)

Room #0 {
     name = "The Void";
     terrain = CITY;
     desc = "   You don't think that you are not floating in nothing.
You can see
     exits = {
          up = {
               to = 3001;
               desc = "The Temple of Midgaard floats above you.
          };
     };
};
Room #1 {
     name = "Limbo";
     terrain = CITY;
     flags = { INDOORS };
     desc = "   You are floating in a formless void, detached from all
sensation of physical\n
which fades into the relative
edges or shadow.
darkness.
};

- Çhris Jacobson

PS: think it is really necessary to have ; after a } which closes a
structure?  (of course, having a ; after a } that closes an item-list);

PPS: format is ultracompactable into an unreadable streamable string!  :-)

Room#0{name="The Void";terrain=CITY;desc = "   You don't think that you
are not floating in nothing.  You can see
above you.";exits={up={to=3001;desc="The Temple of Midgaard floats above
you.
="
You are floating in a formless void, detached from all sensation of
physical\n
the relative
shadow.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST