traverse to get operator list and operants list