Configure provider parser for auto provider
503262
def provider_parser(subparser):
    """"""
    subparser.description = '''
        Provider 'auto' enables the Lexicon provider auto-discovery.
        Based on the nameservers declared for the given domain,
        Lexicon will try to find the DNS provider holding the DNS zone if it is supported.
        Actual DNS zone read/write operations will be delegated to the provider found:
        every environment variable or command line specific to this provider
        can be passed to Lexicon and will be processed accordingly.
        '''
    subparser.add_argument("--mapping-override", metavar="[DOMAIN]:[PROVIDER], ...",
                           help="comma separated list of elements in the form of "
                                "[DOMAIN]:[PROVIDER] to authoritatively map a "
                                "particular domain to a particular provider")

    # Explore and load the arguments available for every provider into the 'auto' provider.
    for provider_name, provider_module in AVAILABLE_PROVIDERS.items():
        parser = argparse.ArgumentParser(add_help=False)
        provider_module.provider_parser(parser)

        for action in parser._actions:  # pylint: disable=protected-access
            action.option_strings = [re.sub(
                r'^--(.*)$', r'--{0}-\1'.format(provider_name), option)
                                     for option in action.option_strings]
            action.dest = 'auto_{0}_{1}'.format(provider_name, action.dest)
            subparser._add_action(action)
934737
private void setupParsing() throws SAXException{
        parent.setEntityResolver(handler);
        parent.setDTDHandler(handler);
        parent.setContentHandler(handler);
        parent.setErrorHandler(handler);
        parent.setProperty(SAXProperties.LEXICAL_HANDLER, handler);
        parent.setProperty(SAXProperties.DECL_HANDLER_ALT, handler);
    }
563899
def _SetExtractionParsersAndPlugins(self, configuration, session):
    
    names_generator = parsers_manager.ParsersManager.GetParserAndPluginNames(
        parser_filter_expression=configuration.parser_filter_expression)

    session.enabled_parser_names = list(names_generator)
    session.parser_filter_expression = configuration.parser_filter_expression
29124
private void setup (Parser parser)
    {
    if (parser == null) {
        throw new
        NullPointerException("Parser argument must not be null");
    }
    this.parser = parser;
    atts = new AttributesImpl();
    nsSupport = new NamespaceSupport();
    attAdapter = new AttributeListAdapter();
    }
464896
public function setupPackageAutoloaders()
    {
        $pla = \Concrete\Core\Package\PackageList::get();
        $pl = $pla->getPackages();
        $cl = ClassLoader::getInstance();
        /** @var \Package[] $pl */
        foreach ($pl as $p) {
            \Config::package($p);
            if ($p->isPackageInstalled()) {
                $pkg = $this->make('Concrete\Core\Package\PackageService')->getClass($p->getPackageHandle());
                if (is_object($pkg) && (!$pkg instanceof \Concrete\Core\Package\BrokenPackage)) {
                    $cl->registerPackage($pkg);
                    $this->packages[] = $pkg;
                }
            }
        }
    }
547607
private void configure(Object obj, XmlParser.Node cfg, int i) throws ClassNotFoundException,
            NoSuchMethodException, InvocationTargetException, IllegalAccessException
    {
        XmlParser.Node node = null;
        try
        {
            for (; i < cfg.size(); i++)
            {
                Object o = cfg.get(i);
                if (o instanceof String) continue;
                node = (XmlParser.Node) o;

                String tag = node.getTag();
                if ("Set".equals(tag))
                    set(obj, node);
                else if ("Put".equals(tag))
                    put(obj, node);
                else if ("Call".equals(tag))
                    call(obj, node);
                else if ("Get".equals(tag))
                    get(obj, node);
                else if ("New".equals(tag))
                    newObj(obj, node);
                else if ("Ref".equals(tag))
                    refObj(obj, node);
                else
                    throw new IllegalStateException("Unknown tag: " + tag);
            }
        }
        catch(InvocationTargetException e)
        {
            log.warn("Exception at "+node.toString(),e.getTargetException());
            throw e;
        }
        catch (Error e)
        {
            log.debug(node);
            throw e;
        }
        catch (Exception e)
        {
            log.debug(node);
            if (e instanceof NoSuchMethodException) throw (NoSuchMethodException) e;
            if (e instanceof InvocationTargetException) throw (InvocationTargetException) e;
            if (e instanceof IllegalAccessException) throw (IllegalAccessException) e;
            if (e instanceof RuntimeException) throw (RuntimeException) e;
        }
    }
508229
def configure(root_url, **kwargs):
    "
    default = kwargs.pop('default', True)
    kwargs['client_agent'] = 'example-client/' + __version__
    if 'headers' not in kwargs:
        kwargs['headers'] = {}
    kwargs['headers']['Accept-Type'] = 'application/json'
    if default:
        default_config.reset(root_url, **kwargs)
    else:
        Client.config = wac.Config(root_url, **kwargs)
