commit
04f568ad50
@ -515,13 +515,7 @@ def selection_and_product(n: parser.Node, rels: Dict[str, Relation]) -> parser.N
|
|||||||
|
|
||||||
# Preparing left selection
|
# Preparing left selection
|
||||||
if left:
|
if left:
|
||||||
l_prop = ''
|
l_prop = ' and '.join((' '.join(i) for i in left))
|
||||||
while len(left) > 0:
|
|
||||||
c = left.pop(0)
|
|
||||||
for i in c:
|
|
||||||
l_prop += i + ' '
|
|
||||||
if len(left) > 0:
|
|
||||||
l_prop += ' and '
|
|
||||||
if '(' in l_prop:
|
if '(' in l_prop:
|
||||||
l_prop = '(%s)' % l_prop
|
l_prop = '(%s)' % l_prop
|
||||||
l_node = parser.Unary(SELECTION, l_prop, n.child.left)
|
l_node = parser.Unary(SELECTION, l_prop, n.child.left)
|
||||||
@ -530,12 +524,7 @@ def selection_and_product(n: parser.Node, rels: Dict[str, Relation]) -> parser.N
|
|||||||
|
|
||||||
# Preparing right selection
|
# Preparing right selection
|
||||||
if right:
|
if right:
|
||||||
r_prop = ''
|
r_prop = ' and '.join((' '.join(i) for i in right))
|
||||||
while len(right) > 0:
|
|
||||||
c = right.pop(0)
|
|
||||||
r_prop += ' '.join(c)
|
|
||||||
if len(right) > 0:
|
|
||||||
r_prop += ' and '
|
|
||||||
if '(' in r_prop:
|
if '(' in r_prop:
|
||||||
r_prop = '(%s)' % r_prop
|
r_prop = '(%s)' % r_prop
|
||||||
r_node = parser.Unary(SELECTION, r_prop, n.child.right)
|
r_node = parser.Unary(SELECTION, r_prop, n.child.right)
|
||||||
@ -546,12 +535,7 @@ def selection_and_product(n: parser.Node, rels: Dict[str, Relation]) -> parser.N
|
|||||||
|
|
||||||
# Changing main selection
|
# Changing main selection
|
||||||
if both:
|
if both:
|
||||||
both_prop = ''
|
both_prop = ' and '.join((' '.join(i) for i in both))
|
||||||
while len(both) > 0:
|
|
||||||
c = both.pop(0)
|
|
||||||
both_prop += ' '.join(c)
|
|
||||||
if len(both) > 0:
|
|
||||||
both_prop += ' and '
|
|
||||||
if '(' in both_prop:
|
if '(' in both_prop:
|
||||||
both_prop = '(%s)' % both_prop
|
both_prop = '(%s)' % both_prop
|
||||||
r = parser.Unary(SELECTION, both_prop, b_node)
|
r = parser.Unary(SELECTION, both_prop, b_node)
|
||||||
|
Loading…
Reference in New Issue
Block a user