protected function reduce(&$text) {
        if (!array_key_exists($this->stack->top(), $this->patterns)) {
            return false;
        }
        if ($text !== '' && ($data = $this->patterns[$this->stack->top()]->split($text)) !== false) {
            list($unmatched, $matched, $text, $childRuleName) = $data;

            return [$unmatched, $matched, $childRuleName];
        }

        return true;
    }