• Translate high-level program (source language) into machine
code (machine language)
• Slow translation, fast execution
• Compilation process has several phases:
• lexical analysis: converts characters in the source program
into lexical units
• syntax analysis: transforms lexical units into parse trees
which represent the syntactic structure of program
• Semantics analysis: generate intermediate code
• code generation: machine code is generated