Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

  1. 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 :
    1. 1 3 2
    2. 2 2 3
    3. 2 3 1
    4. syntax error
Correct Option: C



Your comments will be displayed only after manual approval.