SlideShare a Scribd company logo
3
Most read
5
Most read
7
Most read
ELEMINATION OF LEFT RECURSION
Wellcome to our presentation.
Slide 1
Group Members
 MAHMUDULHASAN
Slide 2
 What is left recursion?
 Eliminating left Recursion...
 Example of Eliminating Left Recursion
 Conclusion
 Reference
 Code part
Slide 3
OVERVIEW
 In the formal language theory of computer science , left recursion is a
special case of recursion where a string is recognized as part of a language
by the fact that it decomposes into a string from that same language (on the
left) and a suffix (on the right). For instance 1+2+3 can be recognized as a
sum because it can be broken into 1+2, also a sum, and +3, a suitable
suffix.
Slide 4
 Eliminate left Recursion
 Context Free Grammar
Slide 5
LEFT RECURSION
 The production is left-recursive if the leftmost symbol on the
right side is the same as the non terminal on the left side. For
example,
expr → expr + term.
 If one were to code this production in a recursive-descent
parser, the parser would go in an infinite loop.
Slide 6
 We can eliminate the left-recursion by introducing new nonterminals and
new productions rules.
 For example, the left-recursive grammar is:
E → E + T | T
E → T * F | F
F → (E) | id.
We can redefine E and T without left-recursion as
E → TE`
E`→ + TE` | E
T → FT`
T → * FT` | E
F → (E) | id
Getting rid of such immediate left recursion is not enough. One must get rid of
indirect left recursion too, where two or more nonterminals are mutually left-
recursive
Slide 7
Inquiry
2014-2-60-035@ewu.edu.bd
Slide 8
Referrance
 https://en.wikipedia.org/wiki/Left_recursio
n
http://www.csd.uwo.ca/~moreno/CS447/Lect
ures/Syntax.html/node8.html
www.google.com
Slide 9

More Related Content

PDF
operating system structure
PDF
Lecture Notes-Finite State Automata for NLP.pdf
PPTX
Asymptotic notations
PPT
Complexity of Algorithm
DOC
Unit 2 in daa
PPT
Deadlock
PPTX
Ambiguous & Unambiguous Grammar
PDF
Address in the target code in Compiler Construction
operating system structure
Lecture Notes-Finite State Automata for NLP.pdf
Asymptotic notations
Complexity of Algorithm
Unit 2 in daa
Deadlock
Ambiguous & Unambiguous Grammar
Address in the target code in Compiler Construction

What's hot (20)

PPTX
Process in operating system
PPTX
Java package
PPT
Lecture 1 - Lexical Analysis.ppt
PPTX
Lexical Analysis - Compiler Design
PPTX
Performance analysis(Time & Space Complexity)
PPT
Intermediate code generation (Compiler Design)
PPTX
[OOP - Lec 08] Encapsulation (Information Hiding)
PPT
Intro automata theory
PPTX
Critical section problem in operating system.
PPTX
Semantic nets in artificial intelligence
PPT
Sum of subsets problem by backtracking 
PPTX
Language for specifying lexical Analyzer
PPTX
Means End Analysis (MEA) in Artificial.pptx
PPTX
input buffering in lexical analysis in CD
PPTX
Evolution of os
PPTX
Query processing
PPT
Multi Head, Multi Tape Turing Machine
PDF
Major and Minor Elements of Object Model
PPTX
Code Optimization
PPTX
Predicate logic
Process in operating system
Java package
Lecture 1 - Lexical Analysis.ppt
Lexical Analysis - Compiler Design
Performance analysis(Time & Space Complexity)
Intermediate code generation (Compiler Design)
[OOP - Lec 08] Encapsulation (Information Hiding)
Intro automata theory
Critical section problem in operating system.
Semantic nets in artificial intelligence
Sum of subsets problem by backtracking 
Language for specifying lexical Analyzer
Means End Analysis (MEA) in Artificial.pptx
input buffering in lexical analysis in CD
Evolution of os
Query processing
Multi Head, Multi Tape Turing Machine
Major and Minor Elements of Object Model
Code Optimization
Predicate logic
Ad

Similar to Elimination of left recursion (20)

PPTX
Left recursion
PPTX
Cs419 lec10 left recursion and left factoring
PPT
Lecture 05 syntax analysis 2
PPTX
Natural Language Processing - Writing Grammar
PDF
Lecture7 syntax analysis_3
PDF
20DCE096_dlp_prac5.pdf
PPT
lect08.ppt
PPT
Top_down_Parsing_ full_detail_explanation
PPT
Ll(1) Parser in Compilers
PPTX
Compiler Design_Syntax Analyzer_Top Down Parsers.pptx
PDF
Topdown parsing
PDF
Topdown parsing
PPTX
PARSER .pptx
PDF
Syntax Analysis PPTs for Third Year Computer Sc. and Engineering
PPTX
3. Syntax Analyzer.pptx
PPT
PPTX
Syntax Analysis.pptx
PDF
Compiler unit 2&3
PPTX
5-Introduction to Parsing and Context Free Grammar-09-05-2023.pptx
Left recursion
Cs419 lec10 left recursion and left factoring
Lecture 05 syntax analysis 2
Natural Language Processing - Writing Grammar
Lecture7 syntax analysis_3
20DCE096_dlp_prac5.pdf
lect08.ppt
Top_down_Parsing_ full_detail_explanation
Ll(1) Parser in Compilers
Compiler Design_Syntax Analyzer_Top Down Parsers.pptx
Topdown parsing
Topdown parsing
PARSER .pptx
Syntax Analysis PPTs for Third Year Computer Sc. and Engineering
3. Syntax Analyzer.pptx
Syntax Analysis.pptx
Compiler unit 2&3
5-Introduction to Parsing and Context Free Grammar-09-05-2023.pptx
Ad

More from Mahmudul Hasan (14)

PPTX
C Programming Loop
PPTX
E commerce Website
PPTX
5 g architecture and application
PPTX
Car parking system
PPTX
Software company
PPTX
Avl tree
PPTX
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB
PPTX
Design pipeline architecture for various stage pipelines
PPTX
2 bit alu
PPTX
গুড়পুকুরের মেলা
PPTX
Emergency system AI presentation Using Prolog
PPT
Bank management system
PPTX
Hospital management system DBMS PROJECT USING APEX 5.04
PPTX
Digital search tree
C Programming Loop
E commerce Website
5 g architecture and application
Car parking system
Software company
Avl tree
PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB
Design pipeline architecture for various stage pipelines
2 bit alu
গুড়পুকুরের মেলা
Emergency system AI presentation Using Prolog
Bank management system
Hospital management system DBMS PROJECT USING APEX 5.04
Digital search tree

Recently uploaded (20)

PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
UNIT 4 Total Quality Management .pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
DOCX
573137875-Attendance-Management-System-original
PPT
Project quality management in manufacturing
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Construction Project Organization Group 2.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
UNIT 4 Total Quality Management .pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Foundation to blockchain - A guide to Blockchain Tech
573137875-Attendance-Management-System-original
Project quality management in manufacturing
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
CH1 Production IntroductoryConcepts.pptx
bas. eng. economics group 4 presentation 1.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Safety Seminar civil to be ensured for safe working.
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Construction Project Organization Group 2.pptx

Elimination of left recursion