Use a tree for the patterns form.