Set parser configuration based on this configurers settings.
@param parser
173142
protected void configureParser(LSParser parser) {
        for (Map.Entry<String, Object> setting : parseSettings.entrySet()) {
            setParserConfigParameter(parser, setting.getKey(), setting.getValue());
        }
    }
295515
public static ParserConfiguration[] filterExisting(final List<? extends ParserConfiguration> parsers) {
        List<ParserConfiguration> existing = Lists.newArrayList();
        for (ParserConfiguration parser : parsers) {
            if (ParserRegistry.exists(parser.getParserName())) {
                existing.add(parser);
            }
        }
        return existing.toArray(new ParserConfiguration[existing.size()]);
    }
271128
public void setParser(RtfParser parser) {
		if(this.rtfParser != null && this.rtfParser.equals(parser)) return;
		this.rtfParser = parser;
		this.init(true);
	}
755571
private void setupParser ()
    {
    // catch an illegal "nonsense" state.
    if (!prefixes && !namespaces)
        throw new IllegalStateException ();

    nsSupport.reset();
    if (uris)
        nsSupport.setNamespaceDeclUris (true);

    if (entityResolver != null) {
        parser.setEntityResolver(entityResolver);
    }
    if (dtdHandler != null) {
        parser.setDTDHandler(dtdHandler);
    }
    if (errorHandler != null) {
        parser.setErrorHandler(errorHandler);
    }
    parser.setDocumentHandler(this);
    locator = null;
    }
785900
public void addRuleParserBefore(IRuleParser parser, Class<? extends IRuleParser> beforeParser) {
        int index = getIndexOfClass(ruleParsers, beforeParser);
        if (index == -1) {
            throw new ParserAddException("parser " + beforeParser.getSimpleName() + " has not been added");
        }
        ruleParsers.add(index, parser);
    }
257635
public static void acceptsNodeSingle(OptionParser parser) {
        parser.acceptsAll(Arrays.asList(OPT_N, OPT_NODE), "node id")
              .withRequiredArg()
              .describedAs("node-id")
              .ofType(Integer.class);
    }
1184892
private void setupParse ()
    {
    if (parent == null) {
        throw new NullPointerException("No parent for filter");
    }
    parent.setEntityResolver(this);
    parent.setDTDHandler(this);
    parent.setContentHandler(this);
    parent.setErrorHandler(this);
    }
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);
    }
196907
public void addRuleParserAfter(IRuleParser parser, Class<? extends IRuleParser> afterParser) {
        int index = getIndexOfClass(ruleParsers, afterParser);
        if (index == -1) {
            throw new ParserAddException("parser " + afterParser.getSimpleName() + " has not been added");
        }
        ruleParsers.add(index + 1, parser);
    }
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;
        }
    }
801196
public static void acceptsDir(OptionParser parser) {
        parser.acceptsAll(Arrays.asList(OPT_D, OPT_DIR), "directory path for input/output")
              .withRequiredArg()
              .describedAs("dir-path")
              .ofType(String.class);
    }
1061750
@Override
  protected void initParser() throws MtasConfigException {
    super.initParser();
    if (config != null) {
      for (int i = 0; i < config.children.size(); i++) {
        MtasConfiguration current = config.children.get(i);
        if (current.name.equals(PENNTREEBANK_IGNORE)) {
          for (int j = 0; j < current.children.size(); j++) {
            if (current.children.get(j).name.equals(PENNTREEBANK_NODE)) {
              String nameVariable = current.children.get(j).attributes
                  .get(PENNTREEBANK_NODE_NAME);
              if (!nameVariable.isEmpty()) {
                ignoreNodes.add(nameVariable);
              }
            }
          }
        }
      }
    }
  }
211734
public void setLogger(String logger)
    {
        if(logger != null && logger.trim().length() > 0)
            this.logger = LoggerFactory.getLogger(logger);
    }
583135
def update_parser(self, parser):
        

        self._parser = parser
        ini_str = argparse_to_ini(parser)
        configp = configparser.ConfigParser(allow_no_value=True)
        configp.read_dict(self._config)
        configp.read_string(ini_str)
        self._config.update(
            {s: dict(configp.items(s))
             for s in configp.sections()}
        )
1328399
@Override
    public void initializeParsers(ExtensionParsingContext context) {
        for (JGroupsSchema schema : JGroupsSchema.SCHEMAS) {
            context.setSubsystemXmlMapping(SUBSYSTEM_NAME, schema.getNamespaceUri(), new JGroupsSubsystemXMLReader(schema));
        }
    }
1105762
public function name(string $name, $parser): void
    {
        if (\is_string($parser) && (\class_exists($parser, false) || $this->app->bound($parser))) {
            $parser = $this->app->make($parser);
        }

        $this->parsers[$name] = $parser;
    }
1203272
@SuppressWarnings("checkstyle:avoidhidingcauseexception")
  public static ConfigurationBuilder parseToConfigurationBuilder(final String[] args,
                                                                 final Class<? extends Name<?>>... argClasses)
      throws ParseException {
    final CommandLine commandLine;
    try {
      commandLine = new CommandLine().processCommandLine(args, argClasses);
    } catch (final IOException e) {
      // processCommandLine() converts ParseException into IOException. This reverts that to make exception handling
      // more straight forward.
      throw new ParseException(e.getMessage());
    }

    // processCommandLine() indicates that it might return null. We need to guard users of this one from that
    if (commandLine == null) {
      throw new ParseException("Unable to parse the command line and the parser returned null.");
    } else {
      return commandLine.getBuilder();
    }
  }