Topics in Syntax Directed Translation

Filter by year

Syntax Directed Translation questions

Q53

GATE CS 2026 CS-1Syntax Directed TranslationMSQ2 marks
Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations.

DD is the start symbol, and intint, floatfloat and idid are the three terminals. The non-terminal V1V_1 is the same as VV and the non-terminal D1D_1 is the same as DD. Here, the subscript is used to differentiate the grammar symbols on the two sides of a production. The function putput updates the symbol table with the type information for an identifier.

Let P and Q be the languages specified by grammars G1 and G2, respectively.

Which of the following statements is/are true?
Question figure
More than one option can be correct.
Show answer without attempting

Answer: A, B, D

0/10 correct0 marks

Related topics in Compiler Design