msg00811.html

1999Q4/msg00811.html · 8.5 KB

From the archive 1999Q4.zip

Download the archive   « Back to the archive contents

<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Storing tokens with flex &#38; bison -->
<!--X-From-R13: "Xba O. Znzoreg" <wyflfvapNvk.argpbz.pbz> -->
<!--X-Date: Sat, 01 Jan 2000 17:05:30 &#45;0800 -->
<!--X-Message-Id: 002201bf54bb$8cefb340$020101df@JonLambert -->
<!--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-Dev] Storing tokens with flex &amp; bison</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:jlsysinc#ix,netcom.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>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00809.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00812.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00804.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00814.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00811">Author</A>
&nbsp;|&nbsp;<A HREF="#00811">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00811">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Storing tokens with flex &amp; bison</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Storing tokens with flex &amp; bison</LI>
<LI><em>From</em>: "Jon A. Lambert" &lt;<A HREF="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</A>&gt;</LI>
<LI><em>Date</em>: Sat, 1 Jan 2000 19:46:39 -0500</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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>
Christer Enfors wrote:
On Sat, 1 Jan 2000, Chris Turner wrote:
&gt;
&gt;&gt; 
&gt;&gt; Well this would always work with what you have already.  It might be a bit
&gt;&gt; slower.  If you want a real speed increase, you would be better off compiling
&gt;&gt; the function into some form of byte-code, which could be run though without
&gt;&gt; needing to parse anything.
&gt;
&gt;I thought my supposed stored linked list of tokens was considered
&gt;"byte-code", but I guess it's not that simple. Looks like I better hit the
&gt;Dragon book some more, I bet this sort of stuff is explained in there
&gt;somewhere.
&gt;

That stored list would be called a pre-tokenized stream.  It's how the
old MS-Basic and C64 Basic used to save code when exiting the editor.  
You can do much better though.  The output of Bison can be:

a) An interpreter
b) Native machine code 
c) A byte code for a virtual machine 

Both b) and c) are intermediate forms of storage.  Machine code
probably needs to be linked and a byte code needs a VM to 
execute it.  The output from bison could probably be other things 
as well.  

&gt;&gt; 
&gt;&gt; The O'Reilly Lex &amp; Yacc book is well written and contains many tutorials.
&gt;
&gt;Right, but it doesn't have a tutorial that involves storing the source
&gt;code in any format for later execution, which is what I'm looking for in
&gt;this case.


Nod.  In order to use a byte code, one must first design and implement
a virtual machine, or target it for an existing VM (i.e. Java)
I think what you are looking for is documentation on designing Virtual
Machines.  The way I learned was by snooping through all the notes,
examples, and syllabus (syllabi?) left out on the net by university professors
teaching it.  For some reason the CS course numbers (505 and 565) seem
familar, though it has been a couple years.  :-( 
There's Sun's Java VM doc, the Smart tiny VM, the Luck VM, the ANTLR 
tutorial by Scott Stanchfield(?) that implements a language called
X.  I don't know offhand of any books that cover VM design in depth.  

--
--*     Jon A. Lambert - TychoMUD Email: jlsysinc#nospam,ix.netcom.com     *--
--*     Mud Server Developer's Page &lt;<A  HREF="http://jlsysinc.home.netcom.com">http://jlsysinc.home.netcom.com</A>&gt;      *--
--* "No Free man shall ever be debarred the use of arms." Thomas Jefferson *--





_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</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="00818" HREF="msg00818.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>
<ul compact><li><em>From:</em> Greg Miller &lt;gmiller#classic-games,com&gt;</li></ul>
<li><strong><A NAME="00814" HREF="msg00814.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>
<ul compact><li><em>From:</em> Christer Enfors &lt;enfors#swipnet,se&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00809.html">[MUD-Dev] JavaWorld: Build an object database</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00812.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00804.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00814.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00811"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00811"><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] Storing tokens with flex &amp; bison</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<LI><strong><A NAME="00812" HREF="msg00812.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Sun 02 Jan 2000, 01:05 GMT
<UL>
<LI><strong><A NAME="00815" HREF="msg00815.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sun 02 Jan 2000, 04:45 GMT
<UL>
<LI><strong><A NAME="00830" HREF="msg00830.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Ola Fosheim Grøstad <a href="mailto:olag#ifi,uio.no">olag#ifi,uio.no</a>, Mon 03 Jan 2000, 16:44 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
<LI><strong><A NAME="00804" HREF="msg00804.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 01 Jan 2000, 19:53 GMT
</LI>
<LI><strong><A NAME="00811" HREF="msg00811.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Sun 02 Jan 2000, 01:05 GMT
<UL>
<LI><strong><A NAME="00814" HREF="msg00814.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Christer Enfors <a href="mailto:enfors#swipnet,se">enfors#swipnet,se</a>, Sun 02 Jan 2000, 04:15 GMT
</LI>
<LI><strong><A NAME="00818" HREF="msg00818.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Greg Miller <a href="mailto:gmiller#classic-games,com">gmiller#classic-games,com</a>, Sun 02 Jan 2000, 17:26 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00819" HREF="msg00819.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sun 02 Jan 2000, 18:08 GMT
<UL>
<LI><strong><A NAME="00820" HREF="msg00820.html">Re: [MUD-Dev] Storing tokens with flex &amp; bison</A></strong>, 
Kevin Littlejohn <a href="mailto:darius#connect,com.au">darius#connect,com.au</a>, Sun 02 Jan 2000, 18:42 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>

Site Stats

Snippets: 1791
Codebases: 571