狠狠撸

狠狠撸Share a Scribd company logo
2
Most read
8
Most read
11
Most read
By,
RANJAN V
? Computer programs are generally written in high-level
languages (like C++, Python, and Java). A language
processor, or language translator, is a computer program that
convert source code from one programming language to
another language or human readable language
? A compiler is a program that can read a program in one
language i.e the source language and translate it into an
equivalent program in another language which is the target
language.
A compiler
compiler introduction vtu syllabus 1st chapter.pptx
compiler introduction vtu syllabus 1st chapter.pptx
What Is an Interpreter?
? It is a program that functions for the
translation of a programming language into a
comprehensible one.
? It is a computer program used for converting
high-level program statements into machine
codes. It includes pre-compiled code, source
code, and scripts.
? An interpreter translates only one statement
at a time of the program.
? They create an exe of the programming
language before the program runs.
compiler introduction vtu syllabus 1st chapter.pptx
? Lexical Analysis: Lexical analysis or Lexical
analyzer is the initial stage or phase of the
compiler. This phase scans the source code and
transforms the input program into a series of a
token.
? A token is basically the arrangement of
characters that defines a unit of information in
the source code.
NOTE: In computer science, a program that
executes the process of lexical analysis is
called a scanner, tokenizer, or lexer.
?To read the input character in the source code and produce a token is
the most important task of a lexical analyzer.
?The lexical analyzer goes through with the entire source code and
identifies each token one by one. The scanner is responsible to
produce tokens when it is requested by the parser.
?The lexical analyzer avoids the whitespace and comments while
creating these tokens. If any error occurs, the analyzer correlates
these errors with the source file and line number.
There are three terminologies-
? Token
? Pattern
? Lexeme
Token: It is a sequence of characters that
represents a unit of information in the source
code.
Pattern: The description used by the token is
known as a pattern.
Lexeme: A sequence of characters in the
source code, as per the matching pattern of
a token, is known as lexeme. It is also called
the instance of a token.
The lexical analyzer performs the following
tasks-
? The lexical analyzer is responsible for
removing the white spaces and comments
from the source program.
? It corresponds to the error messages with the
source program.
? It helps to identify the tokens.
? The input characters are read by the lexical
analyzer from the source code.
compiler introduction vtu syllabus 1st chapter.pptx
Ad

Recommended

1._Introduction_.pptx
1._Introduction_.pptx
Anbarasan Radhakrishnan R
?
COMPILER CONSTRUCTION KU 1.pptx
COMPILER CONSTRUCTION KU 1.pptx
Rossy719186
?
role of lexical anaysis
role of lexical anaysis
Sudhaa Ravi
?
11700220036.pdf
11700220036.pdf
SouvikRoy149
?
Compiler Design
Compiler Design
Anujashejwal
?
Compier Design_Unit I_SRM.ppt
Compier Design_Unit I_SRM.ppt
Apoorv Diwan
?
compiler.pdfljdvgepitju4io3elkhldhyreyio4uw
compiler.pdfljdvgepitju4io3elkhldhyreyio4uw
abhinandpk2405
?
Compiler Design.pptx
Compiler Design.pptx
SouvikRoy149
?
Phases of Compiler.pptx
Phases of Compiler.pptx
ssuser3b4934
?
Compiler design lecture 1 introduction computer science
Compiler design lecture 1 introduction computer science
RavneetSharma5
?
Compiler Design Introduction With Design
Compiler Design Introduction With Design
rashmishekhar81
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
An Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
?
Parser
Parser
Ghufran Hashmi
?
Lexical analyzer
Lexical analyzer
Ashwini Sonawane
?
Lexical Analysis.pdf
Lexical Analysis.pdf
BiswanathSethi2
?
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
?
3.2
3.2
Samimvez
?
Chapter 2.pptx compiler design lecture note
Chapter 2.pptx compiler design lecture note
adugnanegero
?
Compiler an overview
Compiler an overview
amudha arul
?
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
Jyothishmathi Institute of Technology and Science Karimnagar
?
A Role of Lexical Analyzer
A Role of Lexical Analyzer
Archana Gopinath
?
1 compiler outline
1 compiler outline
ASHOK KUMAR REDDY
?
Cd ch2 - lexical analysis
Cd ch2 - lexical analysis
mengistu23
?
Unit2_CD.pptx more about compilation of the day
Unit2_CD.pptx more about compilation of the day
k12196987
?
Compiler_Lecture1.pdf
Compiler_Lecture1.pdf
AkarTaher
?
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
DrIsikoIsaac
?
universal human values L 14 Trust v4.ppt
universal human values L 14 Trust v4.ppt
ranjan317165
?
Universal human values self and body chapter
Universal human values self and body chapter
ranjan317165
?

