Writing Interpreters and Compilers for the Raspberry Pi Using Python
暫譯: 使用 Python 為 Raspberry Pi 編寫解釋器和編譯器

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)的電腦。不需要 Raspberry Pi。本書的軟體包中包含一個解釋器,允許你在 Windows、Linux 或 Mac OS X 系統上運行 ARM/Raspberry Pi 的組合語言程式。如果你尚未學習 Python 或組合語言,那就更好了。在學習解釋器和編譯器的同時,你還將獲得學習 Python 和組合語言的額外好處。兩章關於組合語言的內容和一個關於 Python 的附錄涵蓋了你開始編寫解釋器和編譯器所需了解的所有內容。本書涵蓋了三種類型的語言處理器:純解釋器、混合解釋器和編譯器。書中並不是在深入探討每種類型後再進入下一種類型,而是最初以非常入門的方式涵蓋這三種類型。因此,內容易於理解,解釋器和編譯器也容易實現。然後,書中會重複這個循環,但在更高的層次上,再次以更高的層次進行。如果你在第一次循環後就停止,你已經從純解釋器、混合解釋器和編譯器的完整(雖然是入門級的)課程中受益。如果你想要更多,可以繼續進入更高級的循環。如果你想採取深度優先的方法,你也可以這樣做。