Traces a parse element (only enabled in develop).
19020
def trace(self, item):
        """"""
        if DEVELOP:
            item.debugActions = (
                None,  # no start action
                self._trace_success_action,
                self._trace_exc_action,
            )
            item.debug = True
        return item
82725
private static void parseListeners(final Element rootElement,
									   final WebApp webApp) {
		final Element[] elements = getChildren(rootElement, "listener");
		Arrays.stream(elements).forEach(element ->
				addWebListener(webApp, getTextContent(getChild(element, "listener-class"))));
	}
247897
def parse(self, parser):
        ''''''
        # line number of token that started the tag
        lineno = next(parser.stream).lineno

        # template context
        context = nodes.ContextReference()

        # parse keyword arguments
        kwargs = []

        while parser.stream.look().type == lexer.TOKEN_ASSIGN:
            key = parser.stream.expect(lexer.TOKEN_NAME)
            next(parser.stream)
            kwargs.append(
                nodes.Keyword(key.value, parser.parse_expression()),
            )
            parser.stream.skip_if('comma')
        # parse content of the activeurl block up to endactiveurl
        body = parser.parse_statements(['name:endactiveurl'], drop_needle=True)

        args = [context]

        call_method = self.call_method(
            'render_tag',
            args=args,
            kwargs=kwargs,
        )

        return nodes.CallBlock(call_method, [], [], body).set_lineno(lineno)
982782
private If parseIf(Node node) {
        return new If(
                nodeAttribute(node, TAG_VAR_ATTR_NAME, Variable.DEFAULT_NAME),
                parseTemplateElements(node)
        );
    }
638370
def _rt_parse_types(self, statement, element, mode, lineparser):
        """"""
        if mode == "insert":
            #Since we got to this point, there is *no* code element that owns the current
            #line which is being replaced; we are merely checking to see if the new line
            #being entered matches a type definition, do the same thing as "insert"
            tnew, start, end = self.tparser.parse_signature(statement, element, element)
            #We need to set sensible boundaries for 'start' and 'end' so that if the lines
            #immediately after this one are member definitions (for example) they get
            #associated correctly with this type.
            if tnew is not None:
                tnew.start, tnew.end = lineparser.absolute_charindex(statement, start, end)
                tnew.incomplete = True
                element.types[tnew.name.lower()] = tnew
                lineparser.additions.append((tnew, element))
1188402
protected void parseRootElement() {
    collectElementIds();
    parseDefinitionsAttributes();
    parseImports();
    parseMessages();
    parseSignals();
    parseErrors();
    parseEscalations();
    parseProcessDefinitions();
    parseCollaboration();

    // Diagram interchange parsing must be after parseProcessDefinitions,
    // since it depends and sets values on existing process definition objects
    parseDiagramInterchangeElements();

    for (BpmnParseListener parseListener : parseListeners) {
      parseListener.parseRootElement(rootElement, getProcessDefinitions());
    }
  }
166640
def _parse_priority(self, element):
        
        self._log.debug('Setting Trigger priority: {priority}'.format(priority=element.text))
        self.priority = int(element.text)
938955
@SuppressWarnings("unchecked")
    private <T> T parseElement(Element element, Class<T> cls) {
        T value;
        if (element == null) {
            value = null;
        } else if (MwsObject.class.isAssignableFrom(cls)) {
            value = MwsUtl.newInstance(cls);
            Element holdElement = currentElement;
            Node holdChild = currentChild;
            setCurrentElement(element);
            ((MwsObject) value).readFragmentFrom(this);
            currentElement = holdElement;
            currentChild = holdChild;
        } else if (cls == Object.class) {
            value = (T)element;
        } else {
            String v = getElementText(element);
            value = parseString(v, cls);
        }
        return value;
    }
569530
def parse_on_entry(self, node):
        

        event_handler = OnEntry()

        self.current_event_handler = event_handler
        self.current_regime.add_event_handler(event_handler)

        self.process_nested_tags(node)

        self.current_event_handler = None
