Template based state machine for parsing semi-formatted text
