php_parser.php
protected function reduce($raw)
    {
        if ($action = $this->regexes[$this->mode->getCurrent()]->match($raw, $match)) {
            $unparsed_character_count = strpos($raw, $match);
            $unparsed                 = substr($raw, 0, $unparsed_character_count);
            $raw                      = substr($raw, $unparsed_character_count + strlen($match));

            return array($raw, $unparsed, $match, $action);
        }

        return true;
    }
protected function reduce($raw)
    {
        if ($action = $this->regexes[$this->mode->getCurrent()]->match($raw, $match)) {
            $unparsed_character_count = strpos($raw, $match);
            $unparsed                 = substr($raw, 0, $unparsed_character_count);
            $raw                      = substr($raw, $unparsed_character_count + strlen($match));

            return array($raw, $unparsed, $match, $action);
        }

        return true;
    }
Tries to match a chunk of text and
if successful removes the recognised chunk and any leading unparsed data.
Empty strings will not be matched.

@param string $raw         The subject to parse. This is the content that will be eaten.

@return array/boolean      Three item list of unparsed content followed by the recognised
token and finally the action the parser is to take. True if no match, false if there is a
parsing error.