Added state-machine parser