More Related Content

Similar to compiler introduction vtu syllabus 1st chapter.pptx (20)

Phases of Compiler.pptx
Phases of Compiler.pptx
ssuser3b4934
?
Compiler design lecture 1 introduction computer science
Compiler design lecture 1 introduction computer science
RavneetSharma5
?
Compiler Design Introduction With Design
Compiler Design Introduction With Design
rashmishekhar81
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
An Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
?
Parser
Parser
Ghufran Hashmi
?
Lexical analyzer
Lexical analyzer
Ashwini Sonawane
?
Lexical Analysis.pdf
Lexical Analysis.pdf
BiswanathSethi2
?
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
?
3.2
3.2
Samimvez
?
Chapter 2.pptx compiler design lecture note
Chapter 2.pptx compiler design lecture note
adugnanegero
?
Compiler an overview
Compiler an overview
amudha arul
?
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
Jyothishmathi Institute of Technology and Science Karimnagar
?
A Role of Lexical Analyzer
A Role of Lexical Analyzer
Archana Gopinath
?
1 compiler outline
1 compiler outline
ASHOK KUMAR REDDY
?
Cd ch2 - lexical analysis
Cd ch2 - lexical analysis
mengistu23
?
Unit2_CD.pptx more about compilation of the day
Unit2_CD.pptx more about compilation of the day
k12196987
?
Compiler_Lecture1.pdf
Compiler_Lecture1.pdf
AkarTaher
?
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
DrIsikoIsaac
?
Phases of Compiler.pptx
Phases of Compiler.pptx
ssuser3b4934
?
Compiler design lecture 1 introduction computer science
Compiler design lecture 1 introduction computer science
RavneetSharma5
?
Compiler Design Introduction With Design
Compiler Design Introduction With Design
rashmishekhar81
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
Compier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
?
An Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
?
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
?
Chapter 2.pptx compiler design lecture note
Chapter 2.pptx compiler design lecture note
adugnanegero
?
Compiler an overview
Compiler an overview
amudha arul
?
Cd ch2 - lexical analysis
Cd ch2 - lexical analysis
mengistu23
?
Unit2_CD.pptx more about compilation of the day
Unit2_CD.pptx more about compilation of the day
k12196987
?
Compiler_Lecture1.pdf
Compiler_Lecture1.pdf
AkarTaher
?
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
DrIsikoIsaac
?

More from ranjan317165 (18)

