Court to rule on legality of Egypt's parliament