basic technique can match ordered rules against ordered nodes