A reduce action will have the effect of writing out the code for the expression. So exprs on the right-hand side have already been done when their reduce actions were done.

expr -> expr + expr

gen1(ADD)

expr -> expr * expr

gen1(MULT)

expr -> NUM

gen2(PUSH_INT, NUM.val)

expr -> VAR

gen2(PUSH_VAR, get_var_offset(VAR.name))