/* Provide the configuration settings for formatting/parsing.
770589
function(inst) {
		var shortYearCutoff = this._get(inst, 'shortYearCutoff');
		shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
			new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
		return {shortYearCutoff: shortYearCutoff,
			dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
			monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
	}
32671
function outputRequireConfigInfo(packedFiles, context, parseOpts, settings) {
    var resMaps = getOutputResourcePathMap(packedFiles, context, parseOpts, settings);
    resMaps.forEach(function(item) {
        var page = item.file;
        var config = context.getRequireConfig(item.paths, settings.amdConfig);
        var script;

        if (settings.inlineResourceConfig) {
            script = _.createRequireConfigScript(config);
        } else {
            var configFile = page.subpathNoExt + '_config.js';
            if (_.isFunction(settings.resourceConfigFile)) {
                configFile = settings.resourceConfigFile(configFile, page);
            }
            configFile = context.createFile(
                configFile,
                _.getRequireConfigScript(config)
            );
            if (context.isFileExisted(configFile)) {
                fis.log.error('output resource config file is exists: %s', configFile.id);
            }

            context.addFile(configFile);
            script = htmlParser.createScriptTags(page, configFile);
        }
        var content = page.getContent().replace(
            parseOpts.resourceConfigPlaceholder, '\n'+script
        );
        page.setContent(content);
    });
}
853655
function parseListConfig(string) {
		var items = {};

		// Collapse whitespace around ,
		string = string.replace(/\s*,\s*/g, ",");

		string.split(/,+/).forEach(function(name) {
			name = name.trim();
			if (!name) {
				return;
			}
			items[name] = true;
		});
		return items;
	}
939561
public ConfigRenderOptions setFormatted(boolean value) {
        if (value == formatted)
            return this;
        else
            return new ConfigRenderOptions(originComments, comments, value, json);
    }
75137
def _config_parse(self):
        """"""
        res = super(cfg.ConfigParser, self).parse(Backend._config_string_io)
        return res
1157385
function parseFromConfigurationObject(configuration) {
  if (!configuration.document) {
    throw new Error('The parsed JDL content must be passed.');
  }
  init(configuration);
  fillApplications();
  fillDeployments();
  fillEnums();
  fillClassesAndFields();
  fillAssociations();
  fillOptions();
  return jdlObject;
}
581605
private Map<String, String> parseAttributes(I_CmsXmlContentLocation formatterLoc) {

        Map<String, String> result = new LinkedHashMap<>();
        for (I_CmsXmlContentValueLocation mappingLoc : formatterLoc.getSubValues(N_ATTRIBUTE)) {
            String key = CmsConfigurationReader.getString(m_cms, mappingLoc.getSubValue(N_KEY));
            String value = CmsConfigurationReader.getString(m_cms, mappingLoc.getSubValue(N_VALUE));
            result.put(key, value);
        }
        return Collections.unmodifiableMap(result);
    }
970503
protected void parseOptions(String configuration) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(configuration)) {
            return;
        }
        if (!configuration.startsWith("{")) {
            // add curly braces if not present
            configuration = "{" + configuration + "}";
        }
        try {
            JSONObject json = new JSONObject(configuration);
            if (json.has(OPTION_LAT)) {
                setLat((float)json.getDouble(OPTION_LAT));
            }
            if (json.has(OPTION_LNG)) {
                setLng((float)json.getDouble(OPTION_LNG));
            }
            if (json.has(OPTION_ZOOM)) {
                setZoom(json.getInt(OPTION_ZOOM));
            }
            if (json.has(OPTION_WIDTH)) {
                setWidth(json.getInt(OPTION_WIDTH));
            }
            if (json.has(OPTION_HEIGHT)) {
                setHeight(json.getInt(OPTION_HEIGHT));
            }
            if (json.has(OPTION_TYPE)) {
                setType(MapType.valueOf(json.getString(OPTION_TYPE)));
            }
            if (json.has(OPTION_MODE)) {
                // do not use value of, as the client side string is not equal to the enumeration mode name
                setMode(MapMode.parseMode(json.getString(OPTION_MODE)));
            }
        } catch (JSONException e) {
            // something went wrong
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
            return;
        }
    }
