473,500 Members | 1,664 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compilers/Interpreters books?

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

Jul 18 '05 #1
6 2571
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 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

Jul 18 '05 #2
Hrvoje Blazevic wrote:
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 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

Neither, but I suspect you'll find more online resources than books
Jul 18 '05 #3
>Hrvoje Blazevic wrote:
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 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?


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.

--
"It's easier to find people online who openly support the KKK than
people who openly support the RIAA" -- comment on Wikipedia
(Email: zen19725 at zen dot co dot uk)
Jul 18 '05 #4
Hrvoje Blazevic <hr****@despammed.com> wrote:
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 would appreciate some pointers

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
Jul 18 '05 #5
Ognen Duzlevski <ma****@ukato.freeshell.org> wrote:
: Hrvoje Blazevic <hr****@despammed.com> wrote:
:> 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/
Jul 18 '05 #6
Ah! I completely forgot to mention: someone has written a C compiler
in Python:

http://people.cs.uchicago.edu/~varmaa/mini_c/

Atul documents the tools he had used to write the compiler, including
PLY (Python Lex-Yacc).

Hope this helps!
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2141
by: Maciej Sobczak | last post by:
Hi, I'm interested in embedding the Python interpreter in a C++ application. What I miss is the possibility to create many different interpreters, so that the stuff that is running in one...
2
2156
by: bmatt | last post by:
I am trying to support multiple interpreter instances within a single main application thread. The reason I would like separate interpreters is because objects in my system can be extended with...
1
3160
by: Craig Ringer | last post by:
Hi folks I'm a bit of a newbie here, though I've tried to appropriately research this issue before posting. I've found a lot of questions, a few answers that don't really answer quite what I'm...
12
2427
by: madhura | last post by:
Hello, I have a basic question about compilers. What are the different types of compilers, are they written by different companies, why there are different names of compilers, what is the purpose,...
8
2168
by: pransri2006 | last post by:
Hi guys! I think all of u know about the designing of compilers. Can any body tell me about the designing of the compilers. And also tell me the difference between the compilers and Interpreter...
0
4771
by: JosAH | last post by:
Greetings, last week's tip was a bit of playtime where we've built a Sudoku solver. This week we're going to build some complicated stuff: a compiler. Compiler construction is a difficult...
3
9120
by: Marcin Kalicinski | last post by:
How do I use multiple Python interpreters within the same process? I know there's a function Py_NewInterpreter. However, how do I use functions like Py_RunString etc. with it? They don't take any...
0
4039
by: JosAH | last post by:
Greetings, Introduction This part of the article is one week late; I apologize for that; my excuse is: bizzy, bizzy, bizzy; I attended a nice course and I had to lecture a bit and there...
7
12477
by: skip | last post by:
This question was posed to me today. Given a C/C++ program we can clearly embed a Python interpreter in it. Is it possible to fire up multiple interpreters in multiple threads? For example: ...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7235
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5491
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4614
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3108
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1431
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
317
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.