Implement stateful parsing support.