171285
synchronized static TraceSpecification setTraceSpec(String spec) {
        // If logger is used & configured by logger properties, 
        // we're done as far as trace string processing is concerned
        if (WsLogManager.isConfiguredByLoggingProperties()) {
            return null;
        }

        // If the specified string is null, or it is equal to a string,
        // or the sensitive flag has not been toggled,
        // we've already parsed, skip it.
        if ((spec == null || spec.equals(traceString)) && Tr.activeTraceSpec.isSensitiveTraceSuppressed() == suppressSensitiveTrace) {
            return null;
        }

        traceString = spec;

        // Parse the trace specification string, this will gather
        // exceptions that occur for different elements of the string
        TraceSpecification newTs = new TraceSpecification(spec, safeLevelsIndex, suppressSensitiveTrace);
        TraceSpecificationException tex = newTs.getExceptions();

        if (tex != null) {
            do {
                tex.warning(loggingConfig.get() != null);
                tex = tex.getPreviousException();
            } while (tex != null);
        }

        Tr.setTraceSpec(newTs);

        // Return the new/updated TraceSpecification to the caller. The caller can
        // then determine whether or not all elements of the TraceSpecification 
        // were known to the system or not.
        return newTs;
    }
316515
def _line(self, element):
        """"""
        for v in _get_xml_version(element):
            if "id" in element.attrib:
                tline = TemplateLine(element, None, self.versions[v].comment)
                self.versions[v].entries[tline.identifier] = tline
                self.versions[v].order.append(tline.identifier)
            else:
                msg.warn("no id element in {}. Ignored. (_line)".format(element))
329374
def enable_tracing(self):
        
        hooktrace = self.hook._trace

        def before(hook_name, methods, kwargs):
            hooktrace.root.indent += 1
            hooktrace(hook_name, kwargs)

        def after(outcome, hook_name, methods, kwargs):
            if outcome.excinfo is None:
                hooktrace("finish", hook_name, "-->", outcome.get_result())
            hooktrace.root.indent -= 1

        return self.add_hookcall_monitoring(before, after)
1265993
def process_raw_trace(raw_trace):
  """"""
  trace = trace_events_pb2.Trace()
  trace.ParseFromString(raw_trace)
  return ''.join(trace_events_json.TraceEventsJsonStream(trace))
29359
def iterparse(source, events=('end',), remove_comments=True, **kw):
    """"""
    return ElementTree.iterparse(source, events, SourceLineParser(), **kw)
477075
private void parseContentspec(String name) throws Exception {
        // FIXME: move elementDecl() into setElement(), pass EMTPY/ANY ...
        if (tryRead("EMPTY")) {
            setElement(name, CONTENT_EMPTY, null, null);
            if (!skippedPE) {
                handler.getDeclHandler().elementDecl(name, "EMPTY");
            }
            return;
        } else if (tryRead("ANY")) {
            setElement(name, CONTENT_ANY, null, null);
            if (!skippedPE) {
                handler.getDeclHandler().elementDecl(name, "ANY");
            }
            return;
        } else {
            String model;
            char[] saved;

            require('(');
            saved = readBuffer;
            dataBufferAppend('(');
            skipWhitespace();
            if (tryRead("#PCDATA")) {
                dataBufferAppend("#PCDATA");
                parseMixed(saved);
                model = dataBufferToString();
                setElement(name, CONTENT_MIXED, model, null);
            } else {
                parseElements(saved);
                model = dataBufferToString();
                setElement(name, CONTENT_ELEMENTS, model, null);
            }
            if (!skippedPE) {
                handler.getDeclHandler().elementDecl(name, model);
            }
        }
    }
588801
def parse_at_element(
            self,
            element,  # type: ET.Element
            state  # type: _ProcessorState
    ):
        # type: (...) -> Any
        """"""
        if self._attribute:
            parsed_value = self._parse_attribute(element, self._attribute, state)
        else:
            parsed_value = self._parser_func(element.text, state)

        return _hooks_apply_after_parse(self._hooks, state, parsed_value)
250538
function parseList(kind, parseElement) {
            var saveParsingContext = parsingContext;
            parsingContext |= 1 << kind;
            var result = [];
            result.pos = getNodePos();
            while (!isListTerminator(kind)) {
                if (isListElement(kind, /*inErrorRecovery*/ false)) {
                    var element = parseListElement(kind, parseElement);
                    result.push(element);
                    continue;
                }
                if (abortParsingListOrMoveToNextToken(kind)) {
                    break;
                }
            }
            result.end = getNodeEnd();
            parsingContext = saveParsingContext;
            return result;
        }