def farthest_parseinfo(parseinfo):
    """As we might have tried several attempts of parsing different formats
    we have several error reports from the respective parsers.
    The parser that made it the farthest (line, column) probably
    matched the format but failed anyway.
    The error report of this least unsuccessful parser is the only
    one being reported.
    """
    line = parseinfo.get('error_line_number', -1)
    column = parseinfo.get('error_column', -1)
    prev = parseinfo.get('prev_parseinfo')
    if prev is None:
        return line, column, parseinfo
    prevline, prevcolumn, prev = farthest_parseinfo(prev)
    if (prevline, prevcolumn) > (line, column):
        return prevline, prevcolumn, prev
    else:
        return line, column, parseinfo
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/farthest_parseinfo/original