TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: FERNANDO ARIEL GONT
from: JOHN STEPHENSON
date: 1998-03-28 10:14:00
subject: Problem to make a compil

 JS> If you see a later "yeah", you'll have the "yeah" symbol
 JS> information saying where yeah refers to. I hope that you're
 JS> writing this compiler in a high level language (ie Pascal or C)!
 FAG> Why? :) I think I'll do it in asm... just because I like it.. :)
 
Crazy. :)
 
 FAG> I think I should compile the code in several steps
 JS> In this case it's not necessary. However, if you want to put in
 FAG> Why?
 FAG> I mean, first you leave space for the labels (first pass), and then
 FAG> you fill this space (second pass).
 
That's not possible for doing smart jumps. Ideally, you shouldn't leave 
more than the required space for the jumps. If you only need to jump 
080h (-128) to 07F (+127) away then you should use the short jump. In
that way, you can't just "leave space", because you don't know if you
should leave 1, 2 or 4 bytes to make the jump.
 
 JS> I'm in the process of trying to write a high-level single-pass
 JS> compiler. If anyone knows anything on compilers, I'd love to talk
 JS> to them.
 
 FAG> Whenver you finish it, let me know to try it (if it's shareware,
 FAG> freeware or public domain, of course..)
 
It's for an interpreted language. The only reason I use the word compiler
is because the interpreted language is sufficiently low-level (bearing
strong resemblance to intel op codes). [the only difference between it
and a "real" compiler will be the opcodes that the code generater writes]
I'm coming to the realization that I have to build sophisticated parse 
trees and although I still can make it single pass, it will *have* to 
link. I really wish I had more time to work on it...
 FAG> I'd like to hear your better ideas to do it, would also be
 FAG> pleased if you'd have any internet addresses about how to make
 FAG> compilers (.PDF, .TXT, .DOC, .HTM, .WHATEVER).
 JS> Same here. Make sure to pass along any info to me. I know that
 JS> there are computer books available on the subject, but they also
 JS> carry high prices.
 FAG> Ok, same to you! :)
 
I just recently took a look at the textbook for a compiler course, and
I have to say, the one I saw was horrible. I did find some good material
on lexical/syntax/semantic levels of interpretation, and symbol tables
and expression/parse trees while looking around for the keyword "parse 
tree" using excite. I think it was lecture notes from a compiler writing
course.
However, all of that material is much more applicable to a high level
compiler.
                                       - DarkFire 
[John Stephenson (an INTP), Fingerprint: 66BE3A3B6EEE9A5B-48001A32901ECA21]
[Composed at 3:24:26p on 1998-03-28 (UTC) using PGPWave v1.24a Beta]
--- Maximus 2.01wb
---------------
* Origin: *Synthesis* Kingston, Ont., Canada! (1:249/127)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.