Build Your Own Programming Language: A programmer's guide to designing compilers, interpreters, and DSLs for solving modern computing problems (Paperback)
暫譯: 打造自己的程式語言:程式設計師設計編譯器、直譯器及領域特定語言以解決現代計算問題的指南 (平裝本)
Clinton L. Jeffery
- 出版商: Packt Publishing
- 出版日期: 2021-12-31
- 售價: $2,800
- 貴賓價: 9.5 折 $2,660
- 語言: 英文
- 頁數: 494
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1800204809
- ISBN-13: 9781800204805
-
相關分類:
Compiler
-
相關翻譯:
自己動手構建編程語言:如何設計編譯器、解釋器和 DSL (簡中版)
立即出貨 (庫存 < 3)
買這商品的人也買了...
-
$650$553 -
$700Professional Scrum Development with Microsoft Visual Studio 2012 (Paperback)
-
$3,050$2,898 -
$505深度探索嵌入式操作系統(從零開始設計架構和開發)
-
$680$578 -
$958深度學習
-
$650$507 -
$450$356 -
$580$458 -
$1,615A Common-Sense Guide to Data Structures and Algorithms, Second Edition: Level Up Your Core Programming Skills
-
$420$332 -
$2,200$2,090 -
$1,898Python Distilled (Paperback)
-
$719$683 -
$599$473 -
$500$250 -
$800$680 -
$2,682Fluent Python: Clear, Concise, and Effective Programming, 2/e (Paperback)
-
$400$316 -
$780$663 -
$600$510 -
$2,185Learning Blazor: Build Single-Page Apps with Webassembly and C# (Paperback)
-
$713$677 -
$600$474 -
$720$562
相關主題
商品描述
Key Features
- Reduce development time and solve pain points in your application domain by building a custom programming language
- Learn how to create parsers, code generators, file readers, analyzers, and interpreters
- Create an alternative to frameworks and libraries to solve domain-specific problems
Book Description
The need for different types of computer languages is growing rapidly and developers prefer creating domain-specific languages for solving specific application domain problems. Building your own programming language has its advantages. It can be your antidote to the ever-increasing size and complexity of software. However, creating a custom language isn't easy.
In this book, you'll be able to put the knowledge you gain to work in language design and implementation. You'll implement the frontend of a compiler for your language, including a lexical analyzer and parser. The book covers a series of traversals of syntax trees, culminating with code generation for a bytecode virtual machine. Moving ahead, you'll learn how domain-specific language (DSL) features are often best represented by operators and functions that are built into the language, rather than library functions. The book concludes by showing you how to implement garbage collection, including reference counting and mark-and-sweep garbage collection. Throughout the book, Dr. Jeffery weaves in his experience of building the Unicon programming language to give better context to the concepts, while providing relevant examples in Unicon and Java.
By the end of this book, you'll be able to build and deploy your own domain-specific languages, capable of compiling and running programs.
What you will learn
- Perform requirements analysis for the new language and design language syntax and semantics
- Write lexical and context-free grammar rules for common expressions and control structures
- Develop a scanner that reads source code and generate a parser that checks syntax
- Build key data structures in a compiler and use your compiler to build a syntax-coloring code editor
- Implement a bytecode interpreter and run bytecode generated by your compiler
- Write tree traversals that insert information into the syntax tree
- Implement garbage collection in your language
Who this book is for
This book is for software developers interested in the idea of inventing their own language or developing a domain-specific language. Computer science students taking compiler construction courses will also find this book highly useful as a practical guide to language implementation to supplement more theoretical textbooks. Intermediate-level knowledge and experience working with a high-level language such as Java or the C++ language are expected to help you get the most out of this book.
商品描述(中文翻譯)
#### 主要特點
- 通過建立自定義程式語言來減少開發時間並解決應用領域中的痛點
- 學習如何創建解析器、代碼生成器、文件讀取器、分析器和解釋器
- 創建替代框架和庫以解決特定領域的問題
#### 書籍描述
對不同類型計算機語言的需求正在迅速增長,開發人員更喜歡創建特定領域語言以解決特定應用領域的問題。建立自己的程式語言有其優勢。它可以成為應對不斷增長的軟體大小和複雜性的解藥。然而,創建自定義語言並不容易。
在這本書中,您將能夠將所學知識應用於語言設計和實現。您將實現您語言的編譯器前端,包括詞法分析器和解析器。這本書涵蓋了一系列語法樹的遍歷,最終生成字節碼虛擬機的代碼。接下來,您將學習特定領域語言(DSL)的特性通常最好由內建於語言中的運算符和函數來表示,而不是庫函數。書的結尾將展示如何實現垃圾回收,包括引用計數和標記-清除垃圾回收。在整本書中,Jeffery博士融入了他建立Unicon程式語言的經驗,以便更好地理解概念,同時提供Unicon和Java的相關範例。
到本書結束時,您將能夠構建和部署自己的特定領域語言,能夠編譯和運行程式。
#### 您將學到什麼
- 對新語言進行需求分析,設計語言的語法和語義
- 為常見表達式和控制結構編寫詞法和上下文無關文法規則
- 開發一個掃描器來讀取源代碼,並生成檢查語法的解析器
- 在編譯器中構建關鍵數據結構,並使用您的編譯器構建語法著色代碼編輯器
- 實現字節碼解釋器並運行由您的編譯器生成的字節碼
- 編寫遍歷樹的代碼,將信息插入語法樹中
- 在您的語言中實現垃圾回收
#### 本書適合誰
這本書適合對發明自己的語言或開發特定領域語言感興趣的軟體開發人員。修習編譯器建構課程的計算機科學學生也會發現這本書作為語言實現的實用指南非常有用,以補充更理論的教科書。預期具備中級水平的知識和使用高級語言(如Java或C++)的經驗,將幫助您充分利用本書。
作者簡介
Clinton L. Jeffery is Professor and Chair of the Department of Computer Science and Engineering at New Mexico Institute of Mining and Technology. He received his B.S. from the University of Washington, and M.S. and Ph.D. degrees from the University of Arizona, all in computer science. He has conducted research and written many books and papers on programming languages, program monitoring, debugging, graphics, virtual environments, and visualization. With colleagues, he invented the Unicon programming language, hosted on the Unicon website.
作者簡介(中文翻譯)
克林頓·L·傑佛瑞(Clinton L. Jeffery)是新墨西哥礦業與技術學院(New Mexico Institute of Mining and Technology)計算機科學與工程系的教授及系主任。他在華盛頓大學(University of Washington)獲得學士學位,並在亞利桑那大學(University of Arizona)獲得碩士及博士學位,均為計算機科學領域。他在程式語言、程式監控、除錯、圖形、虛擬環境及視覺化等方面進行了研究,並撰寫了多本書籍和論文。與同事一起,他發明了Unicon程式語言,並在Unicon網站上進行托管。
目錄大綱
Table of Contents
- Why Build Another Programming Language
- Programming Language Design
- Scanning Source Code
- Parsing
- Syntax Trees
- Symbol Tables
- Checking Base Types
- Checking Types on Arrays, Method Calls, and Structure Accesses
- Intermediate Code Generation
- Syntax Cloning in an IDE
- Bytecode Interpreters
- Generating Bytecode
- Native Code Generation
- Implementing Operators and Built-In Functions
- Domain Control Structures
- Garbage Collection
- Final Thoughts
- Appendix A - Unicon Essentials
目錄大綱(中文翻譯)
Table of Contents
- Why Build Another Programming Language
- Programming Language Design
- Scanning Source Code
- Parsing
- Syntax Trees
- Symbol Tables
- Checking Base Types
- Checking Types on Arrays, Method Calls, and Structure Accesses
- Intermediate Code Generation
- Syntax Cloning in an IDE
- Bytecode Interpreters
- Generating Bytecode
- Native Code Generation
- Implementing Operators and Built-In Functions
- Domain Control Structures
- Garbage Collection
- Final Thoughts
- Appendix A - Unicon Essentials