expr_rec gen_infix(expr_rec e1, op_rec op, expr_rec e2)
{
	expr_rec e_rec;
	/* An expr_rec with temp variant set. */
	e_rec.kind = TEMPEXPR;

	/*
	 * Generate code for infix operation.
	 * Get result temp and set up semantic record
	 * for result
	 */
	strcpy(e_rec.name, get_temp());
	generate(extract(op), extract(e1), extract(e2), e_rec.name);
	return e_rec;
}

Author: Ming-I Hsieh (Powered by FreeBSD, c2html, gimp, vim, gmake)