Overview

FrontendBackendSourcecodeIRMachinecodeerrors
The frontend:
ScannerParserSourcecodeIRErrors
Scanner:

Parser

1. goal -> expr2. expr -> expr op term3. -> term4. term -> number5. -> id6. op -> +7. -> -CFGParserx+2-yInput-+yx2IRS (start symbol) = goalT (terminal symbols) = {number, id, +, -}N (non-terminal symbols) = {goal, term,expr, op}P (productions) = {1,2,3,4,5,6,7}
Backend

InstructionSelectionRegisterAllocationInstructionSchedulingIRIRIRMachinecode
Instruction Selector

Register Allocation

Instruction Scheduling

Traditional Three-Pass Compiler

900

⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'

Excalidraw Data

Text Elements

Frontend
Middle End
Back End
IR
IR
Source
Code
Machine
Code
Errors

The Optimizer (or Middle End)

900

⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'

Excalidraw Data

Text Elements

Opt 1
Opt 2
Opt 3
Opt n
IR
IR
IR...
IR
Errors
IR