

Desertcart purchases this item on your behalf and handles shipping, customs, and support to EGYPT.
Learn to design your own programming language in a hands-on way by building compilers, using preprocessors, transpilers, and more, in this fully-refreshed second edition, written by the creator of the Unicon programming language. Purchase of the print or Kindle book includes a free PDF eBook Key Features - Takes a hands-on approach; learn by building the Jzero language, a subset of Java, with example code shown in both the Java and Unicon languages - Learn how to create parsers, code generators, scanners, and interpreters - Target bytecode, native code, and preprocess or transpile code into a high-level language Book Description There are many reasons to build a programming language: out of necessity, as a learning exercise, or just for fun. Whatever your reasons, this book gives you the tools to succeed. You'll build the frontend of a compiler for your language and generate a lexical analyzer and parser using Lex and YACC tools. Then you'll explore a series of syntax tree traversals before looking at code generation for a bytecode virtual machine or native code. In this edition, a new chapter has been added to assist you in comprehending the nuances and distinctions between preprocessors and transpilers. Code examples have been modernized, expanded, and rigorously tested, and all content has undergone thorough refreshing. You'll learn to implement code generation techniques using practical examples, including the Unicon Preprocessor and transpiling Jzero code to Unicon. You'll move to domain-specific language features and learn to create them as built-in operators and functions. You'll also cover garbage collection. Dr. Jeffery's experiences building the Unicon language are used to add context to the concepts, and relevant examples are provided in both Unicon and Java so that you can follow along in your language of choice. By the end of this book, you'll be able to build and deploy your own domain-specific language. What you will learn - Analyze requirements for your language and design syntax and semantics. - Write grammar rules for common expressions and control structures. - Build a scanner to read source code and generate a parser to check syntax. - Implement syntax-coloring for your code in IDEs like VS Code. - Write tree traversals and insert information into the syntax tree. - Implement a bytecode interpreter and run bytecode from your compiler. - Write native code and run it after assembling and linking using system tools. - Preprocess and transpile code into another high-level 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 design or construction courses will also find this book highly useful as a practical guide to language implementation to supplement more theoretical textbooks. Intermediate or better proficiency in Java or C++ programming languages (or another high-level programming language) is assumed. Review: Introduction to building programming language - This guide is a comprehensive manual on building a programming language from scratch, covering every essential aspect from requirements analysis and syntax design to the implementation of a compiler and runtime environment. It meticulously details the creation of lexical and context-free grammars, the development of scanners and parsers, and the construction of critical compiler data structures. Practical applications, such as a syntax-coloring code editor, are used to illustrate key concepts. Advanced topics like tree traversals, bytecode interpretation, native code generation, and garbage collection are also covered. The book excels in clarity and depth, making complex topics accessible and providing a practical approach to language design and compiler construction. It's an invaluable resource for anyone interested in the inner workings of programming languages, from students to seasoned developers. Review: Best book to learn programming language mechanics - The books covers all the elements you need to learn to build a customised or full fledged programming language. The font is good. Basics explained in intuitive way and with examples and code snippets. Just one minus point. This book weighs 2.1 kgs. It is impossible to hold in hands and read. If you snooze laying on bed reading this book, then you may break your nose.







