Create matcher macro framework.

We factor the matcher pattern into a set of macros, reducing redundancy and
providing greater readability.