[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Cardinal-dev] existing parrot compilers
From: |
Dan Sugalski |
Subject: |
Re: [Cardinal-dev] existing parrot compilers |
Date: |
Thu, 9 May 2002 13:22:25 -0400 |
At 1:12 PM -0400 5/9/02, Pat Eyler wrote:
i'm trying to learn more about compiler writing by looking at the scheme
and mini-perl compilers in the languages sub-dir of parrot. Are these
good approaches? Or is there another example to look at (I'm also looking
at flim, a small front-end to gcc)?
You might find it more useful (though admittedly more expensive) to
grab a textbook or other reference, rather than working from code for
something like this.
Just off the top of my bookshelf, I'd recommend _Modern Compiler
Design_ by Dick Grune, Henri E. Bal, and Ceriel J. H. Jacobs.
Published by Wiley, mine has an ISBN of 0-471-97697-0. (Some folks
may point you at the dragon book but don't listen to them--it's not
that good, despite its status as a classic)
FWIW, there are minimally three steps in a compiler:
1) Turn text into tokens
2) Turn tokens into AST
3) Turn AST into bytecode/native code
Granted, awfully big steps, but... :)
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
address@hidden have teddy bears and even
teddy bears get drunk