Attributes and Attribute Grammars
Attributes
- variables (type,offset,first or last occurrence,...)
- constants (type, value, scope, ...)
Attribute grammar(Syntax-directed definition)
- A generalization of CFG in which each grammar symbol has an associated set of attributes
- Semantics rules for computing attribute values