def __process_escapes(self, s, literal_start):
        """Convert backlash sequences in raw string literal.

        @param s: The raw contents of a raw string literal.

        @return: The string with all backlash sequences converted to their chars."""

        if s.find('\\') < 0:
            return s

        slen = len(s)
        sb = []
        i = 0
        while i < slen:
            c = s[i]
            if c != '\\':
                sb.append(c)
                i += 1
                continue
            if i + 1 >= slen:
                self.__error("No character after escape", literal_start + i)

            i += 1
            c = s[i]
            if c == 't':
                sb.append('\t')
            elif c == 'n':
                sb.append('\n')
            elif c == 'r':
                sb.append('\r')
            elif c == 'b':
                sb.append('\b')
            elif c == 'f':
                sb.append('\f')
            elif c == '"':
                sb.append('"')
            elif c == '\\':
                sb.append('\\')
            elif c == '/':
                sb.append('/')
            elif c == 'u' and i+5 <= slen:
                hex_string = s[i+1:i+5]
                i += 4
                sb.append(unichr(int(hex_string, 16)))
            else:
                self.__error("Unexpected backslash escape [" + c + "]",
                             literal_start + i)
            i += 1
        return "".join(sb)
dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/json_lib/parser.py/JsonParser.__process_escapes/original