Question

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->sz{print “3”} what is the translation of “xxxxyzz”

A 11231
B 11233
C 23131
D 233321

Answer & Explanation

Answer: Option [C]