Rearrange the position of OperatorID according to precedences.