Topics in Syntax Directed Translation

Filter by year

Syntax Directed Translation questions

Q46

GATE CS 2016 CS-1Syntax Directed TranslationMCQ2 marks−2/3 if wrong
Consider the following Syntax Directed Translation Scheme (SDTS), with non-terminals {S, A} and terminals {a, b}.
S→aA{print 1}S \to aA \{ \text{print } 1 \}
S→a{print 2}S \to a \{ \text{print } 2 \}
A→Sb{print 3}A \to Sb \{ \text{print } 3 \}
Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:
Show answer without attempting

Answer: C

0/10 correct0 marks

Related topics in Compiler Design