- Face Recognition - Compiler Tutorial
Interested in building a compiler?
If so, you have come to the right place. Here I am developing a compiler named KoolB and writing a tutorial that details my journey in doing so. If you are interested in compiler technology or want to develop your own "perfect" language, check out my tutorial, where I will guide you through the process.
My compiler tutorial will cover everything you need to build a compiler from beginning to end for both Windows and Linux. We start out with a blank C++ project and start adding things to it. First, we build the skeleton of the compiler. Secondly, we start designing and building a BASIC-like language into the compiler. Finally, we will cover some issues such as an making an IDE (Integrated Development Environment) for your language, distributing your compiler, developing a standard library and GUI objects, and further development.
Abandoned. Unfortunately, I stopped working on this project in 2004 because I got too involved with cool projects in college. If I get time, I may look at picking this back up again, but I doubt that will happen. In the mean time, feel free to read what I have written so far.
The Compiler Tutorial is one of my oldest projects and is closely related to my KoolB compiler. In high school, one of my favorite languages, RapidQ Basic, was discontinued, which prompted a lot of discussion on building your own compilers and in particular, a RapidQ clone. My KoolB compiler and this tutorial-style book is a result of my attempt to document the creation of a compiler.
In high school, I wrote my first version of the Compiler Tutorial, but stopped at chapter 6. One of the reasons was I was doing simultaneous development of KoolB and writing the chapters. I discovered that I didn't like some of my approach because it was overly messy. So as I entered college, I decided to re-write both KoolB and the Compiler Tutorial using what I had learned from my first (aborted) attempt. However, as you well know, college is not the cake-walk that high school is. I got about 2 and half chapters finished before I got a job as a research assistant, and started taking Differential Equations, and volunteered my life away to work at the Robotics Lab.
Thus I offer two different versions of my Compiler Tutorial, both in an unfinished state. The first one is aimed a bit more for beginners (as I was a complete beginner writing it) and assumes you are learning C++. The second one is a bit more mature, assuming you know some C++ already, and is better formatted as a book. However, the first one is more complete (6 chapters as opposed to 2 and a half).
Source Code (Downloads)
What I assume you know
That is an excellent question. I try not to assume to much, but I don't have the time to teach you everything. So I assume that you know several things:
Finally, the most important thing you will need to get something from my tutorial is patience, persistence, and willingness to spend time to learn. Building a compiler is difficult and takes time - however, it is very rewarding once you learn it.
My best recommendation would be to take some time and learn this stuff before attempting to build a compiler. I jumped right into building a compiler before I knew this stuff, and it didn't take long before I gave up. After about a year of learning other languages and working on other projects, I gave building a compiler another try. And look what happened!
So, I would highly recommend that you check out some of these resources/tutorials before you just jump into my tutorial. They will give you a much better idea of what is going on.
C or C++ programming
Object Oriented Programming