Jump to content

Basic Compiler Design Tutorial for Beginners

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Danphe16

Danphe16

    Newbie

  • Members
  • Pip
  • 4 posts
I am thinking of writing compiler design tutorials for beginners. These will be totally intended to beginners who have no idea about compiler design at all (but who must have at least some basic knowledge in C++). Language translation, code generation, assembly language, linking etc. will all be covered. These tutorials intend to be a starting point for many compiler programmers. After these tutorials, readers will have learnt to create a simple compiler and if they have followed the tutorials, they will have created a BASIC compiler as well.

So, is anybody interested in creating their own compiler?

(My major intention in writing these tutorials is to learn by myself. I have created a simple compiler but I want to make sure I understand every thing I did. I am also rewriting the whole compiler again and I think writing some tutorial on what I am doing will help me a lot to create a better compiler this time.)

#2
gregwarner

gregwarner

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 853 posts
  • Location:Arkansas
I've written a couple compilers and scanners in the past, usually to serve some very specific yet sophisticated one-time purpose. I would suggest spending a little time reading up on programming language theory, and then make sure you get real familiar with DFA's (Deterministic Finite-state Automatons) until you can write them in your sleep. That should help you understand better what you're doing when writing compilers.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.

– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid


#3
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
OOoo I am extremely interested. I've always wanted to understand how executables are compiled and what the different parts of an executable are. Please make these!!!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users