Computer Sciences > Gate 2016 Set-1 > SDT
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}.

S −→ aA { print 1 }
S −→ a { print 2 }
A −→ Sb { print 3 }


Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
A
1 3 2
B
2 2 3
C
2 3 1
D
Syntax Error

Explanation

Correct : SDT

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science