PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE)

Computer Science Engineering (CSE): PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE)

The document PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Compiler Design.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
 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

Related Searches

video lectures

,

PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE)

,

Viva Questions

,

Free

,

Summary

,

mock tests for examination

,

ppt

,

shortcuts and tricks

,

PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE)

,

Exam

,

study material

,

past year papers

,

Objective type Questions

,

MCQs

,

Previous Year Questions with Solutions

,

PPT: Lexical Analysis Notes | Study Compiler Design - Computer Science Engineering (CSE)

,

pdf

,

Extra Questions

,

Important questions

,

Semester Notes

,

Sample Paper

,

practice quizzes

;