Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

Compiler Design

GATE CSE & IT · Compiler Design - Syntax Directed Translation · 1998-2025

25
PYQs
92%
keyed
0
elite explanations
12
years appeared

Study anchor

Source-book anchor pending for this concept.

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2025 Q12

Which ONE of the following statements is FALSE regarding the symbol table?

mediumanswer key
2025 Q22

Given 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 + D.i; D.i = C.i + 2; } Rule 3: Q → EF {...

mediumanswer key
2025 Q46

Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?

mediumanswer key
2025 Q51

Consider two grammars G₁ and G₂ with the production rules given below: G₁: S → if E then S | if E then S else S | a E → b G₂: S → if E then S | M M → if E then M else S | c E → b w...

mediumanswer key
2025 Q52

Refer to the given 3-address code sequence. This code sequence is split into basic blocks. The number of basic blocks is ________. (Answer in integer) 1001: i = 1 1002: j = 1 1003:...

mediumanswer key
2025 PYQ

Which of the following statement(s) is/are TRUE while computing First and Follow during top down parsing by a compiler?

easyanswer keybasic explanation
2024 Q21

Consider the following two sets: Set X P. Lexical Analyzer Q. Syntax Analyzer R. Intermediate Code Generator S. Code Optimizer Set Y 1. Abstract Syntax Tree 2. Token 3. Parse Tree...

mediumanswer key
2024 Q29

Which of the following statements is/are FALSE?

mediumanswer key
2024 Q37

Consider the following syntax-directed definition (SDD). S → DHTU { S.val = D.val + H.val + T.val + U.val; } D → "M"D₁ { D.val = 5 + D₁.val; } D → ε { D.val = -5; } H → "L"H₁ { H.v...

mediumanswer key
2024 Q39

Consider the following pseudo-code. L1: t1 = -1 L2: t2 = 0 L3: t3 = 0 L4: t4 = 4 * t3 L5: t5 = 4 * t2 L6: t6 = t5 * M L7: t7 = t4 + t6 L8: t8 = a[t7] L9: if t8 <= max goto L11 L10:...

mediumanswer key
2024 Q40

Consider the following context-free grammar where the start symbol is S and the set of terminals is {a,b,c,d}. S → AaAb | BbBa A → cS | ε B → dS | ε The following is a partially-fi...

mediumanswer key
2024 Q43

Consider the following expression: x[i] = (p + r) * -s[i] + u/w. The following sequence shows the list of triples representing the given expression, with entries missing for triple...

mediumanswer key
2024 PYQ

Which of the following is/are Bottom-Up Parser(s)?

easyanswer keybasic explanation
2024 PYQ

Consider the following expression: $x[i] = (p + r) * -s[i] + \frac{u}{w}$. The following sequence shows the list of triples representing the given expression, with entries missing...

mediumanswer keybasic explanation
2023 PYQ

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...

mediumbasic explanation
2019 PYQ

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 placeholders for the n...

mediumanswer keybasic explanation
2019 PYQ

Consider the augmented grammar given below : S' → S S → 〈L〉 | id L → L,S | S Let I 0 = CLOSURE ({[S' → ●S]}). The number of items in the set GOTO (I 0 , 〈 ) is: _____.

mediumbasic explanation
2017 Q32

Consider the following expression grammar G: E -> E - T | T T -> T + F | F F -> (E) | id Which of the following grammars is not left recursive, but is equivalent to G?

mediumanswer key
2015 PYQ

Consider the intermediate code given below. (1) i = 1 (2) j = 1 (3) t1 = 5 ∗ i (4) t2 = t1 + j (5) t3 = 4 ∗ t2 (6) t4 = t3 (7) a[t4] = -1 (8) j = j + 1 (9) if j<=5 goto (3) (10) i=...

mediumanswer key
2014 PYQ

Which of the following statements are CORRECT? 1) Static allocation of all data areas by a compiler makes it impossible to implement recursion. 2) Automatic garbage collection is e...

mediumanswer key
2011 PYQ

In a compiler, keywords of a language are recognized during

easyanswer key
2010 PYQ

Which data structure in a compiler is used for managing information about variables and their attributes?

easyanswer key
2008 PYQ

Some code optimizations are carried out on the intermediate code because

easyanswer key
2006 PYQ

Consider the following grammar. $$\eqalign{ & S \to S*E \cr & S \to E \cr & E \to F + E \cr & E \to F \cr & F \to id \cr} $$ Consider the following LR(0) items corresponding to the...

mediumanswer key
1998 PYQ

Which of the following statements is true?

easyanswer key