A program usually must do more than just parse its input; it must also produce some output based on the input. In a b() grammar, a grammar rule can have an action consisting of bf(C++) statements. Each time the parser recognizes a match for that rule, its associated action is executed. See section ref(ACTIONS). The purpose of an action usually is to compute the semantic value of the whole construct from the semantic values of its parts. For example, suppose we have a rule stating that an expression can be the sum of two expressions. Once the parser has recognized the rule's parts, each of its subexpressions has a semantic value of its own. The action for this rule could consist of a bf(C++) expression computing the rule's semantic value from its subexpressions. Actions usually compute semantic values and refer to semantic values of elements of production rules. This happens so frequently that several shorthand notations can be used to simplify referring to semantic values. These shorthand notations are covered extensively in section ref(ACTIONS) and its sub-sections. For example, here is a rule stating that an expression can be the sum of two subexpressions: verb( expr: expr '+' expr { $$ = $1 + $3; } ; ) The action defines how the semantic value of the rule (using shorthand tt($$)) is computed from the values of the two sub-expressions (shorthands tt($1) and tt($3)).