...
Question 7941 – Computer-Networks
May 2, 2024
Question 3497 – Higher-Education-and-Politics
May 2, 2024
Question 7941 – Computer-Networks
May 2, 2024
Question 3497 – Higher-Education-and-Politics
May 2, 2024

Question 4920 – UGC NET CS 2014 June-paper-2

A shift reduce parser suffers from

Correct Answer: C

Question 8 Explanation: 
→ A shift-reduce parser scans and parses the input text in one forward pass over the text, without backing up. (That forward direction is generally left-to-right within a line, and top-to-bottom for multi-line inputs.) The parser builds up the parse tree incrementally, bottom up, and left to right, without guessing or backtracking.
A shift-reduce parser works by doing some combination of Shift steps and Reduce steps, hence the name.
→ A Shift step advances in the input stream by one symbol. That shifted symbol becomes a new single-node parse tree.
→ A Reduce step applies a completed grammar rule to some of the recent parse trees, joining them together as one tree with a new root symbol.
*** A shift reduce parser suffers from both shift reduce conflict and reduce reduce conflict.
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
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!