@parser_singleton
def string_parser((string, start, end)):
    if not start < end:
        yield None, None

    if string[start] == '"':
        match = quoted_rex.match(string, start, end)
        if not match:
            yield None, None
        value = json.loads(match.group(1))
        start = match.end()
    else:
        match = unquoted_rex.match(string, start, end)
        if not match:
            yield None, None
        value = match.group(1)
        start = match.end()

    yield None, (atoms.String(value), (string, start, end))
dataset/ETHPy150Open abusesa/abusehelper/abusehelper/core/rules/rulelang.py/string_parser/original