Compilers/Interpreters books?

H

Hrvoje Blazevic

Are there any good books on Interpreter/Compiler construction, using
Python as a defining language out there? Something like Essentials of
Programming Languages 2e ?

I would appreciate some pointers

-- Hrvoje
 
H

Hrvoje Blazevic

Hrvoje said:
Are there any good books on Interpreter/Compiler construction, using
Python as a defining language out there? Something like Essentials of
Programming Languages 2e ?

I would appreciate some pointers

-- Hrvoje

After 48+ hours without answer, am I to assume that no such books exist,
or that the Python itself is not up to this task?

-- Hrvoje
 
D

David Fraser

Hrvoje said:
After 48+ hours without answer, am I to assume that no such books exist,
or that the Python itself is not up to this task?

-- Hrvoje
Neither, but I suspect you'll find more online resources than books
 
P

phil hunt

I'm currently writing a compiler in Python, and have previously
written a code generator in it, so I can verify it is up to the
job.

A good reference for compiler writing is the "Dragon Book", more
formally _Compilers Principles, Techniques and Tools_ by Aho,
Sethi and Ullman. It doesn't give Python code examples, but you
don't need them; once you know the concepts, you can apply them in
any language.
 
O

Ognen Duzlevski

Hrvoje Blazevic said:
After 48+ hours without answer, am I to assume that no such books exist,
or that the Python itself is not up to this task?

Hi Hrvoje,

I am curently writing a flowcharting tool (for C) in Python. It is up to the task. There are many books on compiler
construction, some online resources (see the resource on parsing from python.org, there is also a free online book
linked from there). I am not sure if there is a book on compiler construction that addresses the implementation in
Python though. I think it is more important for you to be familiar with the theory behind compilers and the
implementation should then be easier, regardless of the language. Others have already pointed out the basic literature.

Ognen
 
D

Daniel Yoo

:> Hrvoje Blazevic wrote:
:>> Are there any good books on Interpreter/Compiler construction, using
:>> Python as a defining language out there? Something like Essentials of
:>> Programming Languages 2e ?

: I am not sure if there is a book on compiler construction that addresses the implementation in
: Python though. I think it is more important for you to be familiar with the theory behind compilers and the
: implementation should then be easier, regardless of the language. Others have already pointed out the basic literature.

Agreed; a lot of the concepts of interpreters have little to do with
the defining language. Essentials of Programming Languages makes this
point clear, as the material can be easily translated to another
language like ML. (And at times, it feels like EOPL was originally
written with ML in mind... *grin*)


You may want to look at Structure and Interpretation of Computer
Programs:

http://mitpress.mit.edu/sicp/

I had written a translation of the Scheme interpreter into Python a
long long time ago; I think it still runs, though. *grin* Here's a
link:

http://hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top