'Return 2 lists: nodes (text and inline elements), and system_messages.
Using `self.patterns.initial`, a pattern which matches start-strings
(emphasis, strong, interpreted, phrase reference, literal,
substitution reference, and inline target) and complete constructs
(simple reference, footnote reference), search for a candidate.  When
one is found, check for validity (e.g., not a quoted \'*\' character).
If valid, search for the corresponding end string if applicable, and
check it for validity.  If not found or invalid, generate a warning
and ignore the start-string.  Implicit inline markup (e.g. standalone
URIs) is found last.'

def parse(self, text, lineno, memo, parent):

    self.reporter = memo.reporter
    self.document = memo.document
    self.language = memo.language
    self.parent = parent
    pattern_search = self.patterns.initial.search
    dispatch = self.dispatch
    remaining = escape2null(text)
    processed = []
    unprocessed = []
    messages = []
    while remaining:
        match = pattern_search(remaining)
        if match:
            groups = match.groupdict()
            method = dispatch[(groups['start'] or groups['backquote'] or groups['refend'] or groups['fnend'])]
            (before, inlines, remaining, sysmessages) = method(self, match, lineno)
            unprocessed.append(before)
            messages += sysmessages
            if inlines:
                processed += self.implicit_inline(''.join(unprocessed), lineno)
                processed += inlines
                unprocessed = []
        else:
            break
    remaining = (''.join(unprocessed) + remaining)
    if remaining:
        processed += self.implicit_inline(remaining, lineno)
    return (processed, messages)
