protected function getParser(?array $options): Parser
    {
        if (($tag = $options['tag'] ?? null) !== null) {
            $class = self::TAG_PARSER;

            return (new $class())->setTag($tag);
        }

        if (($group = $options['group'] ?? null) !== null) {
            $class = self::GROUP_PARSER;

            return (new $class())->setGroup($group);
        }

        return new Parser();
    }