[Checkins] SVN: Sandbox/adamg/ocql/trunk/src/ocql/USAGE.txt add BNF syntax

Charith Paranaliyanage paranaliyanage at gmail.com
Fri Aug 15 03:19:20 EDT 2008


Log message for revision 89869:
  add BNF syntax

Changed:
  U   Sandbox/adamg/ocql/trunk/src/ocql/USAGE.txt

-=-
Modified: Sandbox/adamg/ocql/trunk/src/ocql/USAGE.txt
===================================================================
--- Sandbox/adamg/ocql/trunk/src/ocql/USAGE.txt	2008-08-15 07:18:40 UTC (rev 89868)
+++ Sandbox/adamg/ocql/trunk/src/ocql/USAGE.txt	2008-08-15 07:19:20 UTC (rev 89869)
@@ -135,5 +135,75 @@
 book itself.
 
 Here goes the dry syntax:
+expression 	::= expression "union" expression
+			| expression “differ” expression
+			| collection “[“ qualifier "|" expression “]” 
+			| collection “[“ qualifier "for" expression “]”
+			| literal
+			| path
+			| call
+			| “len” “(” expression “)”
 
+collection 	::= set
+	        | list
+			| bag
+
+qualifier 	::= Λ
+			| generator
+			| definition
+			| filter
+			| qualifier “;” qualifier
+                             
+generator 	::= identifier “in” expression
+
+filter 		::= filter "and" filter
+			| filter "or" filter
+			| "not" condition
+			| condition    
+
+condition 	::= "(" filter ")"
+			| quantified operator quantified
+			| ”isinstance” “(“ expression “,” identifier ”)”
+
+quantified 	::= expression
+			| quantification expression
+
+operator 	::= “=”
+			| “~=”
+			| “<”
+			| “<=”
+			| “>”
+			| “>=”
+			| “==”
+			| “~==”
+
+quantification ::= “some”
+			| “every”
+			| “just” expression
+			| “atleast” expression
+			| “atmost” expression
+
+definition 	::= identifier “as” expression
+
+literal 	::= constant
+			| collection "{" element "}"
+
+element 	::= Λ
+			| expression
+			| element "," element
+			| expression "..." expression
+
+path 		::= identifier
+			|identifier “.” method
+
+method 		::= identifier
+			|identifier “(“ argument_list “)”
+
+argument_list ::= Λ
+			|expression
+			|expression “,” argument_list
+
+call 		::= identifier “(“ argument_list “)”
+
+
 #TODO!



More information about the Checkins mailing list