makeOptmatch function

(Internal) Create optmatch objects, the result of matching.