Added state machine parser