1107463
private function configureParser()
    {
        $renderer = $parser = null;
        $model = new \RunBB\Model\Admin\Parser();

        $configurator = new \s9e\TextFormatter\Configurator();
        $plugins = unserialize(User::get()->g_parser_plugins);

        $useSmilies = false;
        foreach ($plugins as $k => $plugin) {
            $configurator->plugins->load($plugin);
            if ($plugin === 'Emoticons') {
                $useSmilies = true;
            }
        }

        if ($useSmilies) {
            foreach ($model->getSmilies() as $k => $v) {
                $configurator->Emoticons->add($k, $v['html']);
            }
        }

        $configurator->registeredVars['cacheDir'] = ForumEnv::get('FORUM_CACHE_DIR');

        // Get an instance of the parser and the renderer
        extract($configurator->finalize());

        // We save the parser and the renderer to the disk for easy reuse
        Utils::checkDir($this->cacheDir);

        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Parser.php', serialize($parser));
        file_put_contents($this->cacheDir.'/'.User::get()->g_title.'Renderer.php', serialize($renderer));

        $this->parser = $parser;
        $this->renderer = $renderer;
    }
447569
public final void addParser(@NotNull final ParserConfig parser) {
        Contract.requireArgNotNull("parser", parser);
        if (parsers == null) {
            parsers = new Parsers();
        }
        parsers.addParser(parser);
    }
853905
function parser (content, options, fn) {
      var jshintrc = path.join(process.env.HOME || process.env.USERPROFILE, '.jshintrc')
        , jshintninja = configurator(jshintrc)
        , config = options.jshint;

      // extend all the things
      config = _.extend(config, jshintninja);

      canihaz.jshint(function lazyload (err, jshint) {
        if (err) return fn(err);

        var validates = jshint.JSHINT(content, config)
          , errors;

        if (!validates) errors = formatters.js(jshint.JSHINT.errors);
        fn(null, errors);
      });
    }
592465
def _setup_parser(self, filename=None):
        
        assert isinstance(filename, str) or filename is None

        # If we are not overriding the config filename
        if not filename:
            filename = MACKUP_CONFIG_FILE

        parser = configparser.SafeConfigParser(allow_no_value=True)
        parser.read(os.path.join(os.path.join(os.environ['HOME'], filename)))

        return parser
198592
@Deprecated
    public static ParseContext using(JsonProvider provider) {
        return new ParseContextImpl(Configuration.builder().jsonProvider(provider).build());
    }
598840
def provider_parser(subparser):
    """"""
    subparser.add_argument('--auth-account',
                           help='specify type of Hetzner account: by default Hetzner Robot '
                           '(robot) or Hetzner konsoleH (konsoleh)')
    subparser.add_argument('--auth-username', help='specify username of Hetzner account')
    subparser.add_argument('--auth-password', help='specify password of Hetzner account')
    subparser.add_argument('--linked',
                           help='if exists, uses linked CNAME as A|AAAA|TXT record name for edit '
                           'actions: by default (yes); Further restriction: Only enabled if '
                           'record name or raw FQDN record identifier \'type/name/content\' is '
                           'specified, and additionally for update actions the record name '
                           'remains the same',
                           default=str('yes'),
                           choices=['yes', 'no'])
    subparser.add_argument('--propagated',
                           help='waits until record is publicly propagated after succeeded '
                           'create|update actions: by default (yes)',
                           default=str('yes'),
                           choices=['yes', 'no'])
    subparser.add_argument('--latency',
                           help='specify latency, used during checks for publicly propagation '
                           'and additionally for Hetzner Robot after record edits: by default '
                           '30s (30)',
                           default=int(30),
                           type=int)
727510
protected void initParser() throws MtasConfigException {
    if (config != null) {
      // find namespaceURI
      for (int i = 0; i < config.children.size(); i++) {
        MtasConfiguration current = config.children.get(i);
        if (current.name.equals("autorepair")) {
          autorepair = current.attributes.get("value").equals("true");
        }
        if (current.name.equals("makeunique")) {
          makeunique = current.attributes.get("value").equals("true");
        }
      }
    }
  }
529677
def proxy_autoconfig_url(self, value):
        
        self._verify_proxy_type_compatibility(ProxyType.PAC)
        self.proxyType = ProxyType.PAC
        self.proxyAutoconfigUrl = value
807075
def get_parser(cls):
        """"""
        organizer = cls()
        organizer.setup_parser()
        organizer._finish_parser()
        return organizer.parser
997469
function Parser(options) {
  options = options || {};
  this.tokens = [];
  this.token = null;
  this.options = options || defaults;
  this.options.renderer = this.options.renderer || new Renderer;
  this.renderer = this.options.renderer;
  this.renderer.options = this.options;
  this.options.sanitize = false;
  this.renderer.parser = this;
}