src/Parser/Util/ParseUtil.php
public static function nextstringIsExpectedWithIgnoreSepChar(
        string $stmt,
        int $offset,
        string $nextExpectedstring,
        bool $checkSepChar
    ) {
        if (null == $nextExpectedstring || strlen($nextExpectedstring) < 1) {
            return $offset;
        }
        $i = $offset;
        $index = 0;
        for ($stmtLen = strlen($stmt); $i < $stmtLen && $index < strlen($nextExpectedstring); ++$i) {
            if (0 == $index) {
                $isSep = self::currentCharIsSep($stmt, $i);
                if ($isSep) {
                    continue;
                }
            }
            $actualChar = $stmt[$i];
            $expectedChar = $nextExpectedstring[$index++];
            if ($actualChar != $expectedChar) {
                return $offset;
            }
        }
        if ($index == strlen($nextExpectedstring)) {
            $ok = true;
            if ($checkSepChar) {
                $ok = self::nextCharIsSep($stmt, $i);
            }
            if ($ok) {
                return $i;
            }
        }

        return $offset;
    }
public static function nextstringIsExpectedWithIgnoreSepChar(
        string $stmt,
        int $offset,
        string $nextExpectedstring,
        bool $checkSepChar
    ) {
        if (null == $nextExpectedstring || strlen($nextExpectedstring) < 1) {
            return $offset;
        }
        $i = $offset;
        $index = 0;
        for ($stmtLen = strlen($stmt); $i < $stmtLen && $index < strlen($nextExpectedstring); ++$i) {
            if (0 == $index) {
                $isSep = self::currentCharIsSep($stmt, $i);
                if ($isSep) {
                    continue;
                }
            }
            $actualChar = $stmt[$i];
            $expectedChar = $nextExpectedstring[$index++];
            if ($actualChar != $expectedChar) {
                return $offset;
            }
        }
        if ($index == strlen($nextExpectedstring)) {
            $ok = true;
            if ($checkSepChar) {
                $ok = self::nextCharIsSep($stmt, $i);
            }
            if ($ok) {
                return $i;
            }
        }

        return $offset;
    }
***
检查下一个字符串是否为期望的字符串，并把偏移量移到从offset开始计算，expectValue之后的位置

@param string $stmt 被解析的sql
@param int $offset 被解析的sql的当前位置
@param string $nextExpectedstring 在stmt中准备查找的字符串
@param bool $checkSepChar 当找到expectValue值时，是否检查其后面字符为分隔符号

@return int 如果包含指定的字符串，则移动相应的偏移量，否则返回值=offset