some parts of the FSM parser implemented