Computer Science Fundamentals Algorithms Objective
Mar 05, 2013

Following syntax-directed translation scheme is used with a shift reduction (bottom up) parser that perform the action in braces immediately after a reduction by the corresponding production

A  —> aB  {print “(1)” A —> c {print “1”),
B —> Ab  {print *2”}.

When parser is aaacbbb, then string printed

Choose the correct answer:
A) 0202021
B) 1202020
C) 1020202
D) 0101012
Detailed Explanation

Option a is right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback