What are important qualities that compilers have?

Abstract View

Source code → Machine code (or potential errors)

Two pass compiler:

Source → Frontend (or potential errors) → (IR) → Backend (or potential errors) → Machine code

Frontend

Source code → Scanner → Tokens → Parser → IR

Scanner: Maps chars to tokens, character string val is a lexeme

Parser: Recognizes CFG and constructs IR