private Cmp relation() throws Exception
    {
        Value left = expression();
        Cmp.CmpType op;
        // relOp
        switch (scan.sym) {
        case eq:
            op = Cmp.CmpType.eq;
            break;
        case neq:
            op = Cmp.CmpType.neq;
            break;
        case lt:
            op = Cmp.CmpType.lt;
            break;
        case lte:
            op = Cmp.CmpType.lte;
            break;
        case gt:
            op = Cmp.CmpType.gt;
            break;
        case gte:
            op = Cmp.CmpType.gte;
            break;
        default:
            throw new Exception("Relation: incorrect relation operator");
        }
        scan.next();
        Value right = expression();
        Cmp rval =  new Cmp(op, left, right);
        currentBB.addInstruction(rval);
        return rval;
    }