L-attributed definitions
. When translation takes place during parsing, order of evaluation is linked to the order in which nodes are created
. A natural order in both top-down and bottom-up parsing is depth first-order
. L-attributed definition: where attributes can be evaluated in depth-first order
L-attributed definitions are a class of syntax-directed definitions where attributes can always be evaluated in depth first order. (L is for left as attribute information appears to flow from left to right). Even if the parse tree is not actually constructed, it is useful to study translation during parsing by considering depth-first evaluation of attributes at
the nodes of a parse tree.
|