Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
2.6k views
in General by (72.7k points)
closed by
Type of conflicts that can arise in LR(0) techniques are _____.
1. Shift-reduce conflict
2. Shift-Shift conflict
3. Both "Shift-reduce conflict" and "Shift-Shift conflict"
4. None of the options

1 Answer

0 votes
by (121k points)
selected by
 
Best answer
Correct Answer - Option 1 : Shift-reduce conflict
  • Shift reduce parsing is a type bottom-up parsing, It applies the production rules in a reverse manner to reach the start symbol. Shift reduce parsers are LR parser, SLR parser, LALR parser.
  • In shift-reduce parsing, there is two types of conflicts: one is shift-reduce conflict (SR conflict) and another is reduce – reduce conflict (RR) conflict.

Shift reduce conflict:

It is caused when grammar allows a production rule to be reduced in a state and in the same state another production rule is shifted for same token.

Reduce – reduce conflict:

It is when two or more productions apply to the same sequence of inputs. This time grammar becomes ambiguous because a program can be interpreted in more than one way.

Type of conflicts that can arise in LR(0) techniques are Shift-reduce conflict and Reduce – reduce conflict

Therefore only option 1 is valid 

Shift-Shift conflict is not a conflict

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...