[Swift-commit] r5241 - provenancedb

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Tue Oct 18 08:07:33 CDT 2011


Author: lgadelha
Date: 2011-10-18 08:07:33 -0500 (Tue, 18 Oct 2011)
New Revision: 5241

Modified:
   provenancedb/ProvSQL.g
Log:
Minor changes.


Modified: provenancedb/ProvSQL.g
===================================================================
--- provenancedb/ProvSQL.g	2011-10-18 03:01:42 UTC (rev 5240)
+++ provenancedb/ProvSQL.g	2011-10-18 13:07:33 UTC (rev 5241)
@@ -305,9 +305,8 @@
 		')' { System.out.print(")"); }
 		;     
 
-selectExpression
-	:	(
-		a=entityAttribute 
+selectAtom
+	:	a=entityAttribute 
 		{ 
 			selectClause += $a.text; 
 			relations.add($a.text.split("\\.")[0]);
@@ -317,9 +316,9 @@
 		|
 		b=AGGRFUN
 		{
-			selectclause+=$b.text;
+			selectClause+=$b.text;
 		} 
-		'(' 	{ selectclause+="("; }
+		'(' 	{ selectClause+="("; }
 		c=entityAttribute  
 		{ 
 			selectClause += $c.text; 
@@ -327,34 +326,16 @@
 			if($c.text.split("\\.").length == 1)
 				selectClause +=  ".*";
 		}
-		')' 	{ selectclause+=")"; }
+		')' 	{ selectClause+=")"; }
+	;
 
+selectExpression
+	:	(
+			selectAtom		
 		)
-		(COLON 
+		(COLON { selectClause+=","; }
 		(
-		d=entityAttribute 
-		{ 
-			selectClause += "," + $d.text; 
-			relations.add($d.text.split("\\.")[0]);
-			if($d.text.split("\\.").length == 1)
-				selectClause +=  ".*";
-		}
-		|
-		e=AGGRFUN
-		{
-			selectclause+=$e.text;
-		} 
-		'(' 	{ selectclause+="("; }
-		f=entityAttribute  
-		{ 
-			selectClause += $f.text; 
-			relations.add($f.text.split("\\.")[0]);
-			if($f.text.split("\\.").length == 1)
-				selectClause +=  ".*";
-		}
-		')' 	{ selectclause+=")"; }
-
-
+			selectAtom
 		)
 		)*
 	;
@@ -375,7 +356,7 @@
 	;
 
 whereAtom 
-	:	a=entityAttribute 
+	:	a=entityAndAttribute 
 		{ 
 			relations.add($a.text.split("\\.")[0]);
 			whereClause += $a.text;
@@ -583,11 +564,14 @@
 
 ORDER	:	'order';
 
+COMPARERUN
+	:	'compare_run';
+
 BY	:	'by';
 
 AGGRFUN	:	'avg' | 'max' | 'min' | 'count' | 'sum';
 
-SELECT 	:	's' 'e' 'l' 'e' 'c' 't';
+SELECT 	:	'select';
 
 DESC	:	'desc';
 




More information about the Swift-commit mailing list