| Best Sellers Rank | #532,559 in Books ( See Top 100 in Books ) #1,752 in Programming Languages (Books) |
| Customer Reviews | 4.4 out of 5 stars 16 Reviews |
A**T
Introduction to building programming language
This guide is a comprehensive manual on building a programming language from scratch, covering every essential aspect from requirements analysis and syntax design to the implementation of a compiler and runtime environment. It meticulously details the creation of lexical and context-free grammars, the development of scanners and parsers, and the construction of critical compiler data structures. Practical applications, such as a syntax-coloring code editor, are used to illustrate key concepts. Advanced topics like tree traversals, bytecode interpretation, native code generation, and garbage collection are also covered. The book excels in clarity and depth, making complex topics accessible and providing a practical approach to language design and compiler construction. It's an invaluable resource for anyone interested in the inner workings of programming languages, from students to seasoned developers.
B**T
Best book to learn programming language mechanics
The books covers all the elements you need to learn to build a customised or full fledged programming language. The font is good. Basics explained in intuitive way and with examples and code snippets. Just one minus point. This book weighs 2.1 kgs. It is impossible to hold in hands and read. If you snooze laying on bed reading this book, then you may break your nose.
A**Y
Awesome resource to kickstart your programming language journey
This is an indispensable resource for language enthusiasts. Jeffery's clear explanations guide readers through parsing, native code generation, and complex topics like bytecode interpreters and scalability. The book emphasizes optimization techniques, making it invaluable for anyone embarking on language design. Highly recommended for diving deep into the world of programming languages.
C**V
Book Review on Build your own Programming Language
This book equips you with the knowledge and tools needed to turn your language creation dream into reality. With insights from Dr. Jeffery's experience and a choice of Unicon or Java examples, it's a must-read for aspiring language creators. 𝗪𝗵𝗮𝘁 𝘆𝗼𝘂 𝘄𝗶𝗹𝗹 𝗹𝗲𝗮𝗿𝗻 𝗳𝗿𝗼𝗺 𝘁𝗵𝗶𝘀: 𝗔𝗻𝗮𝗹𝘆𝘇𝗶𝗻𝗴 𝗿𝗲𝗾𝘂𝗶𝗿𝗲𝗺𝗲𝗻𝘁𝘀 𝗮𝗻𝗱 𝗱𝗲𝘀𝗶𝗴𝗻𝗶𝗻𝗴 𝘀𝘆𝗻𝘁𝗮𝘅 & 𝘀𝗲𝗺𝗮𝗻𝘁𝗶𝗰𝘀: Define your language's purpose and shape its structure. 𝗖𝗿𝗮𝗳𝘁𝗶𝗻𝗴 𝗴𝗿𝗮𝗺𝗺𝗮𝗿 𝗿𝘂𝗹𝗲𝘀: Master the expressions and control flow that bring your language to life. 𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗮 𝘀𝗰𝗮𝗻𝗻𝗲𝗿 & 𝗽𝗮𝗿𝘀𝗲𝗿: Decode and understand the code written in your language. 𝗔𝗱𝗱𝗶𝗻𝗴 𝘀𝘆𝗻𝘁𝗮𝘅 𝗰𝗼𝗹𝗼𝗿𝗶𝗻𝗴: Enhance readability and user experience in popular IDEs like VS Code. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗶𝗻𝗴 𝘁𝗿𝗲𝗲 𝘁𝗿𝗮𝘃𝗲𝗿𝘀𝗮𝗹𝘀: Interact with your language's structure for powerful code manipulation. 𝗜𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁𝗶𝗻𝗴 𝗯𝘆𝘁𝗲𝗰𝗼𝗱𝗲 𝗶𝗻𝘁𝗲𝗿𝗽𝗿𝗲𝘁𝗮𝘁𝗶𝗼𝗻 𝗮𝗻𝗱 𝗻𝗮𝘁𝗶𝘃𝗲 𝗰𝗼𝗱𝗲 𝗴𝗲𝗻𝗲𝗿𝗮𝘁𝗶𝗼𝗻: Run your language directly on the machine or translate it for wider compatibility. 𝗘𝘅𝗽𝗹𝗼𝗿𝗶𝗻𝗴 𝗽𝗿𝗲𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗼𝗿𝘀 & 𝘁𝗿𝗮𝗻𝘀𝗽𝗶𝗹𝗲𝗿𝘀: Transform code between languages for flexibility and efficiency. 𝗖𝗿𝗲𝗮𝘁𝗶𝗻𝗴 𝗱𝗼𝗺𝗮𝗶𝗻-𝘀𝗽𝗲𝗰𝗶𝗳𝗶𝗰 𝗹𝗮𝗻𝗴𝘂𝗮𝗴𝗲𝘀: Tailor your language to specific problem domains for optimal solutions. 𝗖𝗵𝗼𝗼𝘀𝗶𝗻𝗴 𝗯𝗲𝘁𝘄𝗲𝗲𝗻 𝗨𝗻𝗶𝗰𝗼𝗻 & 𝗝𝗮𝘃𝗮 𝗰𝗼𝗱𝗲 𝗲𝘅𝗮𝗺𝗽𝗹𝗲𝘀: Follow along in your preferred language.
A**A
Great Resource for Learning How to Create a Programming Language!
I've always had an interest to learn how programming languages are made and this book solved that problem. It non only covers just how to build the language, but why! I think most books dont' always cover the why, but just the how. There's a lot of advanced content in here, but it's presented in a way that makes sense. This is a must-buy for those who are interested to build their own programming language!
G**E
A practical guide to designing a computer language
I have always had an interest in computer language creation. There are many languages, both generic (C, Python) and more domain related (R, Kotlin). At the fundamental level I had a copy of Aho/Sethi/Ullman's classic on Compilers. That book majored on Automata and parsing and the theory of compilers. This book will actually get you to the point of developing a new computer language (though why you might it doesn't say). What is fascinating for me is that back in the day I used a (domain specific language) called Icon for processing massive corpora of texts due to its superb text processing features. This book uses Java, and Unicon for a development platform. Unicon is a development of the Icon I used years ago, and Mr Jeffery is part of the team that maintains it, so this as a great excuse to get back into that :-) . This is a great way to learn (Un)Icon. Unlike the Aho.. book reference above this is a more practical book, full of examples and code segments (all on Github of course) and includes sections on transpilers (aka cross-compilers) and even (in 2e) IDEs, which is timely as a lot of languages are now as defined by their normal IDE as by their reserved words and library references - a good example being Python. The key sections are very practical chapters on parsing - and handling different data types, including tree traversal, and code generation (byte-code, intel x64 assembler). If you are interested in languages, and have heard of yacc and wondered how something like that works this is the book. Its also a good book on how processors handle instructions as that is a crucial part of the exercise. At the end of every chapter there are questions to test your understanding, and this is where books like this pay off - else otherwise you just download the code and run it. The references in the back of the book are very comprehensive and cover many generations of compiler/language design. If you know any undergraduate ComSci students then this is a great book covering many fundamentals of the subject but in a practical way. Very much recommended. Full disclosure this copy came from publishers packt
L**B
Uses a parser generator and unicon
I originally bought this book because I thought it would go over the steps for building a programming language from the ground up. However, upon glancing over the parsing section, the book notes that it will be using iyacc and BYACC to generate the parser for you. The language being used is also something called "Unicon" instead of a more widely known language like C, or C++, or Java. Disappointing. Will be returning.
Trustpilot
1 month ago
1 week ago