1309645
private void parseInputConfig(final Node node, final ConfigSettings config)
	{

		String name, value;
		Node nnode;
		NodeList list = node.getChildNodes();

		int length = list.getLength();
		for (int i = 0; i < length; i++) {
			nnode = list.item(i);

			name = nnode.getNodeName().toUpperCase();
			if (name.equals(KEY_WIKIPEDIA_ENCODING)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				config.setConfigParameter(ConfigurationKeys.WIKIPEDIA_ENCODING,
						value);

			}
			else if (name.equals(KEY_MODE_SURROGATES)) {

				SurrogateModes oValue = SurrogateModes.parse(nnode
						.getChildNodes().item(0).getNodeValue());
				config.setConfigParameter(ConfigurationKeys.MODE_SURROGATES,
						oValue);

			}
			else if (name.equals(SUBSECTION_ARCHIVE)) {

				parseInputArchive(nnode, config);

			}
		}
	}
678268
function _formatParameters(parameters) {
    let options = {},
        formatter, value;
    for (let prop in parameters) {
        if (parameters.hasOwnProperty(prop)) {
            if (parameters[prop].domain) {
                let domain = getDomains()[parameters[prop].domain];
                formatter = domain ? domain.format : undefined;
            } else {
                formatter = undefined;
            }
            value = formatter && formatter.value ? formatter.value(parameters[prop].value) : parameters[prop].value;
            options[prop] = value;
        }
    }
    return options;
}
1225290
function parseEntities(value, options) {
  var settings = {}
  var option
  var key

  if (!options) {
    options = {}
  }

  for (key in defaults) {
    option = options[key]
    settings[key] =
      option === null || option === undefined ? defaults[key] : option
  }

  if (settings.position.indent || settings.position.start) {
    settings.indent = settings.position.indent || []
    settings.position = settings.position.start
  }

  return parse(value, settings)
}
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);
      });
    }
872928
private void setupFormat(final ConditionNumberFormatter formatter) {

        if(formatter.containsSymbolTerm(Token.SYMBOL_SLASH)) {
            // 分数として処理する
            setupFormatAsFraction(formatter);
        } else {
            // 数値として処理する
            setupFormatAsDecimal(formatter);
        }

    }
168429
private static FormatBundle<DatasetKeyInputFormat> inputBundle(Configuration conf) {
    FormatBundle<DatasetKeyInputFormat> bundle = FormatBundle
        .forInput(DatasetKeyInputFormat.class);
    for (Map.Entry<String, String> entry : conf) {
      bundle.set(entry.getKey(), entry.getValue());
    }
    return bundle;
  }
284343
Configuration getConfiguration() {
    try {
      if (config == null || recheck) {
        if(xContext != null) {
          linguServices = new LinguisticServices(xContext);
        }
        if(docLanguage == null) {
          docLanguage = getLanguage();
        }
        initLanguageTool();
      }
    } catch (Throwable t) {
      MessageHandler.showError(t);
    }
    return config;
  }
56403
private String[] parseGeneralOptions(Options opts, Configuration conf, 
      String[] args) {
    opts = buildGeneralOptions(opts);
    CommandLineParser parser = new GnuParser();
    try {
      commandLine = parser.parse(opts, args, true);
      processGeneralOptions(conf, commandLine);
      return commandLine.getArgs();
    } catch(ParseException e) {
      LOG.warn("options parsing failed: "+e.getMessage());

      HelpFormatter formatter = new HelpFormatter();
      formatter.printHelp("general options are: ", opts);
    }
    return args;
  }
508013
private void addSettingsNodelets() {
        parser.setXpath("/aspectran/settings");
        parser.addNodeEndlet(text -> {
            assistant.applySettings();
        });
        parser.setXpath("/aspectran/settings/setting");
        parser.addNodelet(attrs -> {
            String name = attrs.get("name");
            String value = attrs.get("value");

            assistant.putSetting(name, value);
            parser.pushObject(name);
        });
        parser.addNodeEndlet(text -> {
            String name = parser.popObject();
            if (text != null) {
                assistant.putSetting(name, text);
            }
        });
    }