A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

Discussion Forum

Que. Shift-Reduce parsers perform the following :
a. Shift step that advances in the input stream by K(K > 1) symbols and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol.
b. Shift step that advances in the input stream by one symbol and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol.
c. Shift step that advances in the input stream by K(R = 2) symbols and Reduce step that applies a completed grammar rule to form a single tree.
d. Shift step that does not advance in the input stream and Reduce step that applies a completed grammar rule to form a single tree.
Answer:Shift step that advances in the input stream by one symbol and Reduce step that applies a completed grammar rule to some recent parse trees, joining them together as one tree with a new root symbol.
Confused About the Answer? Ask for Details Here
Know Explanation? Add it Here

Similar Questions: