void expression(expr_rec *result) { /* <expression> -> <primary> {<add op> <primary> #gen_infix} */ expr_rec left_operand, right_operand; op_rec op; primary(&left_operand); while (next_token() == PLUSOP || next_token() == MINUSOP) { add_op(&op); primary(&right_operand); left_operand = gen_infix(left_operand, op, right_operand); } *result = left_operand; }