8 1 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Compiler

• A compiler is a program that reads a program


written in one laguage and translates into
equivalent target language

Source Compiler Target

Error Message
Structure of a Compiler
• The Front end checks whether the program is
correctly written in terms of the programming
language syntax and semantics.
• The Back end is responsible for translating the
source into assembly code
Front End
• Lexical Analysis
• Preprocessing
• Syntax Analysis
• Semantic Analysis
Back End
• Analysis
• Optimization
• Code generation
Phase of a compiler
• Lexical Analyzer
• Syntax Analyzer
• Semantic Analyzer
• Intermediate code generator
• Code optimizer
• Code generator

You might also like