Commit d4702ff2 by Frédéric Boyer

[ADD] order in location

parent 3e10b14a
......@@ -368,6 +368,12 @@ class CompositeLocation(Location):
def __str__(self):
return "join(%s)" % ','.join([str(x)
for x in self._locs])
class CompositeLocationOrder(CompositeLocation):
def __str__(self):
return "order(%s)" % ','.join([str(x)
for x in self._locs])
class ComplementLocation(Location):
"""
......@@ -477,6 +483,9 @@ def __locationParser(text):
if text[0:5]=='join(':
assert text[-1]==')',"Misformated location : %s" % text
return CompositeLocation(__locationParser(sl) for sl in __sublocationIterator(text[5:-1]))
if text[0:6]=='order(':
assert text[-1]==')',"Misformated location : %s" % text
return CompositeLocationOrder(__locationParser(sl) for sl in __sublocationIterator(text[6:-1]))
elif text[0:11]=='complement(':
assert text[-1]==')',"Misformated location : %s" % text
subl = tuple(__locationParser(sl) for sl in __sublocationIterator(text[11:-1]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment