Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Build Your Own Programming Language

You're reading from   Build Your Own Programming Language A programmer's guide to designing compilers, interpreters, and DSLs for solving modern computing problems

Arrow left icon
Product type Paperback
Published in Dec 2021
Publisher Packt
ISBN-13 9781800204805
Length 494 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Clinton  L. Jeffery Clinton L. Jeffery
Author Profile Icon Clinton L. Jeffery
Clinton L. Jeffery
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. Section 1: Programming Language Frontends
2. Chapter 1: Why Build Another Programming Language? FREE CHAPTER 3. Chapter 2: Programming Language Design 4. Chapter 3: Scanning Source Code 5. Chapter 4: Parsing 6. Chapter 5: Syntax Trees 7. Section 2: Syntax Tree Traversals
8. Chapter 6: Symbol Tables 9. Chapter 7: Checking Base Types 10. Chapter 8: Checking Types on Arrays, Method Calls, and Structure Accesses 11. Chapter 9: Intermediate Code Generation 12. Chapter 10: Syntax Coloring in an IDE 13. Section 3: Code Generation and Runtime Systems
14. Chapter 11: Bytecode Interpreters 15. Chapter 12: Generating Bytecode 16. Chapter 13: Native Code Generation 17. Chapter 14: Implementing Operators and Built-In Functions 18. Chapter 15: Domain Control Structures 19. Chapter 16: Garbage Collection 20. Chapter 17: Final Thoughts 21. Section 4: Appendix
22. Assessments 23. Other Books You May Enjoy Appendix: Unicon Essentials

Preface

After 60 years of high-level language development, programming is still too difficult. The demand for software of ever-increasing size and complexity has exploded due to hardware advances, while programming languages have improved far more slowly. Creating new languages for specific purposes is one antidote for this software crisis.

This book is about building new programming languages. The topic of programming language design is introduced, although the primary emphasis is on programming language implementation. Within this heavily studied subject, the novel aspect of this book is its fusing of traditional compiler-compiler tools (Flex and Byacc) with two higher-level implementation languages. A very high-level language (Unicon) plows through a compiler's data structures and algorithms like butter, while a mainstream modern language (Java) shows how to implement the same code in a more typical production environment.

One thing I didn't really understand after my college compiler class is that the compiler is only one part of a programming language implementation. Higher-level languages, including most newer languages, may have a runtime system that dwarfs their compiler. For this reason, the second half of this book spends quality time on a variety of aspects of language runtime systems, ranging from bytecode interpreters to garbage collection.

lock icon The rest of the chapter is locked
Next Section arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime