www.digitalmars.com         C & C++   DMDScript  

D - Request for suggestion on compiler textbooks

reply Liwei Chou <skyjacker mail.educities.edu.tw> writes:
Dear Masters,

I am a undergraduate student who interested in Compiler Design and
Interpreter. I am currently taking a course which assigned the Dragon
one, but I think maybe it's too old for me. I am looking for a new
fashion OOP styled compiler design book and which (of cause)is easy to
follow, because I like to do things in clear OOP way instead of chunks
of data flow.

So...I am asking you masters, do you have any suggestted textbooks which
can let me teach myself the way I want.

Thank You Very Much

L.W.Chou
Mar 08 2004
next sibling parent "Tu Nam" <dreamweaver mail15.com> writes:
First , I'm not master , just a poor programmer ;)
Second, I recommend you to Tiger book from Andrew W.Appel " Modern Compiler
Implementation ". It's a good book and in 3 types : C++/Java and ML .
In regards of OO compiler , I recommend you walk on a bit to Randal Hyde
"Art of Assembly " which it has some chapter about OOP . For source , you
can found on  Assembler Development Kit.
http://webster.cs.ucr.edu/AsmTools/RollYourOwn/
Cause HLA support OOP and it's open source , so you easy to watch what's
going in a compiler. I know , it's assembly , but you can apply it to your C
program too.And plus , write a compiler is not a work as RAD , it require
knowledge and patience.
Some of masters are  " how to implement a OOP in assembly " and some of OOP
docs which you can find :
http://board.win32asmcommunity.net/forumdisplay.php?s=56b60f12c3babab55bb72c54202b5521&forumid=38
Win32 Assembly forum.

Some of master in that will interest you , I believe .
And please forgive me if I wrong , but when a man want to write an OO
compiler , he must knows how to write a compiler first.
And please forgive me again , you don't need to write it from scrach , it
has some excellent tool on NET such as MLRiSC and Gold Parser . They has
some docs about OO too.
Good luck !

"Liwei Chou" <skyjacker mail.educities.edu.tw> wrote in message
news:c2ia8q$104o$1 digitaldaemon.com...
 Dear Masters,

 I am a undergraduate student who interested in Compiler Design and
 Interpreter. I am currently taking a course which assigned the Dragon
 one, but I think maybe it's too old for me. I am looking for a new
 fashion OOP styled compiler design book and which (of cause)is easy to
 follow, because I like to do things in clear OOP way instead of chunks
 of data flow.

 So...I am asking you masters, do you have any suggestted textbooks which
 can let me teach myself the way I want.

 Thank You Very Much

 L.W.Chou
Mar 08 2004
prev sibling parent reply Andy Friesen <andy ikagames.com> writes:
Liwei Chou wrote:
 Dear Masters,
 
 I am a undergraduate student who interested in Compiler Design and
 Interpreter. I am currently taking a course which assigned the Dragon
 one, but I think maybe it's too old for me. I am looking for a new
 fashion OOP styled compiler design book and which (of cause)is easy to
 follow, because I like to do things in clear OOP way instead of chunks
 of data flow.
 
 So...I am asking you masters, do you have any suggestted textbooks which
 can let me teach myself the way I want.
I can't suggest a book because I didn't learn from one, but here's a little toy compiler I'm writing for kicks: <http://ikagames.com/andy/vcompile-08-march-2004.zip> It's all written in Python (just over 2400 lines), so it should be readable and portable. You could also try Jack Crenshaw's compiler page at <http://compilers.iecc.com/crenshaw/>. I don't like his design methodology, but he does build a working compiler and take the reader through it every step of the way. -- andy
Mar 09 2004
parent J C Calvarese <jcc7 cox.net> writes:
Andy Friesen wrote:
...
 You could also try Jack Crenshaw's compiler page at 
 <http://compilers.iecc.com/crenshaw/>.  I don't like his design 
 methodology, but he does build a working compiler and take the reader 
 through it every step of the way.
 
  -- andy
Also, someone has converted Crenshaw's tutorial from Pascal/M68000 source into ANSI-C for the x86 CPU. It's available in the Files section of QDepartment (look for 'Crenshaw's "Let's Build a Compiler"'), http://groups.yahoo.com/group/QDepartment/. I think you'll have to join to download it. -- Justin http://jcc_7.tripod.com/d/
Mar 09 2004