A flow chart shows the stages of the compiler.
● The lexer turns program.c into a token list.
● The parser turns the token list into an abstract syntax tree.
● TACKY Generation turns the abstract syntax tree into TACKY.
● Assembly generation turns TACKY into assembly. It has three steps:
● Converting TACKY to Assembly
● Replacing Pseudoregisters
● Instruction Fix-Up
● Code emission writes assembly to program.s.
Get Writing a C Compiler 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.