Parsing function.