Basically, it's a dream first ... I might have my own programming language someday!, but it will turn to a nightmare soon, just right after you looking for How to build a compiler?.
I spend too much time, like most of you guys, to read dragon books plus lots of other articles, resources, forums, and Q&A. What I finally came up with that was a mass of knowing lots of unnecessary things like All the major parsing thechniques or even Compiler Optimisation but still haven't a clear understanding of what I need to do finally with my compiler project.
The problem is in all of the books and other resources you need to understand (and master) the whole thing at once and at the beginning! You need to understand and implement the parser, while you still don't know what you're supposed to do next. By the way, I assume that you're a real beginner in this topic, however I know that it wasn't the case for some you.
Someday I stop reading those materials. I said it's enough to learning about every details, I want to do something real. So, I start asking questions like this: What is the goal of a compiler? Well, my answer was Generating understandable binary code for the processor. So, I said How it should be then? Well, something like this statement1; statement2;
to 0xAABBCCDD
, and that's all.
Then I start everything from scratch. I start with the simplest syntax and machine codes. What I had at the end of the day was a working compiler which was able to generate pure binary code for Intel. It understands only a few instructions, but it was a real working compiler, however a very simple one.
Later I improved the parser, etc. and I felt much happier since that time. Now, I'm using all of these materials when I need them. My problem was I was trying so hard to understand and master everything, because I thought (mostly others said) that I can't make a compiler, even a simple one, without reading all of these books and articles.
Here, I'd like to ask you list the ideas and concepts which you think is necessary to know before starting any compiler projects. The things you believe they are Simple enough for a beginner to read and understand, to picture the whole project better, and to move on to writing the actual code and feel how does a real compiler work.
As an example see my answer here!
P.S. By the way, before you down vote the question, let me clear again that I'm not saying these materials are not good. I'm just saying the subject is incredibly vague. The wrong approach is to go for everything at once. The smarter solution is start with a Hello World! example, instead of a project with the same features as GCC, etc.