Front-end and Back-end
Source proram -> compiler -> [ (front) IR (end) ] -> target prmgram

- Front end
- Recognizes legal or illegal program
- Reports errors in useful way.
- Produces IR
- Back end
- Translages IR into machine code
- Decide which value to keep in register

- Scanner is for spelling checking, makes token
- Parser is for grammatical analysis with token, makes syntax tree
- Semantic analyzer : Declaration and type checking