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. A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.

S -> xxW[print“1”]
S -> y[print“2”]
W -> S2[print“3”], what is the translation of “x x x x y z z”?
a. 1 1 2 3 1
b. 1 1 2 3 3
c. 2 3 1 3 1
d. 2 3 3 2 1
Answer:2 3 1 3 1


View All Questions on: Phases of Compiler


Start The Conversation: