Better handling of parenthesis inside string literals

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.
This commit is contained in:
Salvo 'LtWorf' Tomaselli
2016-04-09 11:37:28 +02:00
parent 6bc219c635
commit 1b049e13f0
10 changed files with 49 additions and 3 deletions

1
test/par1.query Normal file
View File

@@ -0,0 +1 @@
σ name=='(' (people)

1
test/par1.result Normal file
View File

@@ -0,0 +1 @@
id,name,chief,age

1
test/par2.query Normal file
View File

@@ -0,0 +1 @@
σ (name=='(') (people)

1
test/par2.result Normal file
View File

@@ -0,0 +1 @@
id,name,chief,age

1
test/par3.query Normal file
View File

@@ -0,0 +1 @@
σ (name==')') (people)

1
test/par3.result Normal file
View File

@@ -0,0 +1 @@
id,name,chief,age

1
test/par4.query Normal file
View File

@@ -0,0 +1 @@
σ name==')' (people)

1
test/par4.result Normal file
View File

@@ -0,0 +1 @@
id,name,chief,age