blob: 360879c66a40d87804501001dc434ef18ad1805f [file] [log] [blame]
Till Westmannea8ab392013-06-05 15:17:08 -07001<!--
2 ! Copyright 2009-2013 by The Regents of the University of California
3 ! Licensed under the Apache License, Version 2.0 (the "License");
4 ! you may not use this file except in compliance with the License.
5 ! you may obtain a copy of the License from
6 !
7 ! http://www.apache.org/licenses/LICENSE-2.0
8 !
9 ! Unless required by applicable law or agreed to in writing, software
10 ! distributed under the License is distributed on an "AS IS" BASIS,
11 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 ! See the License for the specific language governing permissions and
13 ! limitations under the License.
14 !-->
vinayakb38b7ca42012-03-05 05:44:15 +000015<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
16<HTML>
17<HEAD>
18<TITLE>BNF for AQL.jj</TITLE>
19</HEAD>
20<BODY>
21<H1 ALIGN=CENTER>BNF for AQL.jj</H1>
22<H2 ALIGN=CENTER>TOKENS</H2>
23<TABLE>
24 <!-- Token -->
25 <TR>
26 <TD>
27 <PRE>
28&lt;DEFAULT&gt; TOKEN : {
29&lt;CARET: "^"&gt;
30}
31
32 </PRE>
33 </TD>
34 </TR>
35 <!-- Token -->
36 <TR>
37 <TD>
38 <PRE>
39&lt;DEFAULT&gt; TOKEN : {
40&lt;DATASET: "dataset"&gt;
41}
42
43 </PRE>
44 </TD>
45 </TR>
46 <!-- Token -->
47 <TR>
48 <TD>
49 <PRE>
50&lt;DEFAULT&gt; TOKEN : {
51&lt;LEFTPAREN: "("&gt;
52}
53
54 </PRE>
55 </TD>
56 </TR>
57 <!-- Token -->
58 <TR>
59 <TD>
60 <PRE>
61&lt;DEFAULT&gt; TOKEN : {
62&lt;RIGHTPAREN: ")"&gt;
63}
64
65 </PRE>
66 </TD>
67 </TR>
68 <!-- Token -->
69 <TR>
70 <TD>
71 <PRE>
72&lt;DEFAULT&gt; TOKEN : {
73&lt;INTEGER_LITERAL: (&lt;DIGIT&gt;)+&gt;
74}
75
76 </PRE>
77 </TD>
78 </TR>
79 <!-- Token -->
80 <TR>
81 <TD>
82 <PRE>
83&lt;DEFAULT&gt; TOKEN : {
84&lt;NULL: "null"&gt;
85}
86
87 </PRE>
88 </TD>
89 </TR>
90 <!-- Token -->
91 <TR>
92 <TD>
93 <PRE>
94&lt;DEFAULT&gt; TOKEN : {
95&lt;TRUE: "true"&gt;
96}
97
98 </PRE>
99 </TD>
100 </TR>
101 <!-- Token -->
102 <TR>
103 <TD>
104 <PRE>
105&lt;DEFAULT&gt; TOKEN : {
106&lt;FALSE: "false"&gt;
107}
108
109 </PRE>
110 </TD>
111 </TR>
112 <!-- Token -->
113 <TR>
114 <TD>
115 <PRE>
116&lt;DEFAULT&gt; TOKEN : {
117&lt;#DIGIT: ["0"-"9"]&gt;
118}
119
120 </PRE>
121 </TD>
122 </TR>
123 <!-- Token -->
124 <TR>
125 <TD>
126 <PRE>
127&lt;DEFAULT&gt; TOKEN : {
128&lt;DOUBLE_LITERAL: &lt;INTEGER&gt; | &lt;INTEGER&gt; ("." &lt;INTEGER&gt;)? | "." &lt;INTEGER&gt;&gt;
129| &lt;FLOAT_LITERAL: &lt;INTEGER&gt; ("f" | "F") | &lt;INTEGER&gt; ("." &lt;INTEGER&gt; ("f" | "F"))? | "." &lt;INTEGER&gt; ("f" | "F")&gt;
130| &lt;INTEGER: (&lt;DIGIT&gt;)+&gt;
131}
132
133 </PRE>
134 </TD>
135 </TR>
136 <!-- Token -->
137 <TR>
138 <TD>
139 <PRE>
140&lt;DEFAULT&gt; TOKEN : {
141&lt;#LETTER: ["A"-"Z","a"-"z"]&gt;
142}
143
144 </PRE>
145 </TD>
146 </TR>
147 <!-- Token -->
148 <TR>
149 <TD>
150 <PRE>
151&lt;DEFAULT&gt; TOKEN : {
152&lt;SPECIALCHARS: ["$","_","-"]&gt;
153}
154
155 </PRE>
156 </TD>
157 </TR>
158 <!-- Token -->
159 <TR>
160 <TD>
161 <PRE>
162&lt;DEFAULT&gt; TOKEN : {
163&lt;STRING_LITERAL: "\"" (&lt;EscapeQuot&gt; | ~["\""])* "\"" | "\'" (&lt;EscapeApos&gt; | ~["\'"])* "\'"&gt;
164| &lt;#EscapeQuot: "\\\""&gt;
165| &lt;#EscapeApos: "\\\'"&gt;
166}
167
168 </PRE>
169 </TD>
170 </TR>
171 <!-- Token -->
172 <TR>
173 <TD>
174 <PRE>
175&lt;DEFAULT&gt; TOKEN : {
176&lt;IDENTIFIER: (&lt;LETTER&gt;)+ (&lt;LETTER&gt; | &lt;DIGIT&gt; | &lt;SPECIALCHARS&gt;)*&gt;
177}
178
179 </PRE>
180 </TD>
181 </TR>
182 <!-- Token -->
183 <TR>
184 <TD>
185 <PRE>
186&lt;DEFAULT&gt; TOKEN : {
187&lt;VARIABLE: "$" &lt;IDENTIFIER&gt;&gt;
188}
189
190 </PRE>
191 </TD>
192 </TR>
193 <!-- Token -->
194 <TR>
195 <TD>
196 <PRE>
197&lt;DEFAULT&gt; SKIP : {
198" "
199| "\t"
200| "\r"
201| "\n"
202}
203
204 </PRE>
205 </TD>
206 </TR>
207 <!-- Token -->
208 <TR>
209 <TD>
210 <PRE>
211&lt;DEFAULT&gt; SKIP : {
212&lt;"//" (~["\n"])* "\n"&gt;
213}
214
215 </PRE>
216 </TD>
217 </TR>
218 <!-- Token -->
219 <TR>
220 <TD>
221 <PRE>
222&lt;DEFAULT&gt; SKIP : {
223&lt;"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")?&gt;
224}
225
226 </PRE>
227 </TD>
228 </TR>
229 <!-- Token -->
230 <TR>
231 <TD>
232 <PRE>
233&lt;DEFAULT&gt; SKIP : {
234"/*" : INSIDE_COMMENT
235}
236
237 </PRE>
238 </TD>
239 </TR>
240 <!-- Token -->
241 <TR>
242 <TD>
243 <PRE>
244&lt;INSIDE_COMMENT&gt; SPECIAL : {
245&lt;"+" (" ")* (~["*"])*&gt;
246}
247
248 </PRE>
249 </TD>
250 </TR>
251 <!-- Token -->
252 <TR>
253 <TD>
254 <PRE>
255&lt;INSIDE_COMMENT&gt; SKIP : {
256"/*" : {
257}
258
259 </PRE>
260 </TD>
261 </TR>
262 <!-- Token -->
263 <TR>
264 <TD>
265 <PRE>
266&lt;INSIDE_COMMENT&gt; SKIP : {
267"*/" : {
268| &lt;~[]&gt;
269}
270
271 </PRE>
272 </TD>
273 </TR>
274</TABLE>
275<H2 ALIGN=CENTER>NON-TERMINALS</H2>
276<TABLE>
277<TR>
278<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod1">Statement</A></TD>
279<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
280<TD ALIGN=LEFT VALIGN=BASELINE>( ( ( "use" | "declare" "function" | "create" ( "type" | "nodegroup" | "external" &lt;DATASET&gt; | &lt;DATASET&gt; | "index" | "dataverse" ) | "load" | "enlist" | "drop" ( &lt;DATASET&gt; | "index" | "nodegroup" | "type" | "dataverse" ) | "write" | "set" | "insert" | "delete" | "update" )* ( <A HREF="#prod2">Query</A> )? ) &lt;EOF&gt; )</TD>
281</TR>
282<TR>
283<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod3">InsertStatement</A></TD>
284<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
285<TD ALIGN=LEFT VALIGN=BASELINE>"into" &lt;DATASET&gt; &lt;IDENTIFIER&gt; &lt;LEFTPAREN&gt; <A HREF="#prod2">Query</A> &lt;RIGHTPAREN&gt; ";"</TD>
286</TR>
287<TR>
288<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod4">DeleteStatement</A></TD>
289<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
290<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod5">Variable</A> "from" &lt;DATASET&gt; &lt;IDENTIFIER&gt; ( "where" <A HREF="#prod6">Expression</A> )? ";"</TD>
291</TR>
292<TR>
293<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod7">UpdateStatement</A></TD>
294<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
295<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod5">Variable</A> "in" <A HREF="#prod6">Expression</A> "where" <A HREF="#prod6">Expression</A> &lt;LEFTPAREN&gt; ( <A HREF="#prod8">UpdateClause</A> ( "," <A HREF="#prod8">UpdateClause</A> )* ) &lt;RIGHTPAREN&gt; ";"</TD>
296</TR>
297<TR>
298<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod8">UpdateClause</A></TD>
299<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
300<TD ALIGN=LEFT VALIGN=BASELINE>"set" <A HREF="#prod6">Expression</A> ":=" <A HREF="#prod6">Expression</A></TD>
301</TR>
302<TR>
303<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
304<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
305<TD ALIGN=LEFT VALIGN=BASELINE>"insert" <A HREF="#prod3">InsertStatement</A></TD>
306</TR>
307<TR>
308<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
309<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
310<TD ALIGN=LEFT VALIGN=BASELINE>"delete" <A HREF="#prod4">DeleteStatement</A></TD>
311</TR>
312<TR>
313<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
314<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
315<TD ALIGN=LEFT VALIGN=BASELINE>"update" <A HREF="#prod7">UpdateStatement</A></TD>
316</TR>
317<TR>
318<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
319<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
320<TD ALIGN=LEFT VALIGN=BASELINE>"if" &lt;LEFTPAREN&gt; <A HREF="#prod6">Expression</A> &lt;RIGHTPAREN&gt; "then" <A HREF="#prod8">UpdateClause</A> ( "else" <A HREF="#prod8">UpdateClause</A> )?</TD>
321</TR>
322<TR>
323<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod9">SetStatement</A></TD>
324<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
325<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; &lt;STRING_LITERAL&gt; ";"</TD>
326</TR>
327<TR>
328<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod10">WriteStatement</A></TD>
329<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
330<TD ALIGN=LEFT VALIGN=BASELINE>( ( "output" "to" &lt;IDENTIFIER&gt; ":" &lt;STRING_LITERAL&gt; ( "using" &lt;STRING_LITERAL&gt; )? ) | ( "into" &lt;DATASET&gt; &lt;IDENTIFIER&gt; &lt;LEFTPAREN&gt; <A HREF="#prod2">Query</A> &lt;RIGHTPAREN&gt; ) ) ";"</TD>
331</TR>
332<TR>
333<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod11">CreateIndexStatement</A></TD>
334<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
335<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if not exists" )? "on" &lt;IDENTIFIER&gt; &lt;LEFTPAREN&gt; ( &lt;IDENTIFIER&gt; ) ( "," &lt;IDENTIFIER&gt; )* &lt;RIGHTPAREN&gt; ( "type" ( "btree" | "keyword" | "qgram" | "rtree" ) ";" | ";" )</TD>
336</TR>
337<TR>
338<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod12">DataverseDeclaration</A></TD>
339<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
340<TD ALIGN=LEFT VALIGN=BASELINE>"dataverse" &lt;IDENTIFIER&gt; ";"</TD>
341</TR>
342<TR>
343<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod13">DropStatement</A></TD>
344<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
345<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if exists" )? ";"</TD>
346</TR>
347<TR>
348<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod14">IndexDropStatement</A></TD>
349<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
350<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; "." &lt;IDENTIFIER&gt; ( "if exists" )? ";"</TD>
351</TR>
352<TR>
353<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod15">NodeGroupDropStatement</A></TD>
354<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
355<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if exists" )? ";"</TD>
356</TR>
357<TR>
358<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod16">TypeDropStatement</A></TD>
359<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
360<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if exists" )? ";"</TD>
361</TR>
362<TR>
363<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod17">DataverseDropStatement</A></TD>
364<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
365<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if exists" )? ";"</TD>
366</TR>
367<TR>
368<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod18">CreateDataverseStatement</A></TD>
369<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
370<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if not exists" )? ( "with format" &lt;STRING_LITERAL&gt; )? ";"</TD>
371</TR>
372<TR>
373<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod19">LoadStatement</A></TD>
374<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
375<TD ALIGN=LEFT VALIGN=BASELINE>&lt;DATASET&gt; &lt;IDENTIFIER&gt; "from" ( &lt;IDENTIFIER&gt; ":" &lt;STRING_LITERAL&gt; ) ( "," &lt;IDENTIFIER&gt; ":" &lt;STRING_LITERAL&gt; )* ( "delimited" "by" &lt;STRING_LITERAL&gt; )? ( "pre-sorted" )? ";"</TD>
376</TR>
377<TR>
378<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod20">EnlistStatement</A></TD>
379<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
380<TD ALIGN=LEFT VALIGN=BASELINE>&lt;DATASET&gt; &lt;IDENTIFIER&gt; ";"</TD>
381</TR>
382<TR>
383<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod21">DatasetDeclaration</A></TD>
384<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
385<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if not exists" )? ( &lt;LEFTPAREN&gt; &lt;IDENTIFIER&gt; &lt;RIGHTPAREN&gt; )?</TD>
386</TR>
387<TR>
388<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod22">InternalDatasetDeclaration</A></TD>
389<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
390<TD ALIGN=LEFT VALIGN=BASELINE>"partitioned" "by" "key" &lt;IDENTIFIER&gt; ( "," &lt;IDENTIFIER&gt; )* "on" &lt;IDENTIFIER&gt; ";"</TD>
391</TR>
392<TR>
393<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod23">ExternalDatasetDeclaration</A></TD>
394<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
395<TD ALIGN=LEFT VALIGN=BASELINE>( "hdfs" ( &lt;STRING_LITERAL&gt; ) | "splits" ( &lt;IDENTIFIER&gt; ":" &lt;STRING_LITERAL&gt; ) ( "," &lt;IDENTIFIER&gt; ":" &lt;STRING_LITERAL&gt; )* ) "using" ( &lt;STRING_LITERAL&gt; &lt;LEFTPAREN&gt; ( ( &lt;LEFTPAREN&gt; ( &lt;STRING_LITERAL&gt; ":" &lt;STRING_LITERAL&gt; ) &lt;RIGHTPAREN&gt; ) ( "," &lt;LEFTPAREN&gt; ( &lt;STRING_LITERAL&gt; ":" &lt;STRING_LITERAL&gt; ) &lt;RIGHTPAREN&gt; )* )? &lt;RIGHTPAREN&gt; ) ";"</TD>
396</TR>
397<TR>
398<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod24">NodegroupDeclaration</A></TD>
399<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
400<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if not exists" )? "on" &lt;IDENTIFIER&gt; ( "," &lt;IDENTIFIER&gt; )* ";"</TD>
401</TR>
402<TR>
403<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod25">TypeDeclaration</A></TD>
404<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
405<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ( "if not exists" )? "as" ( <A HREF="#prod26">TypeExpr</A> )</TD>
406</TR>
407<TR>
408<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod26">TypeExpr</A></TD>
409<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
410<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod27">RecordTypeDef</A> | <A HREF="#prod28">TypeReference</A> | <A HREF="#prod29">OrderedListTypeDef</A> | <A HREF="#prod30">UnorderedListTypeDef</A> )</TD>
411</TR>
412<TR>
413<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod27">RecordTypeDef</A></TD>
414<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
415<TD ALIGN=LEFT VALIGN=BASELINE>( "closed" | "open" )? "{" ( <A HREF="#prod31">RecordField</A> ( "," <A HREF="#prod31">RecordField</A> )* )? "}"</TD>
416</TR>
417<TR>
418<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod31">RecordField</A></TD>
419<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
420<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; ":" ( <A HREF="#prod26">TypeExpr</A> ) ( "?" )?</TD>
421</TR>
422<TR>
423<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod28">TypeReference</A></TD>
424<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
425<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt;</TD>
426</TR>
427<TR>
428<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod29">OrderedListTypeDef</A></TD>
429<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
430<TD ALIGN=LEFT VALIGN=BASELINE>"[" ( <A HREF="#prod26">TypeExpr</A> ) "]"</TD>
431</TR>
432<TR>
433<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod30">UnorderedListTypeDef</A></TD>
434<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
435<TD ALIGN=LEFT VALIGN=BASELINE>"&lt;" ( <A HREF="#prod26">TypeExpr</A> ) "&gt;"</TD>
436</TR>
437<TR>
438<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod32">FunctionDeclaration</A></TD>
439<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
440<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IDENTIFIER&gt; &lt;LEFTPAREN&gt; ( &lt;VARIABLE&gt; ( "," &lt;VARIABLE&gt; )* )? &lt;RIGHTPAREN&gt; "{" <A HREF="#prod6">Expression</A> "}"</TD>
441</TR>
442<TR>
443<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod2">Query</A></TD>
444<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
445<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod6">Expression</A></TD>
446</TR>
447<TR>
448<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod6">Expression</A></TD>
449<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
450<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod33">OperatorExpr</A> | <A HREF="#prod34">IfThenElse</A> | <A HREF="#prod35">FLWOGR</A> | <A HREF="#prod36">QuantifiedExpression</A> )</TD>
451</TR>
452<TR>
453<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod33">OperatorExpr</A></TD>
454<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
455<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod37">AndExpr</A> ( "or" <A HREF="#prod37">AndExpr</A> )*</TD>
456</TR>
457<TR>
458<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod37">AndExpr</A></TD>
459<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
460<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod38">RelExpr</A> ( "and" <A HREF="#prod38">RelExpr</A> )*</TD>
461</TR>
462<TR>
463<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod38">RelExpr</A></TD>
464<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
465<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod39">AddExpr</A> ( ( "&lt;" | "&gt;" | "&lt;=" | "&gt;=" | "=" | "!=" | "~=" ) <A HREF="#prod39">AddExpr</A> )?</TD>
466</TR>
467<TR>
468<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod39">AddExpr</A></TD>
469<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
470<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod40">MultExpr</A> ( ( "+" | "-" ) <A HREF="#prod40">MultExpr</A> )*</TD>
471</TR>
472<TR>
473<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod40">MultExpr</A></TD>
474<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
475<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod41">UnionExpr</A> ( ( "*" | "/" | "%" | &lt;CARET&gt; | "idiv" ) <A HREF="#prod41">UnionExpr</A> )*</TD>
476</TR>
477<TR>
478<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod41">UnionExpr</A></TD>
479<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
480<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod42">UnaryExpr</A> ( "union" ( <A HREF="#prod42">UnaryExpr</A> ) )*</TD>
481</TR>
482<TR>
483<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod42">UnaryExpr</A></TD>
484<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
485<TD ALIGN=LEFT VALIGN=BASELINE>( ( "+" | "-" ) )? <A HREF="#prod43">ValueExpr</A></TD>
486</TR>
487<TR>
488<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod43">ValueExpr</A></TD>
489<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
490<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">FieldOrIndexAccessor</A></TD>
491</TR>
492<TR>
493<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod44">FieldOrIndexAccessor</A></TD>
494<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
495<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod45">PrimaryExpr</A> ) ( ( <A HREF="#prod46">Field</A> ) | ( <A HREF="#prod47">Index</A> ) )*</TD>
496</TR>
497<TR>
498<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod46">Field</A></TD>
499<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
500<TD ALIGN=LEFT VALIGN=BASELINE>"." &lt;IDENTIFIER&gt;</TD>
501</TR>
502<TR>
503<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod47">Index</A></TD>
504<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
505<TD ALIGN=LEFT VALIGN=BASELINE>"[" ( <A HREF="#prod6">Expression</A> | "?" ) "]"</TD>
506</TR>
507<TR>
508<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod45">PrimaryExpr</A></TD>
509<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
510<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod48">Literal</A> | <A HREF="#prod49">FunctionCallExpr</A> | <A HREF="#prod50">VariableRef</A> | <A HREF="#prod51">ListConstructor</A> | <A HREF="#prod52">RecordConstructor</A> | <A HREF="#prod53">ParenthesizedExpression</A> )</TD>
511</TR>
512<TR>
513<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod48">Literal</A></TD>
514<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
515<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;STRING_LITERAL&gt; | &lt;INTEGER_LITERAL&gt; | &lt;FLOAT_LITERAL&gt; | &lt;DOUBLE_LITERAL&gt; | &lt;NULL&gt; | &lt;TRUE&gt; | &lt;FALSE&gt; )</TD>
516</TR>
517<TR>
518<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod50">VariableRef</A></TD>
519<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
520<TD ALIGN=LEFT VALIGN=BASELINE>&lt;VARIABLE&gt;</TD>
521</TR>
522<TR>
523<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod5">Variable</A></TD>
524<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
525<TD ALIGN=LEFT VALIGN=BASELINE>&lt;VARIABLE&gt;</TD>
526</TR>
527<TR>
528<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod51">ListConstructor</A></TD>
529<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
530<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod54">OrderedListConstructor</A> | <A HREF="#prod55">UnorderedListConstructor</A> )</TD>
531</TR>
532<TR>
533<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod54">OrderedListConstructor</A></TD>
534<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
535<TD ALIGN=LEFT VALIGN=BASELINE>"[" ( <A HREF="#prod6">Expression</A> ( "," <A HREF="#prod6">Expression</A> )* )? "]"</TD>
536</TR>
537<TR>
538<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod55">UnorderedListConstructor</A></TD>
539<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
540<TD ALIGN=LEFT VALIGN=BASELINE>"&lt;" ( <A HREF="#prod6">Expression</A> ( "," <A HREF="#prod6">Expression</A> )* )? "&gt;"</TD>
541</TR>
542<TR>
543<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod52">RecordConstructor</A></TD>
544<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
545<TD ALIGN=LEFT VALIGN=BASELINE>"{" ( <A HREF="#prod56">FieldBinding</A> ( "," <A HREF="#prod56">FieldBinding</A> )* )? "}"</TD>
546</TR>
547<TR>
548<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod56">FieldBinding</A></TD>
549<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
550<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod6">Expression</A> ":" <A HREF="#prod6">Expression</A></TD>
551</TR>
552<TR>
553<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod49">FunctionCallExpr</A></TD>
554<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
555<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;IDENTIFIER&gt; | &lt;DATASET&gt; ) &lt;LEFTPAREN&gt; ( <A HREF="#prod6">Expression</A> ( "," <A HREF="#prod6">Expression</A> )* )? &lt;RIGHTPAREN&gt;</TD>
556</TR>
557<TR>
558<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod53">ParenthesizedExpression</A></TD>
559<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
560<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTPAREN&gt; <A HREF="#prod6">Expression</A> &lt;RIGHTPAREN&gt;</TD>
561</TR>
562<TR>
563<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod34">IfThenElse</A></TD>
564<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
565<TD ALIGN=LEFT VALIGN=BASELINE>"if" &lt;LEFTPAREN&gt; <A HREF="#prod6">Expression</A> &lt;RIGHTPAREN&gt; "then" <A HREF="#prod6">Expression</A> "else" <A HREF="#prod6">Expression</A></TD>
566</TR>
567<TR>
568<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod35">FLWOGR</A></TD>
569<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
570<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod57">ForClause</A> | <A HREF="#prod58">LetClause</A> ) ( <A HREF="#prod59">Clause</A> )* "return" <A HREF="#prod6">Expression</A></TD>
571</TR>
572<TR>
573<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod59">Clause</A></TD>
574<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
575<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod57">ForClause</A> | <A HREF="#prod58">LetClause</A> | <A HREF="#prod60">WhereClause</A> | <A HREF="#prod61">OrderbyClause</A> | <A HREF="#prod62">GroupClause</A> | <A HREF="#prod63">LimitClause</A> | <A HREF="#prod64">DistinctClause</A> )</TD>
576</TR>
577<TR>
578<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod57">ForClause</A></TD>
579<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
580<TD ALIGN=LEFT VALIGN=BASELINE>"for" <A HREF="#prod5">Variable</A> ( "at" <A HREF="#prod5">Variable</A> )? "in" ( <A HREF="#prod6">Expression</A> )</TD>
581</TR>
582<TR>
583<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod58">LetClause</A></TD>
584<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
585<TD ALIGN=LEFT VALIGN=BASELINE>"let" <A HREF="#prod5">Variable</A> ":=" <A HREF="#prod6">Expression</A></TD>
586</TR>
587<TR>
588<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod60">WhereClause</A></TD>
589<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
590<TD ALIGN=LEFT VALIGN=BASELINE>"where" <A HREF="#prod6">Expression</A></TD>
591</TR>
592<TR>
593<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod61">OrderbyClause</A></TD>
594<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
595<TD ALIGN=LEFT VALIGN=BASELINE>( "order" "by" <A HREF="#prod6">Expression</A> ( ( "asc" ) | ( "desc" ) )? ( "," <A HREF="#prod6">Expression</A> ( ( "asc" ) | ( "desc" ) )? )* )</TD>
596</TR>
597<TR>
598<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod62">GroupClause</A></TD>
599<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
600<TD ALIGN=LEFT VALIGN=BASELINE>"group" "by" ( <A HREF="#prod5">Variable</A> ":=" )? <A HREF="#prod6">Expression</A> ( "," ( <A HREF="#prod5">Variable</A> ":=" )? <A HREF="#prod6">Expression</A> )* ( "decor" <A HREF="#prod5">Variable</A> ":=" <A HREF="#prod6">Expression</A> ( "," "decor" <A HREF="#prod5">Variable</A> ":=" <A HREF="#prod6">Expression</A> )* )? "with" <A HREF="#prod50">VariableRef</A> ( "," <A HREF="#prod50">VariableRef</A> )*</TD>
601</TR>
602<TR>
603<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod63">LimitClause</A></TD>
604<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
605<TD ALIGN=LEFT VALIGN=BASELINE>"limit" <A HREF="#prod6">Expression</A> ( "offset" <A HREF="#prod6">Expression</A> )?</TD>
606</TR>
607<TR>
608<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod64">DistinctClause</A></TD>
609<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
610<TD ALIGN=LEFT VALIGN=BASELINE>"distinct" "by" <A HREF="#prod6">Expression</A> ( "," <A HREF="#prod6">Expression</A> )*</TD>
611</TR>
612<TR>
613<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod36">QuantifiedExpression</A></TD>
614<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
615<TD ALIGN=LEFT VALIGN=BASELINE>( ( "some" ) | ( "every" ) ) <A HREF="#prod5">Variable</A> "in" <A HREF="#prod6">Expression</A> ( "," <A HREF="#prod5">Variable</A> "in" <A HREF="#prod6">Expression</A> )* "satisfies" <A HREF="#prod6">Expression</A></TD>
616</TR>
617</TABLE>
618</BODY>
619</HTML>