def parse_xcodeproject_plist_via_json(text, dictionarytype=dict):
    """The CPython implementation comes with a fast JSON parser that is written in C.
    Instead of simply parsing the Plist we can split it into tokens with a regular expression
    and do a plist-to-json syntax transformation.
    This gives us about 80% faster parsing over our classic recursive descent parser.
    """
    t0 = time.time()
    text = unistr(text)
    tokens = []
    emit = tokens.append
    jsondumps = json.JSONEncoder().encode

    formatdesc = 'Xcode plist via JSON'
    prjname = None
    pos = skip_whitespace(text)
    for m in r_tokenize.finditer(text, pos):
        if m.start() != pos:
            # The found fragments must be contiguous for a valid parse
            return None, error_report_dict(text, m.start(), m.end(), formatdesc)

        pos = m.end()

        # For our few rules a simple if-sequence ordered by probability is faster than
        # a lookup table with associated function calls.
        # The averaged measured probabilities for the rules we are interested in were:
        # UNQUOTEDSTRING:35% SEMICOLON:20% EQUALS:20% COMMENT:9% DICTIONARY:4%
        #   DICTIONARYEND:4% COMMA:4% QUOTEDSTRING:3% ARRAY:1% ARRAYEND:1%

        # This parser variant should be fast so we leave out almost
        # all error checks which results in a very liberal parser.
        # If this plist is accepted by the JSON based parser it still might not parse in Xcode.

        rulenr = m.lastindex
        if rulenr == RULE_UNQUOTEDSTRING:
            emit('"')
            emit(m.group(rulenr))
            emit('"')
        elif rulenr == RULE_SEMICOLON:
            emit(',')
        elif rulenr == RULE_EQUALS:
            emit(':')
        elif rulenr == RULE_COMMENT:
            if prjname is None:
                prjname = projectname_from_comment(m.group(rulenr))
            continue
        elif rulenr == RULE_DICTIONARY:
            emit('{')
        elif rulenr == RULE_DICTIONARYEND:
            if tokens[-1] == ',':
                # This was probably a semicolon terminator that was transformed into a comma.
                tokens.pop()
            elif tokens[-1] != '{':
                # Neither a preceding terminator nor an empty list.
                return None, error_report_dict(text, m.start(), m.end(), formatdesc)
            emit('}')
        elif rulenr == RULE_COMMA:
            emit(',')
        elif rulenr == RULE_QUOTEDSTRING:
            emit(jsondumps(unescape_str(m.group(rulenr))))
        elif rulenr == RULE_ARRAY:
            emit('[')
        elif rulenr == RULE_ARRAYEND:
            if tokens[-1] == ',':
                tokens.pop()
            emit(']')

    try:
        jsontext = ''.join(tokens)
        root = json.loads(jsontext, object_pairs_hook=dictionarytype)
    except ValueError as e:
        linenr, column, errortext = error_report_from(formatdesc, jsontext, text_type(e))
        return None, {'error_column': column,
                      'error_line_number': linenr,
                      'error_text': errortext}

    parseinfo = {
        'format': 'xcode',
        'parsetime': t0 - time.time(),
        'parser': 'fast',
    }
    if prjname is not None:
        parseinfo['projectname'] = prjname
    return root, parseinfo
dataset/ETHPy150Open mikr/xcodeprojer/xcodeprojer.py/parse_xcodeproject_plist_via_json/swapped operands of `-`