Syntax-directed translation formulas
Syntax-directed translation. 3 formulas for GATE CS Compiler Design, each with when to use it. Each is explained in the topic notes.
IAE Academy: Syntax-directed translation formulas (GATE CS)
All 3 Syntax-directed translation formulas
FORM OF A SYNTHESIZED RULE
The attribute being defined belongs to the head ; its arguments are attributes of the body symbols (or of itself).
FORM OF AN INHERITED RULE
The attribute being defined belongs to a body symbol ; the arguments may be attributes of the head and of the body symbols.
L-ATTRIBUTED CONDITION
Also allowed: dependence on other attributes of itself, provided that creates no cycle. Not allowed: dependence on a synthesized attribute of the head . Synthesized attributes of may use any attribute in the production, including 's inherited attributes, provided no cycle results.
Where this was asked: 2020 (1), 2022 (1), 2023 (1), 2024 (2), 2025 (1), 2026 (1). See the 7 previous-year questions on Syntax-directed translation. This shows what was asked, not what will be asked.