Writing Interpreters and Compilers for the Raspberry Pi Using Python

Anthony J. Dos Reis

買這商品的人也買了...

商品描述

If you want to learn how to write interpreters and compilers, and at the same time learn how Python, Python bytecode, assembly language, and dynamic typing work, this is the book for you. The only prerequisites are some experience with any programming language and a computer on which you can install Python 3 (or Python 2 if you prefer). A Raspberry Pi is not required. Included in the software package for the book is an interpreter that allows you to run ARM/Raspberry Pi assembly language programs on your Windows, Linux, or Mac OS X systems. If you have not yet learned Python or assembly language, so much the better. You will get the added bonus of learning Python and assembly language while you learn all about interpreters and compilers. Two chapters on assembly language and an appendix on Python cover everything you need to know to start writing interpreters and compilers. The book covers the three types of language processors: pure interpreters, hybrid interpreters, and compilers. Rather than covering each type in depth before going on to the next type, the book initially covers all three at a very introductory level. So the presentation is easy to follow, and the interpreters and compilers are easy to implement. The book then repeats the cycle but at a higher level, and again at an even higher level. If you call it quits after the first cycle, you will have already benefited from a complete, albeit introductory, course on pure interpreters, hybrid interpreters, and compilers. If you want more, you can continue with the more advanced cycles. And if you want to take the depth-first approach, you can do that also.

商品描述(中文翻譯)

如果你想學習如何撰寫解譯器和編譯器,同時了解Python、Python字節碼、組合語言和動態類型的運作方式,這本書非常適合你。唯一的先決條件是對任何一種程式語言有一些經驗,並且有一台可以安裝Python 3(或者如果你喜歡的話,也可以是Python 2)的電腦。不需要樹莓派。書中的軟體套件包含一個解譯器,可以讓你在Windows、Linux或Mac OS X系統上運行ARM/Raspberry Pi組合語言程式。如果你還沒有學過Python或組合語言,那就更好了。在學習解譯器和編譯器的同時,你還可以額外學習Python和組合語言。書中有兩章關於組合語言的內容,以及一個關於Python的附錄,涵蓋了你開始撰寫解譯器和編譯器所需的一切知識。本書涵蓋了三種類型的語言處理器:純解譯器、混合解譯器和編譯器。書中一開始對這三種類型都進行了簡單介紹,而不是深入探討每一種類型後再進行下一種類型的介紹。因此,本書的內容易於理解,解譯器和編譯器易於實現。然後,書中以更高的水平重複這個循環,再次以更高的水平重複。如果你在第一個循環後就停止學習,你已經從一個完整的、雖然是入門級的課程中受益,學到了純解譯器、混合解譯器和編譯器的知識。如果你想要更多,你可以繼續進行更高級的循環。如果你想要深入探究,你也可以選擇深度優先的方法。