A shift reduce parser carries out the actions specified with in braces immediately after reducing with the corresponding rule of grammar.
S -> AS { print 1 }
S -> AB { print 2 }
A -> a { print 3 }
B -> bC { print 4 }
B -> dB { print 5 }
C -> c { print 6 }
This SDT scheme translates a language whose terminal symbols are a, b, c and d into another language whose terminal symbols are 1, 2, 3, 4, 5, 6. What is the translation of "aaadbc" ?
A) 333546211
B) 654211
C) 645323131
D) 645233311