Getting started with compiler-construction
Getting Started: Introduction
Prerequisites
- Have a strong grasp of a programming language such as Python, C, C++, Ruby, or any of the other languages out there.
- Have your favorite code editor or IDE installed (one such example is VSCode)
- Stay motivated. Constructing a compiler is not easy, so keep pushing; it’s worth the effort.
Language Categories
When making a compiler, you need to decide which of 2 types of language the compiler will be.
-
Toy language: This is when you make a programming language which doesn’t fix an issue, but is for learning. Fun examples of these are
Whitespace
,Lolcode
, andBrainfuck
. -
Programming language: These are the languages which aim to solve a problem or bring something new and unique to the table. These can be compared to languages like
Swift
,C++
, andPython
.
Resources
During your journey, it is inevitable that you will stumble over something which you have no idea about, but hopefully, one of these resources will aid you.
-
Create Your Own Programming Language (Ebook)
- +Friendly to beginners
- +Short
- +Aided the creation of
Coffeescript
andRubby
-
Compilers: Principles, Techniques, and Tools (The Dragon Book)
- Contains everything you’d ever want to know about a compiler, but it’s advanced and a long read
-
Modern Compiler Design (Ebook)
- This is another highly praised book on compiler design