Line 23: | Line 23: | ||
* [[Attribute Grammars/Exercise 10: Expressions and bases|Exercise 10: Expressions and bases]] | * [[Attribute Grammars/Exercise 10: Expressions and bases|Exercise 10: Expressions and bases]] | ||
− | [[category: | + | [[category:Compiladores]] |
− | [[category: | + | [[category:Ensino]] |
Topics: attributes in grammar symbols; syntax-directed evaluation.
Synthesized attributes: passed from child nodes to parent nodes.
Inherited attributes: may be passed from parent- to child nodes or between siblings.
S-attributed grammars: only synthesized attributes.
L-attributed grammars: inherited attributes are only dependent on the parents' attributes or on the older siblings' (i.e., when evaluating left-to-right, only previously seen attributes are needed).