A shift-reduce parser suffers from
2014
A shift-reduce parser suffers from
- A.
shift reduce conflict only
- B.
reduce reduce conflict only
- C.
both shift reduce conflict and reduce reduce conflict
- D.
shift handle and reduce handle conflicts
Attempted by 101 students.
Show answer & explanation
Correct answer: C
Shift-reduce parsers are bottom-up parsing methods that utilize a stack to process input symbols.
These parsers can encounter ambiguity where they must decide between shifting the next symbol or reducing a handle, known as shift-reduce conflict.
Furthermore, ambiguity can arise when multiple reduction rules apply to the same stack content, causing reduce-reduce conflict.
Consequently, both shift-reduce and reduce-reduce conflicts are potential issues in shift-reduce parsing strategies.
A video solution is available for this question — log in and enroll to watch it.