boolean (Exprent first, Exprent second) { if (first.type == Exprent.EXPRENT_ASSIGNMENT && second.type == Exprent.EXPRENT_ASSIGNMENT) { AssignmentExprent asf = (AssignmentExprent)first; AssignmentExprent ass = (AssignmentExprent)second; while (true) { if (asf.getRight().equals(ass.getRight())) { if ((asf.getLeft().type == Exprent.EXPRENT_VAR && ((VarExprent)asf.getLeft()).isStack()) && (ass.getLeft().type != Exprent.EXPRENT_VAR || !((VarExprent)ass.getLeft()).isStack())) { if (!ass.getLeft().containsExprent(asf.getLeft())) { asf.setRight(ass); return true; } } } if (asf.getRight().type == Exprent.EXPRENT_ASSIGNMENT) { asf = (AssignmentExprent)asf.getRight(); } else { break; } } } return false; }