UNIT I Lecture 4 Major Data Structures in Compiler
UNIT I Lecture 4 Major Data Structures in Compiler
Sharma
UNIT I
Unit I: Syllabus
• Introduction to Compiler
• Major Data Structures in Compiler
• Types of Compiler
• Front-End and Back-End of Compiler
• Compiler Structure:
– Analysis-synthesis model of compilation
• Various phases of Compiler
Learn Compiler Design: From B. K. Sharma
Unit I: Syllabus
• Lexical Analysis:
– Input Buffering
– Specification and Recognition of Tokens
– Design of a Lexical Analyzer Generator
• Lex
Learn Compiler Design: From B. K. Sharma
Summary of Lecture 4: Types of Compilers:
1: Various types of compilers are One-Pass, two-pass and multi-
pass compilers, incremental compiler, native compiler, cross-
compiler and JIT compilers
2: The compiler which performs the recompilation of only
modified source program rather than compiling the whole
source program is called incremental compiler.
3: The compiler used to compile the source program for
same type of platform only is called native compiler.
4: A cross compiler is a compiler capable of creating
executable code for a platform other than the one on
which the compiler is running.
5: In JIT-compiler, applications are delivered in byte code,
which is compiled to native machine code just prior to
execution.
Learn Compiler Design: From B. K. Sharma
1. Lexical Analysis
Target Program
Learn Compiler Design: From B. K. Sharma
Keywords Variables
Data Types Constants
Operators Literals
Functions Scope information
{ int id_5;
int num _6; }
int num _7;
}
}
Learn Compiler Design: From B. K. Sharma