function parseAndValidateSystemQueryOption(mOptions, sOptionName, aAllowed) {
			var sExpandOptionName,
				mExpandOptions,
				sExpandPath,
				vValue = mOptions[sOptionName];

			if (!bSystemQueryOptionsAllowed || !aAllowed.includes(sOptionName)) {
					throw new Error("System query option " + sOptionName + " is not supported");
			}
			if ((sOptionName === "$expand" || sOptionName === "$select")
					&& typeof vValue === "string") {
				vValue = _Parser.parseSystemQueryOption(sOptionName + "=" + vValue)[sOptionName];
				mOptions[sOptionName] = vValue;
			}
			if (sOptionName === "$expand") {
				vValue = mOptions[sOptionName] = _Helper.clone(vValue); // deep clone needed!
				for (sExpandPath in vValue) {
					mExpandOptions = vValue[sExpandPath];
					if (mExpandOptions === null || typeof mExpandOptions !== "object") {
						// normalize empty expand options to {}
						mExpandOptions = vValue[sExpandPath] = {};
					}
					for (sExpandOptionName in mExpandOptions) {
						parseAndValidateSystemQueryOption(mExpandOptions, sExpandOptionName,
							aExpandQueryOptions);
					}
				}
			} else if (sOptionName === "$count") {
				if (typeof vValue === "boolean") {
					if (!vValue) {
						delete mOptions.$count;
					}
				} else {
					switch (typeof vValue === "string" && vValue.toLowerCase()) {
						case "false":
							delete mOptions.$count;
							break;
						case "true":
							mOptions.$count = true;
							break;
						default:
							throw new Error("Invalid value for $count: " + vValue);
					}
				}
			}
		}
Constructs a map of query options from the given binding parameters.
Parameters starting with '$$' indicate binding-specific parameters, which must not be part
of a back-end query; they are ignored and not added to the map.
The following query options are disallowed:
<ul>
  <li> System query options (key starts with "$"), unless
    <code>bSystemQueryOptionsAllowed</code> is set
  <li> Parameter aliases (key starts with "@")
  <li> Custom query options starting with "sap-" (unless starting with "sap-valid-"), unless
    <code>bSapAllowed</code> is set
</ul>

@param {object} [mParameters={}]
  Map of binding parameters
@param {boolean} [bSystemQueryOptionsAllowed]
  Whether system query options are allowed
@param {boolean} [bSapAllowed]
  Whether custom query options starting with "sap-" are allowed (Note: "sap-valid-" is always
  allowed)
@throws {Error}
  If disallowed OData query options are provided
@returns {object}
  The map of query options

@private