Consider the syntax directed translation given by the following grammar and semantic rules. Here N, I, F and B are non-terminals. N is the starting non-terminal, and #, 0 and 1 are lexical tokens corresponding to input letters "#", "0" and "1", respectively. X.val denotes the synthesized attribute (a numeric value) associated with a non-terminal X. and denote occurrences of I and F on the right hand side of a production, respectively. For the tokens 0 and 1, and .
The value computed by the translation scheme for the input string 10#011 is ________. (Rounded off to three decimal places)
GATE CS 2023 (Forenoon) — Question 60
Compiler DesignSyntax-Directed Translation & Runtime EnvironmentsNAT2 marksHard
A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.
More on Syntax-Directed Translation & Runtime Environments
- GATE CS 2026 (Forenoon) · Q53Consider the following two syntax-directed definitions SDD1 and SDD2 for type declarations. D is the start symbol, and int, float and id ar…
- GATE CS 2025 (Forenoon) · Q12Which ONE of the following statements is FALSE regarding the symbol table?
- GATE CS 2025 (Afternoon) · Q22Given the following syntax directed translation rules: Rule 1: R AB \ B.i = R.i - 1; A.i = B.i; R.i = A.i + 1;\ Rule 2: P CD \ P.i = C.i +…
- GATE CS 2024 (Forenoon) · Q37Consider the following syntax-directed definition (SDD). Given “MMLK” as the input, which one of the following options is the CORRECT value…
- GATE CS 2024 (Afternoon) · Q29Which of the following statements is/are FALSE?
- GATE CS 2022 (Forenoon) · Q65Consider the following grammar along with translation rules. S S 1 \ T \ S.val = S 1.val T.val\ S T \ S.val = T.val\ T T 1 \% R \ T.val = T…

