Precedence Rules in Matching Algorithms