public function parseTokens($string)
    {
        $this->string = $string;
        $this->cursor = 0;
        $this->current = isset($this->string[0]) ? $this->string[0] : null;
        $this->next = isset($this->string[1]) ? $this->string[1] : null;

        // Unify result of ctype_space() across systems
        $previousLocale = setlocale(LC_CTYPE, 0);
        setlocale(LC_CTYPE, 'C');
        $tokens = $this->doParseTokens();
        setlocale(LC_CTYPE, $previousLocale);

        return $tokens;
    }