PPT - Lexical Analysis Computer Science Engineering (CSE) Notes | EduRev

Compiler Design

Computer Science Engineering (CSE) : PPT - Lexical Analysis Computer Science Engineering (CSE) Notes | EduRev

 Page 1


Chapter 3
Lexical Analysis
Page 2


Chapter 3
Lexical Analysis
Outline
? Role of lexical analyzer
? Specification of tokens
? Recognition of tokens
? Lexical analyzer generator
? Finite automata
? Design of lexical analyzer generator
Page 3


Chapter 3
Lexical Analysis
Outline
? Role of lexical analyzer
? Specification of tokens
? Recognition of tokens
? Lexical analyzer generator
? Finite automata
? Design of lexical analyzer generator
The role of lexical analyzer
Lexical
Analyzer
Parser
Source
program
token
getNextToken
Symbol
table
To semantic
analysis
Page 4


Chapter 3
Lexical Analysis
Outline
? Role of lexical analyzer
? Specification of tokens
? Recognition of tokens
? Lexical analyzer generator
? Finite automata
? Design of lexical analyzer generator
The role of lexical analyzer
Lexical
Analyzer
Parser
Source
program
token
getNextToken
Symbol
table
To semantic
analysis
Why to separate Lexical analysis
and parsing
1. Simplicity of design
2. Improving compiler efficiency
3. Enhancing compiler portability
Page 5


Chapter 3
Lexical Analysis
Outline
? Role of lexical analyzer
? Specification of tokens
? Recognition of tokens
? Lexical analyzer generator
? Finite automata
? Design of lexical analyzer generator
The role of lexical analyzer
Lexical
Analyzer
Parser
Source
program
token
getNextToken
Symbol
table
To semantic
analysis
Why to separate Lexical analysis
and parsing
1. Simplicity of design
2. Improving compiler efficiency
3. Enhancing compiler portability
Tokens, Patterns and Lexemes
? A token is a pair a token name and an optional token
value
? A pattern is a description of the form that the lexemes
of a token may take
? A lexeme is a sequence of characters in the source
program that matches the pattern for a token
Read More
Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

Related Searches

Extra Questions

,

Semester Notes

,

Important questions

,

video lectures

,

Previous Year Questions with Solutions

,

MCQs

,

past year papers

,

Free

,

mock tests for examination

,

Viva Questions

,

Exam

,

Summary

,

ppt

,

study material

,

shortcuts and tricks

,

practice quizzes

,

Objective type Questions

,

PPT - Lexical Analysis Computer Science Engineering (CSE) Notes | EduRev

,

PPT - Lexical Analysis Computer Science Engineering (CSE) Notes | EduRev

,

PPT - Lexical Analysis Computer Science Engineering (CSE) Notes | EduRev

,

pdf

,

Sample Paper

;