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

mock tests for examination

,

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

,

Viva Questions

,

Objective type Questions

,

MCQs

,

shortcuts and tricks

,

Semester Notes

,

practice quizzes

,

Important questions

,

Exam

,

Sample Paper

,

Summary

,

ppt

,

study material

,

Free

,

Previous Year Questions with Solutions

,

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

,

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

,

video lectures

,

pdf

,

Extra Questions

,

past year papers

;