Abstract Attribute grammars are a useful formalism for the specification of computations on structured terms. The classical definition of attribute grammars, however, has no way of treating conditionals non-strictly. Consequently, the natural way of expressing many otherwise well-behaved computations involves a circularity. This paper presents conditional attribute grammars , an extension of attribute grammars that enables more precise analysis of conditionals. In conditional attribute grammars, attribute equations may have guards.
Equations are active only when their guards are satisfied.
The standard attribute grammar evaluation classes are definable for conditional attribute grammars, and the corresponding evaluation techniques can be easily adapted. The article is also available through the ACM digital library . The first full paragraph on page 99 incorrectly explains Kastens' algorithm as proceeding from sources to sinks in the graph when it actually does the reverse. It also glosses over the difference between a total order and a sequence of partitions. This process is continued until all attributes have been handled.