universal human values L 14 Trust v4.ppt
universal human values L 14 Trust v4.ppt
ranjan317165
?
Universal human values self and body chapter
Universal human values self and body chapter
ranjan317165
?
L 13 universal human values Harmony in the Family v4.ppt
L 13 universal human values Harmony in the Family v4.ppt
ranjan317165
?
L 20 Mutual Fulfilment in Nature uhv lectures v5.ppt
L 20 Mutual Fulfilment in Nature uhv lectures v5.ppt
ranjan317165
?
Module 4 Project management by ranjan v.pptx
Module 4 Project management by ranjan v.pptx
ranjan317165
?
Software Requiremnet analysis module 2.pptx
Software Requiremnet analysis module 2.pptx
ranjan317165
?
Introduction-to-Programming-Languages.pptx
Introduction-to-Programming-Languages.pptx
ranjan317165
?
Information system securit lecture 1y .ppt
Information system securit lecture 1y .ppt
ranjan317165
?
C functions with exercise to solve easily.pptx
C functions with exercise to solve easily.pptx
ranjan317165
?
C functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptx
ranjan317165
?
L 27 Holistic Technologies v5 universal human values.ppt
L 27 Holistic Technologies v5 universal human values.ppt
ranjan317165
?
06_PumpingLemma compiler design of chapter 4.ppt
06_PumpingLemma compiler design of chapter 4.ppt
ranjan317165
?
CS540-2-lecture2 Lexical analyser of .ppt
CS540-2-lecture2 Lexical analyser of .ppt
ranjan317165
?
atc 3rd module compiler and automata.ppt
atc 3rd module compiler and automata.ppt
ranjan317165
?
role of lexical parser compiler design1-181124035217.pdf
role of lexical parser compiler design1-181124035217.pdf
ranjan317165
?
15CS46 - Data communication or computer networks 1_Module-3.ppt
15CS46 - Data communication or computer networks 1_Module-3.ppt
ranjan317165
?
Ppt on Design engineering which is chapter 9
Ppt on Design engineering which is chapter 9
ranjan317165
?
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
ranjan317165
?
universal human values L 14 Trust v4.ppt
universal human values L 14 Trust v4.ppt
ranjan317165
?
Universal human values self and body chapter
Universal human values self and body chapter
ranjan317165
?
L 13 universal human values Harmony in the Family v4.ppt
L 13 universal human values Harmony in the Family v4.ppt
ranjan317165
?
L 20 Mutual Fulfilment in Nature uhv lectures v5.ppt
L 20 Mutual Fulfilment in Nature uhv lectures v5.ppt
ranjan317165
?
Module 4 Project management by ranjan v.pptx
Module 4 Project management by ranjan v.pptx
ranjan317165
?
Software Requiremnet analysis module 2.pptx
Software Requiremnet analysis module 2.pptx
ranjan317165
?
Introduction-to-Programming-Languages.pptx
Introduction-to-Programming-Languages.pptx
ranjan317165
?
Information system securit lecture 1y .ppt
Information system securit lecture 1y .ppt
ranjan317165
?
C functions with exercise to solve easily.pptx
C functions with exercise to solve easily.pptx
ranjan317165
?
C functions by ranjan call by value and reference.pptx
C functions by ranjan call by value and reference.pptx
ranjan317165
?
L 27 Holistic Technologies v5 universal human values.ppt
L 27 Holistic Technologies v5 universal human values.ppt
ranjan317165
?
06_PumpingLemma compiler design of chapter 4.ppt
06_PumpingLemma compiler design of chapter 4.ppt
ranjan317165
?
CS540-2-lecture2 Lexical analyser of .ppt
CS540-2-lecture2 Lexical analyser of .ppt
ranjan317165
?
atc 3rd module compiler and automata.ppt
atc 3rd module compiler and automata.ppt
ranjan317165
?
role of lexical parser compiler design1-181124035217.pdf
role of lexical parser compiler design1-181124035217.pdf
ranjan317165
?
15CS46 - Data communication or computer networks 1_Module-3.ppt
15CS46 - Data communication or computer networks 1_Module-3.ppt
ranjan317165
?
Ppt on Design engineering which is chapter 9
Ppt on Design engineering which is chapter 9
ranjan317165
?
FiniteAutomata_anim.pptx
FiniteAutomata_anim.pptx
ranjan317165
?
Ad

