← 🧮 Syntax-Directed Translation
Subtopic 2 of 5

6.2S-attributed and L-attributed definitions

S-attributed: only synthesized attributes (evaluate bottom-up, fits LR parsing). L-attributed: inherited attributes depend only on the parent and left siblings (fits one left-to-right depth-first pass). Every S-attributed definition is L-attributed.

What kind of definition is this? · question 1 of 6

A → B C { A.s = B.s + C.s }

Previous year questions: Syntax-Directed Translation (9)

PYQs are grouped by topic, so this is the full set for Syntax-Directed Translation; try the ones that match this subtopic. Open all 9 on the topic page.