GATE CS 2019 (Forenoon) — Question 46

Compiler DesignSyntax-Directed Translation & Runtime EnvironmentsMCQ2 marks · −2/3 if wrongHard

Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let \( X_1, X_2, X_3, X_4, X_5 \) and \( X_6 \) be the place holders for the non-terminals D, T, L or \( L_1 \) in the following table:
Question image
Which one of the following are the appropriate choices for \( X_1, X_2, X_3 \) and \( X_4 \)?
  1. A
    \( X_1 = L, X_2 = T, X_3 = L_1, X_4 = L \)
  2. B
    \( X_1 = T, X_2 = L, X_3 = L_1, X_4 = T \)
  3. C
    \( X_1 = L, X_2 = L, X_3 = L_1, X_4 = T \)
  4. D
    \( X_1 = T, X_2 = L, X_3 = T, X_4 = L_1 \)
Practise the full 2019-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkCompilers: Principles, Techniques & ToolsThe "Dragon Book" for parsing, syntax-directed translation and code generation.
Practise more on Syntax-Directed Translation & Runtime EnvironmentsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group