Summary
In this chapter, you learned about the typical components of a compiler. An arithmetic expression language was used to introduce you to the grammar of programming languages. You learned how to develop the typical components of a frontend for this language: a lexer, a parser, a semantic analyzer, and a code generator. The code generator only produced LLVM IR, and the LLVM llc
static compiler was used to create object files from it. You have now developed your first LLVM-based compiler!
In the next chapter, you will deepen this knowledge, constructing the frontend for a programming language.