State Machine for String Parsing v1.0