[MUD-Dev] Languages
Jeff Kesselman
jeffk at tenetwork.com
Tue May 27 12:05:27 CEST 1997
At 12:33 PM 5/26/97 PST8PDT, you wrote:
>>I am in fact extremely interested in the the topic that I thought
>>initially started this thread.
>
>>"How to implement my own internal mud language?"
>
>Me too.
Well, let me put in my 2 cents 'cause I don't know how much has been said
yet or is already understod...
This question is really two topice in one...
(1) How do I write a parser for my interpreter or compiler that will
understand my language and produce useful output
(2) How do I design a virtual machine that will take actions based on that
output?
In the beginning... these 2 peices of functionality were often intermingled
(ie BASIC, FORTRAN) with each line being individually recognized and acted
on each time it was visited. This, however, was quickly seen to be A Bad
Idea.
Almost all modern systems have 2 distinct phases.
(1) A compilation phase that takes the high level language code, which is
comparatively difficult for the machine to understand, and converts it to a
machine code (or in some cases an intermiediate form called a "parse tree")
that is much easier for the machine to understand and process (and hence
much faster).
(2) A run-time during which the compiled code is executed.
Some systems, such as threaded systems, will shift back and forth between
the two phases at run-time but they are stll ditinct. No code is executed
that has not first been compiled.
Both language design and machine design are fascinating subjects that many
semesters of college course work are devoted to. I'ld strongly recomend
the two books I mentioned earlier, Tannenbaum's "Machine Organization"
(migt be "Basic Machine Organization" I don't have it hand to check) and
"Crafting a Compiler" to anyone interested in the subjects. Each one is a
text book for a semester's intro work. These are both very formal areas of
COmp Sci with a lot of strong and useful theory behind them (personally I
find them about the most pure Computer Science I have ever done.)
JK
More information about the mud-dev-archive
mailing list