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