[Swift-commit] r5213 - provenancedb

lgadelha at ci.uchicago.edu lgadelha at ci.uchicago.edu
Fri Oct 7 17:56:25 CDT 2011


Author: lgadelha
Date: 2011-10-07 17:56:25 -0500 (Fri, 07 Oct 2011)
New Revision: 5213

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



Modified: provenancedb/ProvSQL.g
===================================================================
--- provenancedb/ProvSQL.g	2011-10-07 21:19:23 UTC (rev 5212)
+++ provenancedb/ProvSQL.g	2011-10-07 22:56:25 UTC (rev 5213)
@@ -300,7 +300,14 @@
 			relations.add($a.text.split("\\.")[0]);
 			whereClause += $a.text;
 		}
+			(
+		NOT
+		{
+			whereClause += " NOT ";
+		}
+	)? 
 
+	(
 	b=OP
 	{
 		whereClause += $b.text;
@@ -321,28 +328,61 @@
 		whereClause += $e.text;
 	} 
 	)
-	|	f=entityAttribute 
-		{ 
-			relations.add($f.text.split("\\.")[0]);
-			whereClause += $f.text;
-		}
-
+	|
 	BETWEEN 
 	{
 		whereClause += " BETWEEN ";
 	} 
-	g=STRING 
+	f=STRING 
 	{
-		whereClause += $g.text;
+		whereClause += $f.text;
 	} 
 	AND 
 	{
 		whereClause += " AND ";
 	} 
-	h=STRING
+	g=STRING
 	{
+		whereClause += $g.text;
+	} 
+	|
+	LIKE
+	{
+		whereClause += " BETWEEN ";
+	} 
+	h=STRING 
+	{
 		whereClause += $h.text;
 	} 
+		|
+	(
+	IN 
+	{
+		whereClause += " IN ";
+	}
+	|
+		i=OP 
+	{
+		whereClause += $i.text;
+	} 
+
+	(
+		ALL 
+		{
+			whereClause += " ALL ";
+		}
+		| 
+		ANY
+		{
+			whereClause += " ANY ";
+		}
+	)
+
+	)
+		'(' { System.out.print("("); }
+		squery
+		')' { System.out.print(")"); }
+	)
 	;
 	
 entityAttribute	:	ID (DOT ID)?;
@@ -360,6 +400,12 @@
 
 OR	:	'o' 'r';
 
+NOT	:	'n' 'o' 't';
+
+IN	:	'i' 'n';
+
+ANY	:	'a' 'n' 'y';
+
 UNION	:	'u' 'n' 'i' 'o' 'n';
 
 INTERSECT 
@@ -375,6 +421,8 @@
 
 BETWEEN	:	'b' 'e' 't' 'w' 'e' 'e' 'n';
 
+LIKE 	:	'l' 'i' 'k' 'e';
+
 SEMICOLON	:	';';
 
 ID  :	('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-')*




More information about the Swift-commit mailing list