Add pattern match framework.