def t_STRING(t):
    """\\"([^\\\\"]|(\\\\.))*\\\""""
    escaped = 0
    str = t.value[1:-1]
    new_str = ''
    for i in range(0, len(str)):
        c = str[i]
        if escaped:
            if c == 'n':
                c = '\n'
            elif c == 't':
                c = '\t'
            new_str += c
            escaped = 0
        elif c == '\\':
            escaped = 1
        else:
            new_str += c
    t.value = new_str
    return t
