🔒 Locked
Compiler Design
Advertisement
Original Post
I''m searching around for building compilers and I found with book. Its called Compiler Design in C, by Allen I. Hulub. Have any of you heard of this book.
I just started reading it and it has already revealed alot to me. The first few pages in chapter 1 start talking about the compiler structure.
This is intresting, This book says that some compilers don''t have preprocessors; others generate ASM code in a second pass, optimize the ASM code directly, and don''t have a forth pass. Others generate binary instructions directly, with out an ASCII intermediate language ( ASM ).
I would like to play around and make a goofy little programming language that runs a run time, like Java. Some real simple to have run and learn with.
Author: Aho and some others. (Aho is the "A" in "Awk"; Kernighan - of K & R fame - is the "K").
Title: Compilers: Principles, Techniques and Tools. Also see Compilers: Principles and Practice (aka Son of the Dragon Book).
You might be able to find it (or them) in the public library, and definitely in a university library (so long as they have a CS program).
Title: Compilers: Principles, Techniques and Tools. Also see Compilers: Principles and Practice (aka Son of the Dragon Book).
You might be able to find it (or them) in the public library, and definitely in a university library (so long as they have a CS program).
If you fancy a different spin on the idea, get to Catseye Technologies or the Esoteric Languages Database.
Or if you want to take it a bit more seriously but (like me) are too skint to buy books, take a look at Let''s Build A Compiler by Jack Crenshaw or this tute.
www.coldcity.com
code, pics, life
Or if you want to take it a bit more seriously but (like me) are too skint to buy books, take a look at Let''s Build A Compiler by Jack Crenshaw or this tute.
www.coldcity.com
code, pics, life
I have got a question on the Dragon Book.
Will it teach me how to actually build a working compiler or will it just the general principles and techniques (feturing pseudo code...) ?
Will it teach me how to actually build a working compiler or will it just the general principles and techniques (feturing pseudo code...) ?
There are things called book reviews and publisher websites... And you don''t have to wait until someone feels willing/capable to answer your question.
Anyway, the Son of the Dragon Book contained a lot of code for implementing a Pascal compiler (I last looked at it in ''97 or ''98). I''ve never read the Dragon Book, and choose a more implementation-oriented text from the library a week ago (which, incidentally, also builds a Pascal compiler, among others). The book I borrowed is called Writing Compilers and Interpreters.
Anyway, the Son of the Dragon Book contained a lot of code for implementing a Pascal compiler (I last looked at it in ''97 or ''98). I''ve never read the Dragon Book, and choose a more implementation-oriented text from the library a week ago (which, incidentally, also builds a Pascal compiler, among others). The book I borrowed is called Writing Compilers and Interpreters.
Apart from the Dragon Book, I particularly like ''Programming Language Processors in Java: Compilers and Interpreters'' by David A. Watt, Deryck F. Brown, Deryck Brown, ISBN: 0130257869
see: http://www.amazon.com/exec/obidos/ASIN/0130257869/002-8432514-2450437#product-details
It''s a good beginner book that takes a practical approach to compiler development, and is easy to follow even if you aren''t using Java.
Paul
see: http://www.amazon.com/exec/obidos/ASIN/0130257869/002-8432514-2450437#product-details
It''s a good beginner book that takes a practical approach to compiler development, and is easy to follow even if you aren''t using Java.
Paul
After reading into alot of the basic ideas with this book, making a compiler dons''t seam to hard. My book makes frequent references to Flex and Bisonm, with some documentation about them. So all in all, it seams like so far, the book is a good tutorial.
I like Java. But I would realy like to get into computer science. I would like to, if not make, at least come close to inventing my own C/C++ like language.
I like Java. But I would realy like to get into computer science. I would like to, if not make, at least come close to inventing my own C/C++ like language.
Sounds like you might be interested in A Retargetable C Compiler: Design and Implementation. This book explains the details in the implementation of LCC, a complete ANSI C compiler with back-ends for several platforms including x86. It's a pretty good book if you want to see actual implementation concerns and issues, although some of the methods used are a bit old-fashioned.
But if you only buy one book on compiler design/construction, by all means go for the Dragon book. You need to understand the theory behind this stuff well.
[edited by - spock on October 3, 2002 8:36:28 AM]
But if you only buy one book on compiler design/construction, by all means go for the Dragon book. You need to understand the theory behind this stuff well.
[edited by - spock on October 3, 2002 8:36:28 AM]
quote:
Original post by daerid
get the Dragon Book (Compilers: Principles, Techniques, and Tools). It's hardback, about $80, but it's the compiler bible.
Actally, a cheaper paperback edition do exist (or at least did when I bought it): the Addison-Wesley "World Student Series Edition". It's an unabridged reprint, but I don't think it is available in the US.
[edited by - spock on October 3, 2002 8:33:47 AM]
I glanced over "Compiler Design in C" in my library recently when I went to pick up the Dragon book that everyone was recommending. It seems to be focused a bit more on the practical building of a compiler, while the Dragon book focuses heavily on the theoretical aspect. It looked good, however, and is a little more recent than the Dragon book.
Perhaps you should start with one, and then read the other? They''re gigantic books, but this is what I intend to do myself.
"Don''t be afraid to dream, for out of such fragile things come miracles."
Perhaps you should start with one, and then read the other? They''re gigantic books, but this is what I intend to do myself.
"Don''t be afraid to dream, for out of such fragile things come miracles."
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement