When scanning for the matching parenthesis, string literals
were not taken into account, which would inevitably lead to
errors if one wanted to do a selection on a string containing
a parenthesis.
Now it uses a state-machine to skip the ones that are located
inside literals.