A state machine for text processing.[1]