Recently uploaded (20)

Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
?
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
?
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
?
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
?
How to Un-Obsolete Your Legacy Keypad Design
How to Un-Obsolete Your Legacy Keypad Design
Epec Engineered Technologies
?
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
?
Mechanical Vibration_MIC 202_iit roorkee.pdf
Mechanical Vibration_MIC 202_iit roorkee.pdf
isahiliitr
?
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
?
Learning – Types of Machine Learning – Supervised Learning – Unsupervised UNI...
Learning – Types of Machine Learning – Supervised Learning – Unsupervised UNI...
23Q95A6706
?
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
?
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
?
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
?
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
?
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
IJCNCJournal
?
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
?
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
?
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
?
最新版美国圣莫尼卡学院毕业证(厂惭颁毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(厂惭颁毕业证书)原版定制
Taqyea
?
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
?
Tally.ERP 9 at a Glance.book - Tally Solutions .pdf
Tally.ERP 9 at a Glance.book - Tally Solutions .pdf
Shabista Imam
?
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
?
Complete guidance book of Asp.Net Web API
Complete guidance book of Asp.Net Web API
Shabista Imam
?
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
?
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
Introduction to Natural Language Processing - Stages in NLP Pipeline, Challen...
resming1
?
Machine Learning - Classification Algorithms
Machine Learning - Classification Algorithms
resming1
?
Mechanical Vibration_MIC 202_iit roorkee.pdf
Mechanical Vibration_MIC 202_iit roorkee.pdf
isahiliitr
?
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
?
Learning – Types of Machine Learning – Supervised Learning – Unsupervised UNI...
Learning – Types of Machine Learning – Supervised Learning – Unsupervised UNI...
23Q95A6706
?
Fundamentals of Digital Design_Class_21st May - Copy.pptx
Fundamentals of Digital Design_Class_21st May - Copy.pptx
drdebarshi1993
?
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
?
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
?
Microwatt: Open Tiny Core, Big Possibilities
Microwatt: Open Tiny Core, Big Possibilities
IBM
?
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
A Cluster-Based Trusted Secure Multipath Routing Protocol for Mobile Ad Hoc N...
IJCNCJournal
?
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
362 Alec Data Center Solutions-Slysium Data Center-AUH-Adaptaflex.pdf
djiceramil
?
Proposal for folders structure division in projects.pdf
Proposal for folders structure division in projects.pdf
Mohamed Ahmed
?
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
?
最新版美国圣莫尼卡学院毕业证(厂惭颁毕业证书)原版定制
最新版美国圣莫尼卡学院毕业证(厂惭颁毕业证书)原版定制
Taqyea
?
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
?
Tally.ERP 9 at a Glance.book - Tally Solutions .pdf
Tally.ERP 9 at a Glance.book - Tally Solutions .pdf
Shabista Imam
?
Ad

compiler introduction vtu syllabus 1st chapter.pptx

  • 2. ? Computer programs are generally written in high-level languages (like C++, Python, and Java). A language processor, or language translator, is a computer program that convert source code from one programming language to another language or human readable language ? A compiler is a program that can read a program in one language i.e the source language and translate it into an equivalent program in another language which is the target language. A compiler
  • 5. What Is an Interpreter? ? It is a program that functions for the translation of a programming language into a comprehensible one. ? It is a computer program used for converting high-level program statements into machine codes. It includes pre-compiled code, source code, and scripts. ? An interpreter translates only one statement at a time of the program. ? They create an exe of the programming language before the program runs.
  • 7. ? Lexical Analysis: Lexical analysis or Lexical analyzer is the initial stage or phase of the compiler. This phase scans the source code and transforms the input program into a series of a token. ? A token is basically the arrangement of characters that defines a unit of information in the source code. NOTE: In computer science, a program that executes the process of lexical analysis is called a scanner, tokenizer, or lexer.
  • 8. ?To read the input character in the source code and produce a token is the most important task of a lexical analyzer. ?The lexical analyzer goes through with the entire source code and identifies each token one by one. The scanner is responsible to produce tokens when it is requested by the parser. ?The lexical analyzer avoids the whitespace and comments while creating these tokens. If any error occurs, the analyzer correlates these errors with the source file and line number.
  • 9. There are three terminologies- ? Token ? Pattern ? Lexeme Token: It is a sequence of characters that represents a unit of information in the source code. Pattern: The description used by the token is known as a pattern. Lexeme: A sequence of characters in the source code, as per the matching pattern of a token, is known as lexeme. It is also called the instance of a token.
  • 10. The lexical analyzer performs the following tasks- ? The lexical analyzer is responsible for removing the white spaces and comments from the source program. ? It corresponds to the error messages with the source program. ? It helps to identify the tokens. ? The input characters are read by the lexical analyzer from the source code.