August 2024
Intermediate to advanced
792 pages
23h 9m
English
A flow chart shows the stages of the compiler.
1. The lexer turns program.c into a token list.
2. The parser turns the token list into an abstract syntax tree.
3. Semantic analysis turns the AST into a transformed AST. It has one step:
a. Variable resolution
4. TACKY Generation turns the transformed AST into TACKY.
5. Assembly generation turns TACKY into assembly. It has three steps:
a. Converting TACKY to Assembly
b. Replacing Pseudoregisters
c. Instruction Fix-Up
6. Code emission writes assembly to program.s.
Read now
Unlock full access