In this section we introduce the notion of conditional production. The syntax proposed here, reminiscent of guards, is very simple; we will later discuss its restrictions and possible extensions. These new productions allow the specification of different sets of semantic rules on a single production. The set of rules to be applied to a specific instance of a production is chosen dynamically. Essentially, we add predicates over attribute values to supplement the patterns used to select which attribute computations to apply.
In this next example, there are two different sets of semantic rules on the fork operator. The value of the $min attribute governs the choice between the two sets. This specification has the same semantics as the first bird specification for the computation of the $min attribute. We require that there always be a default rule, indicated by the label [], which is applied if none of the other conditional productions can be applied.