Parse states from string