A syntax-directed definition (SDD) is a context-free grammar with attributes and semantic rules. Attributes are associated with grammar symbols and rules are associated with productions. An SDD can be evaluated on a parse tree to compute attribute values at each node. There are two types of attributes: synthesized attributes depend on child nodes, while inherited attributes depend on parent or sibling nodes. The order of evaluation is determined by a dependency graph showing the flow of information between attribute instances.