473,563 Members | 2,635 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 2577
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****@despamm ed.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.f reeshell.org> wrote:
: Hrvoje Blazevic <hr****@despamm ed.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
2144
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 interpreter does not influence the other. In essence, the interpreter can be used in different modules of a single application. It would be nice to...
2
2163
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 python scripts via a well defined interface (i.e. The onCreate script will be called when the object is created). So...Is it necessary to use...
1
3166
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 looking for, but nothing that really solves or explains all this. I'll admit to being stumped, hence my question here. I'm also trying to make...
12
2433
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, I want to know about them. Are interpreters of C available, and if yes, how can I get them. Madhura
8
2176
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 which weresically used by the computers. I want to know about the basic compiler software.
0
4781
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 branch of CS and I don't want the article(s) to be the size of a book, so we have to keep things a bit simple. On the other hand the entire thing...
3
9141
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 arguments that would tell on which interpreter to run the string...? Marcin
0
4053
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 simply was no time left for writing. we've come a long way; the previous articles discussed the following aspects of compilers:
7
12512
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: C++ main thread 1 Py_Initialize() thread 2 Py_Initialize()
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6244
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5208
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2079
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 we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.