Add ability to use custom patterns

Add ability to register new patterns into the parser and subsequently use them whilst parsing