Cache a parse failure for this document.
764929
public static void cacheParseFailure(XmlFileModel key)
    {
        map.put(getKey(key), new CacheDocument(true, null));
    }
312061
function parseTag(raw) {
	var cached = tagCache[raw];

	if (cached == null) {
		var tag, id, cls, attr;

		tagCache[raw] = cached = {
			tag:	(tag	= raw.match( /^[-\w]+/))		?	tag[0]						: "div",
			id:		(id		= raw.match( /#([-\w]+)/))		? 	id[1]						: null,
			class:	(cls	= raw.match(/\.([-\w.]+)/))		?	cls[1].replace(/\./g, " ")	: null,
			attrs:	null,
		};

		while (attr = RE_ATTRS.exec(raw)) {
			if (cached.attrs == null)
				{ cached.attrs = {}; }
			cached.attrs[attr[1]] = attr[2] || "";
		}
	}

	return cached;
}
227774
def _cached_search_compile(pattern, re_verbose, re_version, pattern_type):
    """"""

    return _bregex_parse._SearchParser(pattern, re_verbose, re_version).parse()
712763
private void parseQueryError(boolean lastChunk) {
        while (true) {
            int openBracketPos = findNextChar(responseContent, '{');
            if (isEmptySection(openBracketPos) || (lastChunk && openBracketPos < 0)) {
                sectionDone();
                queryParsingState = transitionToNextToken(lastChunk); //warnings or status
                break;
            }

            int closeBracketPos = findSectionClosingPosition(responseContent, '{', '}');
            if (closeBracketPos == -1) {
                break;
            }

            int length = closeBracketPos - openBracketPos - responseContent.readerIndex() + 1;
            responseContent.skipBytes(openBracketPos);
            ByteBuf resultSlice = responseContent.readSlice(length);
            queryErrorObservable.onNext(resultSlice.copy());
        }
    }
139268
@FFDCIgnore(IOException.class)
    // The feature manager and kernel only do provisioning from a single thread, so this is paranoia, but should
    // never be contended.
    private synchronized void readCache() {
        if (!!!_cacheRead) {
            BufferedReader reader = null;
            try {
                if (_cacheFile != null && _cacheFile.exists() && _cacheFile.isFile()) {
                    reader = new BufferedReader(new FileReader(_cacheFile));
                    String line;
                    while ((line = reader.readLine()) != null) {
                        try {
                            BundleInfo bInfo = new BundleInfo(line);
                            if (bInfo.file.exists() && bInfo.symbolicName != null) {
                                addToCache(bInfo);
                            }
                        } catch (IOException e) {
                            // IOException creating BundleInfo.
                        }
                    }
                }
            } catch (IOException e) {
                // If we can't load the cache then we just throw everything 
                // away and do the more expensive read from original data.
                _bundleLocations.clear();
                _cacheBySymbolicName.clear();
            } finally {
                Utils.tryToClose(reader);
            }
            _cacheRead = true;
            // now we have read the cache we want to insure all base locations are processed.
            for (String loc : new HashSet<String>(_locations)) {
                includeBaseLocation(loc);
            }
        }
    }
1313000
def post_parse(self):
        """"""
        if self.cache and not self.cache_loaded:
            self.cache_writer_cls(self.file_name, self.wavefront).write()
948181
def applies_to?(parser, context)
      @applies_to_cache[context].fetch(parser) {
        @applies_to_cache[context][parser] = _applies_to?(parser, context)
      }
    end
1119900
def _uncached_match(self, text, pos, cache, error):
        """"""
        m = self.re.match(text, pos)
        if m is not None:
            span = m.span()
            node = RegexNode(self, text, pos, pos + span[1] - span[0])
            node.match = m  # TODO: A terrible idea for cache size?
            return node
838489
def make_parse_err(self, err, reformat=True, include_ln=True):
        """"""
        err_line = err.line
        err_index = err.col - 1
        err_lineno = err.lineno if include_ln else None
        if reformat:
            err_line, err_index = self.reformat(err_line, err_index)
            if err_lineno is not None:
                err_lineno = self.adjust(err_lineno)
        return CoconutParseError(None, err_line, err_index, err_lineno)
1374684
private JSONNavi<?> failure(String err, Object jPathPostfix) {
		failure = true;
		StringBuilder sb = new StringBuilder();
		sb.append("Error: ");
		sb.append(err);
		sb.append(" at ");
		sb.append(getJPath());
		if (jPathPostfix != null)
			if (jPathPostfix instanceof Integer)
				sb.append('[').append(jPathPostfix).append(']');
			else
				sb.append('/').append(jPathPostfix);
		this.failureMessage = sb.toString();
		return this;
	}
1255336
def fail(self, msg, lineno):
        """"""
        raise TemplateAssertionError(msg, lineno, self.name, self.filename)
707160
function processRetrievedContent(content, filePrismicMetadata, queryKey, ctx) {
            if (content.results != null && content.results.length > 0) {
                var queryMetadata = filePrismicMetadata[queryKey];
                for (var i = 0; i < content.results.length; i++) {
                    var result = processRetrievedDocument(content.results[i], filePrismicMetadata, queryKey, ctx);
                    filePrismicMetadata[queryKey].results.push(result);
                }
            }
        }
1220268
def _write_to_cache(self, expr, res):
        """"""
        res = dedent(res)
        super()._write_to_cache(expr, res)
926772
function parseNext() {
			if(lexer.finish()) {
				setTimeout(function() {
					parse(nodes);
				}, cacheTime);
			}
			else {
				join(lexer.parseOn());
				setTimeout(parseNext, cacheTime);
			}
		}
1095581
def complain_on_err(self):
        """"""
        try:
            yield
        except ParseBaseException as err:
            complain(self.make_parse_err(err, reformat=False, include_ln=False))
        except CoconutException as err:
            complain(err)
247524
function(err, results) {
        if (err) {
            callback(err);
            return;
        }
        
        var keyFrequency = parseInt(results[0]);
        var docFrequency = parseInt(results[1]);
        var keyDocFrequency = results[2];

        // ensure that key frequency is relative to the given document (when appropriate)
        if (id && results.length == 4) {
            keyFrequency = parseInt(results[3]);
        }
        var tf = 1 + (Math.log(keyFrequency) / Math.LN10);
        var idf = Math.log(docFrequency / keyDocFrequency) / Math.LN10;

        var result = {};
        result.key = key;
        result.rawtf = keyFrequency;
        result.df = keyDocFrequency;
        result.n = docFrequency;
        result.idf = idf;
        result.tf = tf;
        result.tfidf = tf * idf;
        callback(null, result);
    }
504403
def parse(self, fail_callback=None):
        
        # get text fields
        for field in self.field_arguments:
            self.values[field['name']] = self.__get_value(field['name'])
            if self.values[field['name']] is None and field['required']:
                if fail_callback is not None:
                    fail_callback()
                self.__invalid_request(field['error'])
        # get file fields
        for file in self.file_arguments:
            self.files[file['name']] = self.__get_file(file)
            if self.files[file['name']] is None and file['required']:
                if fail_callback is not None:
                    fail_callback()
                self.__invalid_request(file['error'])