Auxiliary C Code
TOKEN cons(item, list) /* link item to list */ TOKEN item, list; { item->link = list; return item; } TOKEN binop(op, lhs, rhs) /* reduce binary op */ TOKEN op, lhs, rhs; { op->operands = lhs; /* link opnds to op */ lhs->link = rhs; /* link 2nd operand */ rhs->link = NULL; /* terminate opnds */ return op; } TOKEN makeprogn(tok, statements) /* make progn */ TOKEN tok, statements; { tok->tokentype = OPERATOR; /* change tok */ tok->whichval = PROGNOP; /* to progn*/ tok->operands = statements; return tok; }