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