Parsing string into tokens