Change the way of parsing patterns and store type in MAny