From b61625f10db4b9d1b9fef90b6f25f47ca61ff785 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 21 Jul 2008 08:03:50 +0000 Subject: [PATCH] changed outer join syntax because the previous one didn't work git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@19 014f5005-505e-4b48-8d0a-63407b615a7c --- parser.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parser.py b/parser.py index 9dfe560..918b644 100644 --- a/parser.py +++ b/parser.py @@ -21,7 +21,7 @@ def parse(expr): executable by eval function to get the result of the expression. It has 2 class of operators: without parameters - *, -, ᑌ, ᑎ, ᐅᐊ, ᐅᐊLEFT, ᐅᐊRIGHT, ᐅᐊFULL + *, -, ᑌ, ᑎ, ᐅᐊ, ᐅLEFTᐊ, ᐅRIGHTᐊ, ᐅFULLᐊ with parameters: σ, π, ρ @@ -118,14 +118,16 @@ def parse_op(expr): result="" symbols={} + symbols["*"]=".product(%s)" symbols["-"]=".difference(%s)" symbols["ᑌ"]=".union(%s)" symbols["ᑎ"]=".intersection(%s)" + symbols["ᐅLEFTᐊ"]=".outer_left(%s)" + symbols["ᐅRIGHTᐊ"]=".outer_right(%s)" + symbols["ᐅFULLᐊ"]=".outer(%s)" symbols["ᐅᐊ"]=".join(%s)" - symbols["ᐅᐊLEFT"]=".outer_left(%s)" - symbols["ᐅᐊRIGHT"]=".outer_right(%s)" - symbols["ᐅᐊFULL"]=".outer(%s)" + for i in symbols: expr=expr.replace(i,"_____%s_____"% (i))