We like parsed SQL or PL/SQL blocks...
You need to write function that return list of literals indices from source block, excluding "in" comments, OR return empty list if no literals found.
input:
some fragment of sql or pl/sql code
output:
list of literals indices [(start, end), ...] OR empty list
Sample:
```
get_textliterals("'this' is sample") -> [(0,6)]
get_textliterals("'this' is sample 'too'") -> [(0, 6), (15, 20)]
```
Text literal: any text between single quotes
Sample:
```
  s := 'i am literal'
```
Single-line comment: any text started with "--" 
Sample:
```
  a := 1;
  -- this is single-line comment
```
Multy-line comment: any text between /* */
```
  a := 1;
  /*
  this is long multy-line comment
  */
```
Note: 
1) handle single quote inside literal
```
  s := 'we can use quote '' in literal'
```  
2) multy-line literal
```
 s := '
 this is literal too
 ';
```
3) skip literal inside comment
```
s := 'test'; --when comment started - this is not 'literal'
```
4) any unclosed literal should be closed with last symbol of the source fragment
```
s := 'test
```
There is one literal in this code: "'test"
def comm_check(l, p_l, comm_started):
    if (l == '/' and p_l == '*' and comm_started == 2):
        return 0
    if (comm_started == 1 and l == '\n'):
        return 0
    if (l == '-' and p_l == '-'):
        return 1
    elif (l == '*' and p_l == '/'):
        return 2
    else:
        return comm_started
    


def get_textliterals(pv_code):
    indices = []
    open_i = -1
    comm_start = 0
    for i in range(0, len(pv_code)):
        comm_start = comm_check(pv_code[i], pv_code[i-1], comm_start)
        if pv_code[i] == '\'' and comm_start == 0:
            if open_i == -1:
                open_i = i
            else:
                if (i + 1 < len(pv_code) and i - 1 >= 0): 
                    if (pv_code[i+1] == '\'' or pv_code[i-1] == '\''): continue
                indices.append((open_i, i + 1))
                open_i = -1
    if open_i != -1: indices.append((open_i, len(pv_code)))
    return indices
def comm_check(l, p_l, comm_started):
    if (l == '/' and p_l == '*' and comm_started == 2):
        return 0
    if (comm_started == 1 and l == '\n'):
        return 0
    if (l == '-' and p_l == '-'):
        return 1
    elif (l == '*' and p_l == '/'):
        return 2
    else:
        return comm_started
    


def get_textliterals(pv_code):
    indices = []
    open_i = -1
    comm_start = 0
    for i in range(0, len(pv_code)):
        comm_start = comm_check(pv_code[i], pv_code[i-1], comm_start)
        if pv_code[i] == '\'' and comm_start == 0:
            if open_i == -1:
                open_i = i
            else:
                if (i + 1 < len(pv_code) and i - 1 >= 0): 
                    if (pv_code[i+1] == '\'' or pv_code[i-1] == '\''): continue
                indices.append((open_i, i + 1))
                open_i = -1
    if open_i != -1: indices.append((open_i, len(pv_code)))
    return indices