Which of the following statements is/are FALSE?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2024 Set 2 · Q29
Time
Select all that applyOne or more correct
Solution
Official answer: B) The attributes in a L-attributed definition cannot always be evaluated in a depth-first order; D) All L-attributed definitions based on LR(1) grammar can be evaluated using a bottom-up parsing strategy
Syntax-Directed TranslationA is TRUE: An SDD without side effects in its semantic actions is known as an attribute grammar.
B is FALSE: By definition, attributes in any L-attributed definition can always be evaluated in a depth-first, left-to-right traversal.
C is TRUE: Synthesized attributes can be evaluated during bottom-up parsing alongside reductions.
D is FALSE: Not all L-attributed SDDs based on an LR(1) grammar can be evaluated during bottom-up parsing without grammar modification.
Thus, the false statements are B and D.
Try the question first, then check your work.
Examiner trap
Recall the definitions of L-attributed SDDs and their traversal requirements, as well as the conditions for bottom-up attribute evaluation.
This Syntax-Directed Translation previous year question is Q29 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Syntax-Directed Translation in Compiler Design, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Syntax-Directed Translation PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Syntax-Directed Translation has 9 GATE CSE PYQs across 9 papers from 2016 to 2026. This is the only 1-mark MSQ among them, and it is the only one in GATE CSE 2024 Set 2.
How GATE tests Syntax-Directed TranslationIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.