Chapter 9: Intermediate Code Generation
After the semantic analysis is complete, you can contemplate how to execute the program. For compilers, the next step is to produce a sequence of machine-independent instructions called intermediate code. This is usually followed by an optimization phase and final code generation for a target machine. This chapter will show you how to generate intermediate code by looking at examples for the Jzero language. After several chapters where you learned how to write tree traversals that analyze and add information to the syntax tree constructed from the input, the exciting thing about this chapter is that the tree traversals in it begin the process of constructing the compiler's output.
This chapter covers the ...
Get Build Your Own Programming Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.