A shift-reduce parser carries out the actions specified within braces…
A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.
S → x x W [print “1”]
S → y [print “2”]
W → S z [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
Attempted by 33 students.
Sign up free to check your answer
Sign up freeLoading lesson…

