KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > ejb > query > EJBQLParser


1 /* Generated By:JavaCC: Do not edit this line. EJBQLParser.java */
2 package com.versant.core.ejb.query;
3
4 public class EJBQLParser implements EJBQLParserConstants {
5
6     public static void main(String JavaDoc[] args) {
7         try {
8             EJBQLParser parser = new EJBQLParser(System.in);
9             System.out.println("Type some input and Ctrl-D to parse :");
10             Node q = parser.ejbqlQuery();
11             System.out.println("\nparser.ejbqlQuery():\n" + q);
12         } catch (Exception JavaDoc x) {
13             x.printStackTrace(System.out);
14             System.exit(1);
15         }
16     }
17
18   final public Node ejbqlQuery() throws ParseException {
19     Node q;
20     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
21     case SELECT:
22       q = selectStatement();
23       break;
24     case UPDATE:
25       q = updateStatement();
26       break;
27     case DELETE:
28       q = deleteStatement();
29       break;
30     default:
31       jj_la1[0] = jj_gen;
32       jj_consume_token(-1);
33       throw new ParseException();
34     }
35     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
36     case 0:
37       jj_consume_token(0);
38       break;
39     case SEMICOLON:
40       jj_consume_token(SEMICOLON);
41       break;
42     default:
43       jj_la1[1] = jj_gen;
44       jj_consume_token(-1);
45       throw new ParseException();
46     }
47       {if (true) return q;}
48     throw new Error JavaDoc("Missing return statement in function");
49   }
50
51   final public SelectNode selectStatement() throws ParseException {
52     boolean distinct = false;
53     Node selectList = null, fromList = null, orderBy = null, where = null;
54     Node cur, prev;
55     Node groupBy = null, having = null;
56     jj_consume_token(SELECT);
57     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
58     case DISTINCT:
59       jj_consume_token(DISTINCT);
60                             distinct = true;
61       break;
62     default:
63       jj_la1[2] = jj_gen;
64       ;
65     }
66     selectList = selectExpression();
67                                       prev = selectList;
68     label_1:
69     while (true) {
70       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
71       case COMMA:
72         ;
73         break;
74       default:
75         jj_la1[3] = jj_gen;
76         break label_1;
77       }
78       jj_consume_token(COMMA);
79       cur = selectExpression();
80                                          prev.setNext(cur); prev = cur;
81     }
82     fromList = fromClause();
83     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
84     case WHERE:
85       jj_consume_token(WHERE);
86       where = conditionalExpression();
87       break;
88     default:
89       jj_la1[4] = jj_gen;
90       ;
91     }
92     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
93     case GROUP:
94       groupBy = groupByClause();
95       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
96       case HAVING:
97         jj_consume_token(HAVING);
98         having = conditionalExpression();
99         break;
100       default:
101         jj_la1[5] = jj_gen;
102         ;
103       }
104       break;
105     default:
106       jj_la1[6] = jj_gen;
107       ;
108     }
109     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
110     case ORDER:
111       orderBy = orderByClause();
112       break;
113     default:
114       jj_la1[7] = jj_gen;
115       ;
116     }
117       {if (true) return new SelectNode(distinct, selectList, fromList, where,
118         groupBy, having, orderBy);}
119     throw new Error JavaDoc("Missing return statement in function");
120   }
121
122   final public DeleteNode deleteStatement() throws ParseException {
123     Token schemaName, id = null;
124     SetNode updateList, prev, cur;
125     Node where = null;
126     jj_consume_token(DELETE);
127     jj_consume_token(FROM);
128     schemaName = jj_consume_token(IDENTIFIER);
129     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
130     case AS:
131     case IDENTIFIER:
132       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
133       case AS:
134         jj_consume_token(AS);
135         break;
136       default:
137         jj_la1[8] = jj_gen;
138         ;
139       }
140       id = jj_consume_token(IDENTIFIER);
141       break;
142     default:
143       jj_la1[9] = jj_gen;
144       ;
145     }
146     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
147     case WHERE:
148       jj_consume_token(WHERE);
149       where = conditionalExpression();
150       break;
151     default:
152       jj_la1[10] = jj_gen;
153       ;
154     }
155       {if (true) return new DeleteNode(schemaName.image, id == null ? null : id.image,
156             where);}
157     throw new Error JavaDoc("Missing return statement in function");
158   }
159
160   final public UpdateNode updateStatement() throws ParseException {
161     Token schemaName, id = null;
162     SetNode updateList, prev, cur;
163     Node where = null;
164     jj_consume_token(UPDATE);
165     schemaName = jj_consume_token(IDENTIFIER);
166     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
167     case AS:
168     case IDENTIFIER:
169       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
170       case AS:
171         jj_consume_token(AS);
172         break;
173       default:
174         jj_la1[11] = jj_gen;
175         ;
176       }
177       id = jj_consume_token(IDENTIFIER);
178       break;
179     default:
180       jj_la1[12] = jj_gen;
181       ;
182     }
183     jj_consume_token(SET);
184     updateList = updateExpression();
185                                             prev = updateList;
186     label_2:
187     while (true) {
188       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
189       case COMMA:
190         ;
191         break;
192       default:
193         jj_la1[13] = jj_gen;
194         break label_2;
195       }
196       jj_consume_token(COMMA);
197       cur = updateExpression();
198                                          prev.setNext(cur); prev = cur;
199     }
200     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
201     case WHERE:
202       jj_consume_token(WHERE);
203       where = conditionalExpression();
204       break;
205     default:
206       jj_la1[14] = jj_gen;
207       ;
208     }
209       {if (true) return new UpdateNode(schemaName.image, id == null ? null : id.image,
210             updateList, where);}
211     throw new Error JavaDoc("Missing return statement in function");
212   }
213
214   final public SetNode updateExpression() throws ParseException {
215     Token id = null, field;
216     Node value;
217     if (jj_2_1(2)) {
218       id = jj_consume_token(IDENTIFIER);
219       jj_consume_token(DOT);
220     } else {
221       ;
222     }
223     field = jj_consume_token(IDENTIFIER);
224     jj_consume_token(EQ);
225     value = expression();
226       {if (true) return new SetNode(id == null ? null : id.image, field.image, value);}
227     throw new Error JavaDoc("Missing return statement in function");
228   }
229
230   final public Node fromClause() throws ParseException {
231     Node fromList = null, cur, prev;
232     jj_consume_token(FROM);
233     fromList = identificationVarDeclaration();
234                                                 prev = fromList;
235     label_3:
236     while (true) {
237       if (jj_2_2(2)) {
238         ;
239       } else {
240         break label_3;
241       }
242       jj_consume_token(COMMA);
243       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
244       case IDENTIFIER:
245         cur = identificationVarDeclaration();
246         break;
247       case IN:
248         cur = collectionMemberDeclaration();
249         break;
250       default:
251         jj_la1[15] = jj_gen;
252         jj_consume_token(-1);
253         throw new ParseException();
254       }
255             prev.setNext(cur); prev = cur;
256     }
257       {if (true) return fromList;}
258     throw new Error JavaDoc("Missing return statement in function");
259   }
260
261   final public Node orderByClause() throws ParseException {
262     Node list = null, cur, prev;
263     jj_consume_token(ORDER);
264     jj_consume_token(BY);
265     list = pathExpression(PathNode.ORDER_BY);
266                                                prev = list;
267     label_4:
268     while (true) {
269       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
270       case COMMA:
271         ;
272         break;
273       default:
274         jj_la1[16] = jj_gen;
275         break label_4;
276       }
277       jj_consume_token(COMMA);
278       cur = pathExpression(PathNode.ORDER_BY);
279                                                         prev.setNext(cur); prev = cur;
280     }
281       {if (true) return list;}
282     throw new Error JavaDoc("Missing return statement in function");
283   }
284
285   final public Node groupByClause() throws ParseException {
286     Node list = null, cur, prev;
287     jj_consume_token(GROUP);
288     jj_consume_token(BY);
289     list = pathExpression(PathNode.GROUP_BY);
290                                                prev = list;
291     label_5:
292     while (true) {
293       if (jj_2_3(2)) {
294         ;
295       } else {
296         break label_5;
297       }
298       jj_consume_token(COMMA);
299       cur = pathExpression(PathNode.GROUP_BY);
300                                                                      prev.setNext(cur); prev = cur;
301     }
302       {if (true) return list;}
303     throw new Error JavaDoc("Missing return statement in function");
304   }
305
306   final public Node selectExpression() throws ParseException {
307     Node e;
308     Token t;
309     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
310     case IDENTIFIER:
311       e = pathExpression(PathNode.SELECT);
312       break;
313     case OBJECT:
314       jj_consume_token(OBJECT);
315       jj_consume_token(LPAREN);
316       t = jj_consume_token(IDENTIFIER);
317       jj_consume_token(RPAREN);
318                                                     e = new ObjectNode(t.image);
319       break;
320     case AVG:
321     case MAX:
322     case MIN:
323     case SUM:
324     case COUNT:
325       e = aggregateSelectExpression();
326       break;
327     case NEW:
328       e = constructorExpression();
329       break;
330     default:
331       jj_la1[17] = jj_gen;
332       jj_consume_token(-1);
333       throw new ParseException();
334     }
335       {if (true) return e;}
336     throw new Error JavaDoc("Missing return statement in function");
337   }
338
339   final public PathNode pathExpression(int parentType) throws ParseException {
340     PathNode e = new PathNode(parentType);
341     Token t;
342     t = jj_consume_token(IDENTIFIER);
343                        e.add(t.image);
344     label_6:
345     while (true) {
346       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
347       case DOT:
348         ;
349         break;
350       default:
351         jj_la1[18] = jj_gen;
352         break label_6;
353       }
354       jj_consume_token(DOT);
355       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
356       case IDENTIFIER:
357         t = jj_consume_token(IDENTIFIER);
358         break;
359       case SELECT:
360       case FROM:
361       case DISTINCT:
362       case OBJECT:
363       case LEFT:
364       case OUTER:
365       case INNER:
366       case JOIN:
367       case FETCH:
368       case IN:
369       case AS:
370       case UPDATE:
371       case SET:
372       case DELETE:
373       case NEW:
374       case AVG:
375       case MAX:
376       case MIN:
377       case SUM:
378       case COUNT:
379       case WHERE:
380       case GROUP:
381       case BY:
382       case HAVING:
383       case OR:
384       case AND:
385       case NOT:
386       case BETWEEN:
387       case LIKE:
388       case ESCAPE:
389       case IS:
390       case EMPTY:
391       case MEMBER:
392       case OF:
393       case EXISTS:
394       case ALL:
395       case ANY:
396       case SOME:
397       case CONCAT:
398       case SUBSTRING:
399       case TRIM:
400       case LOWER:
401       case UPPER:
402       case LEADING:
403       case TRAILING:
404       case BOTH:
405       case LENGTH:
406       case LOCATE:
407       case ABS:
408       case SQRT:
409       case MOD:
410       case BIT_LENGTH:
411       case CURRENT_DATE:
412       case CURRENT_TIME:
413       case CURRENT_TIMESTAMP:
414       case ORDER:
415       case ASC:
416       case DESC:
417         t = reservedWord();
418         break;
419       default:
420         jj_la1[19] = jj_gen;
421         jj_consume_token(-1);
422         throw new ParseException();
423       }
424                                                         e.add(t.image);
425     }
426       {if (true) return e;}
427     throw new Error JavaDoc("Missing return statement in function");
428   }
429
430   final public AggregateNode aggregateSelectExpression() throws ParseException {
431     int op;
432     boolean distinct = false;
433     PathNode path;
434     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
435     case AVG:
436       jj_consume_token(AVG);
437                   op = AggregateNode.AVG;
438       break;
439     case MAX:
440       jj_consume_token(MAX);
441                   op = AggregateNode.MAX;
442       break;
443     case MIN:
444       jj_consume_token(MIN);
445                   op = AggregateNode.MIN;
446       break;
447     case SUM:
448       jj_consume_token(SUM);
449                   op = AggregateNode.SUM;
450       break;
451     case COUNT:
452       jj_consume_token(COUNT);
453                   op = AggregateNode.COUNT;
454       break;
455     default:
456       jj_la1[20] = jj_gen;
457       jj_consume_token(-1);
458       throw new ParseException();
459     }
460     jj_consume_token(LPAREN);
461     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
462     case DISTINCT:
463       jj_consume_token(DISTINCT);
464                    distinct = true;
465       break;
466     default:
467       jj_la1[21] = jj_gen;
468       ;
469     }
470     path = pathExpression(PathNode.AGGREGATE);
471     jj_consume_token(RPAREN);
472       {if (true) return new AggregateNode(op, distinct, path);}
473     throw new Error JavaDoc("Missing return statement in function");
474   }
475
476   final public ConstructorNode constructorExpression() throws ParseException {
477     Token t;
478     ConstructorNode e;
479     Node cur, prev;
480     jj_consume_token(NEW);
481     t = jj_consume_token(IDENTIFIER);
482     jj_consume_token(LPAREN);
483     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
484     case IDENTIFIER:
485       prev = pathExpression(PathNode.CONSTRUCTOR);
486       break;
487     case AVG:
488     case MAX:
489     case MIN:
490     case SUM:
491     case COUNT:
492       prev = aggregateSelectExpression();
493       break;
494     default:
495       jj_la1[22] = jj_gen;
496       jj_consume_token(-1);
497       throw new ParseException();
498     }
499         e = new ConstructorNode(t.image, prev);
500     label_7:
501     while (true) {
502       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
503       case COMMA:
504         ;
505         break;
506       default:
507         jj_la1[23] = jj_gen;
508         break label_7;
509       }
510       jj_consume_token(COMMA);
511       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
512       case IDENTIFIER:
513         cur = pathExpression(PathNode.CONSTRUCTOR);
514         break;
515       case AVG:
516       case MAX:
517       case MIN:
518       case SUM:
519       case COUNT:
520         cur = aggregateSelectExpression();
521         break;
522       default:
523         jj_la1[24] = jj_gen;
524         jj_consume_token(-1);
525         throw new ParseException();
526       }
527             prev.setNext(cur); prev = cur;
528     }
529     jj_consume_token(RPAREN);
530       {if (true) return e;}
531     throw new Error JavaDoc("Missing return statement in function");
532   }
533
534   final public IdentificationVarNode identificationVarDeclaration() throws ParseException {
535     Token t, t2;
536     JoinNode list = null, prev = null, cur;
537     t = jj_consume_token(IDENTIFIER);
538     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
539     case AS:
540       jj_consume_token(AS);
541       break;
542     default:
543       jj_la1[25] = jj_gen;
544       ;
545     }
546     t2 = jj_consume_token(IDENTIFIER);
547     label_8:
548     while (true) {
549       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
550       case LEFT:
551       case INNER:
552       case JOIN:
553         ;
554         break;
555       default:
556         jj_la1[26] = jj_gen;
557         break label_8;
558       }
559       cur = join();
560         if (list == null) { list = prev = cur; }
561         else { prev.setNext(cur); prev = cur; }
562     }
563       {if (true) return new IdentificationVarNode(t.image, t2.image, list);}
564     throw new Error JavaDoc("Missing return statement in function");
565   }
566
567   final public JoinNode join() throws ParseException {
568     boolean outer = false;
569     PathNode path;
570     Token t = null;
571     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
572     case LEFT:
573     case INNER:
574       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
575       case LEFT:
576         jj_consume_token(LEFT);
577         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
578         case OUTER:
579           jj_consume_token(OUTER);
580           break;
581         default:
582           jj_la1[27] = jj_gen;
583           ;
584         }
585                              outer = true;
586         break;
587       case INNER:
588         jj_consume_token(INNER);
589         break;
590       default:
591         jj_la1[28] = jj_gen;
592         jj_consume_token(-1);
593         throw new ParseException();
594       }
595       break;
596     default:
597       jj_la1[29] = jj_gen;
598       ;
599     }
600     jj_consume_token(JOIN);
601     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
602     case FETCH:
603       jj_consume_token(FETCH);
604       path = pathExpression(PathNode.JOIN);
605       break;
606     case IDENTIFIER:
607       path = pathExpression(PathNode.JOIN);
608       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
609       case AS:
610         jj_consume_token(AS);
611         break;
612       default:
613         jj_la1[30] = jj_gen;
614         ;
615       }
616       t = jj_consume_token(IDENTIFIER);
617       break;
618     default:
619       jj_la1[31] = jj_gen;
620       jj_consume_token(-1);
621       throw new ParseException();
622     }
623       {if (true) return new JoinNode(outer, t == null, path, t == null ? null : t.image);}
624     throw new Error JavaDoc("Missing return statement in function");
625   }
626
627   final public CollectionMemberNode collectionMemberDeclaration() throws ParseException {
628     PathNode path;
629     Token t;
630     jj_consume_token(IN);
631     jj_consume_token(LPAREN);
632     path = pathExpression(PathNode.COLLECTION_MEMBER);
633     jj_consume_token(RPAREN);
634     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
635     case AS:
636       jj_consume_token(AS);
637       break;
638     default:
639       jj_la1[32] = jj_gen;
640       ;
641     }
642     t = jj_consume_token(IDENTIFIER);
643       {if (true) return new CollectionMemberNode(path, t.image);}
644     throw new Error JavaDoc("Missing return statement in function");
645   }
646
647   final public Node conditionalExpression() throws ParseException {
648     Node e, e2;
649     e = conditionalTerm();
650     if (jj_2_4(2)) {
651       jj_consume_token(OR);
652       e2 = conditionalExpression();
653                                                        e.setNext(e2); e = new OrNode(e);
654     } else {
655       ;
656     }
657       {if (true) return e;}
658     throw new Error JavaDoc("Missing return statement in function");
659   }
660
661   final public Node conditionalTerm() throws ParseException {
662     Node e, e2;
663     e = conditionalFactor();
664     if (jj_2_5(2)) {
665       jj_consume_token(AND);
666       e2 = conditionalTerm();
667                                                   e.setNext(e2); e = new AndNode(e);
668     } else {
669       ;
670     }
671       {if (true) return e;}
672     throw new Error JavaDoc("Missing return statement in function");
673   }
674
675   final public Node conditionalFactor() throws ParseException {
676     Node e;
677     boolean not = false;
678     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
679     case NOT:
680       jj_consume_token(NOT);
681               not = true;
682       break;
683     default:
684       jj_la1[33] = jj_gen;
685       ;
686     }
687     if (jj_2_6(2)) {
688       e = simpleCondExpression();
689     } else {
690       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
691       case LPAREN:
692         jj_consume_token(LPAREN);
693         e = conditionalExpression();
694         jj_consume_token(RPAREN);
695                                                         e = new ParenNode(e);
696         break;
697       default:
698         jj_la1[34] = jj_gen;
699         jj_consume_token(-1);
700         throw new ParseException();
701       }
702     }
703       {if (true) return not ? new NotNode(e) : e;}
704     throw new Error JavaDoc("Missing return statement in function");
705   }
706
707   final public Node simpleCondExpression() throws ParseException {
708     Node left, e;
709     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
710     case LPAREN:
711     case QUESTION:
712     case COLON:
713     case CONCAT:
714     case SUBSTRING:
715     case TRIM:
716     case LOWER:
717     case UPPER:
718     case LENGTH:
719     case LOCATE:
720     case ABS:
721     case SQRT:
722     case MOD:
723     case BIT_LENGTH:
724     case CURRENT_DATE:
725     case CURRENT_TIME:
726     case CURRENT_TIMESTAMP:
727     case DECIMAL_LITERAL:
728     case HEX_LITERAL:
729     case FLOATING_POINT_LITERAL:
730     case CHARACTER_LITERAL:
731     case BOOLEAN_LITERAL:
732     case STRING_LITERAL:
733     case IDENTIFIER:
734     case 93:
735     case 94:
736       left = expression();
737       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
738       case EQ:
739       case LT:
740       case LE:
741       case GT:
742       case GE:
743       case NE:
744         e = compExpression(left);
745         break;
746       default:
747         jj_la1[35] = jj_gen;
748         if (jj_2_7(2)) {
749           e = betweenExpression(left);
750         } else if (jj_2_8(2)) {
751           e = likeExpression(left);
752         } else if (jj_2_9(2)) {
753           e = inExpression(left);
754         } else {
755           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
756           case MEMBER:
757             e = memberCompExpression(left);
758             break;
759           default:
760             jj_la1[36] = jj_gen;
761             if (jj_2_10(3)) {
762               e = emptyCompExpression(left);
763             } else {
764               switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
765               case IS:
766                 e = nullCompExpression(left);
767                 break;
768               default:
769                 jj_la1[37] = jj_gen;
770                 jj_consume_token(-1);
771                 throw new ParseException();
772               }
773             }
774           }
775         }
776       }
777       break;
778     case EXISTS:
779       e = existsExpression();
780       break;
781     default:
782       jj_la1[38] = jj_gen;
783       jj_consume_token(-1);
784       throw new ParseException();
785     }
786       {if (true) return e;}
787     throw new Error JavaDoc("Missing return statement in function");
788   }
789
790   final public Node betweenExpression(Node arg) throws ParseException {
791     Node from, to;
792     boolean not = false;
793     jj_consume_token(BETWEEN);
794     from = expression();
795     jj_consume_token(AND);
796     to = expression();
797       {if (true) return new BetweenNode(arg, not, from, to);}
798     throw new Error JavaDoc("Missing return statement in function");
799   }
800
801   final public Node inExpression(Node path) throws ParseException {
802     boolean not = false;
803     Node list;
804     jj_consume_token(IN);
805     jj_consume_token(LPAREN);
806     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
807     case SELECT:
808       list = subquery();
809       break;
810     case QUESTION:
811     case COLON:
812     case DECIMAL_LITERAL:
813     case HEX_LITERAL:
814     case FLOATING_POINT_LITERAL:
815     case CHARACTER_LITERAL:
816     case BOOLEAN_LITERAL:
817     case STRING_LITERAL:
818       list = inList();
819       break;
820     default:
821       jj_la1[39] = jj_gen;
822       jj_consume_token(-1);
823       throw new ParseException();
824     }
825     jj_consume_token(RPAREN);
826       {if (true) return new InNode(path, not, list);}
827     throw new Error JavaDoc("Missing return statement in function");
828   }
829
830   final public Node inList() throws ParseException {
831     Node list = null, prev = null, cur;
832     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
833     case DECIMAL_LITERAL:
834     case HEX_LITERAL:
835     case FLOATING_POINT_LITERAL:
836     case CHARACTER_LITERAL:
837     case BOOLEAN_LITERAL:
838     case STRING_LITERAL:
839       cur = literal();
840       break;
841     case QUESTION:
842     case COLON:
843       cur = inputParameter();
844       break;
845     default:
846       jj_la1[40] = jj_gen;
847       jj_consume_token(-1);
848       throw new ParseException();
849     }
850           list = prev = cur;
851     label_9:
852     while (true) {
853       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
854       case COMMA:
855         ;
856         break;
857       default:
858         jj_la1[41] = jj_gen;
859         break label_9;
860       }
861       jj_consume_token(COMMA);
862       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
863       case DECIMAL_LITERAL:
864       case HEX_LITERAL:
865       case FLOATING_POINT_LITERAL:
866       case CHARACTER_LITERAL:
867       case BOOLEAN_LITERAL:
868       case STRING_LITERAL:
869         cur = literal();
870         break;
871       case QUESTION:
872       case COLON:
873         cur = inputParameter();
874         break;
875       default:
876         jj_la1[42] = jj_gen;
877         jj_consume_token(-1);
878         throw new ParseException();
879       }
880           prev.setNext(cur); prev = cur;
881     }
882       {if (true) return list;}
883     throw new Error JavaDoc("Missing return statement in function");
884   }
885
886   final public LiteralNode literal() throws ParseException {
887     LiteralNode e;
888     Token t;
889     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
890     case DECIMAL_LITERAL:
891       t = jj_consume_token(DECIMAL_LITERAL);
892                               e = new LiteralNode(LiteralNode.LONG, t.image);
893       break;
894     case HEX_LITERAL:
895       t = jj_consume_token(HEX_LITERAL);
896                           e = new LiteralNode(LiteralNode.LONG, t.image);
897       break;
898     case FLOATING_POINT_LITERAL:
899       t = jj_consume_token(FLOATING_POINT_LITERAL);
900                                      e = new LiteralNode(LiteralNode.DOUBLE, t.image);
901       break;
902     case CHARACTER_LITERAL:
903       t = jj_consume_token(CHARACTER_LITERAL);
904                                 e = new LiteralNode(LiteralNode.STRING, t.image);
905       break;
906     case STRING_LITERAL:
907       t = jj_consume_token(STRING_LITERAL);
908                              e = new LiteralNode(LiteralNode.STRING, t.image);
909       break;
910     case BOOLEAN_LITERAL:
911       t = jj_consume_token(BOOLEAN_LITERAL);
912                               e = new LiteralNode(LiteralNode.BOOLEAN, t.image);
913       break;
914     default:
915       jj_la1[43] = jj_gen;
916       jj_consume_token(-1);
917       throw new ParseException();
918     }
919       {if (true) return e;}
920     throw new Error JavaDoc("Missing return statement in function");
921   }
922
923   final public ParameterNode inputParameter() throws ParseException {
924     Token t;
925     boolean positional = false;
926     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
927     case QUESTION:
928       jj_consume_token(QUESTION);
929       t = jj_consume_token(DECIMAL_LITERAL);
930                                          positional = true;
931       break;
932     case COLON:
933       jj_consume_token(COLON);
934       t = jj_consume_token(IDENTIFIER);
935       break;
936     default:
937       jj_la1[44] = jj_gen;
938       jj_consume_token(-1);
939       throw new ParseException();
940     }
941       {if (true) return new ParameterNode(positional, t.image);}
942     throw new Error JavaDoc("Missing return statement in function");
943   }
944
945   final public LikeNode likeExpression(Node path) throws ParseException {
946     boolean not = false;
947     Node pattern, escape = null;
948     jj_consume_token(LIKE);
949     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
950     case DECIMAL_LITERAL:
951     case HEX_LITERAL:
952     case FLOATING_POINT_LITERAL:
953     case CHARACTER_LITERAL:
954     case BOOLEAN_LITERAL:
955     case STRING_LITERAL:
956       pattern = literal();
957       break;
958     case QUESTION:
959     case COLON:
960       pattern = inputParameter();
961       break;
962     default:
963       jj_la1[45] = jj_gen;
964       jj_consume_token(-1);
965       throw new ParseException();
966     }
967     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
968     case ESCAPE:
969       jj_consume_token(ESCAPE);
970       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
971       case DECIMAL_LITERAL:
972       case HEX_LITERAL:
973       case FLOATING_POINT_LITERAL:
974       case CHARACTER_LITERAL:
975       case BOOLEAN_LITERAL:
976       case STRING_LITERAL:
977         escape = literal();
978         break;
979       case QUESTION:
980       case COLON:
981         escape = inputParameter();
982         break;
983       default:
984         jj_la1[46] = jj_gen;
985         jj_consume_token(-1);
986         throw new ParseException();
987       }
988       break;
989     default:
990       jj_la1[47] = jj_gen;
991       ;
992     }
993       {if (true) return new LikeNode(path, not, pattern, escape);}
994     throw new Error JavaDoc("Missing return statement in function");
995   }
996
997   final public NullCompNode nullCompExpression(Node arg) throws ParseException {
998     boolean not = false;
999     jj_consume_token(IS);
1000    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1001    case NOT:
1002      jj_consume_token(NOT);
1003                   not = true;
1004      break;
1005    default:
1006      jj_la1[48] = jj_gen;
1007      ;
1008    }
1009    jj_consume_token(NULL);
1010      {if (true) return new NullCompNode(arg, not);}
1011    throw new Error JavaDoc("Missing return statement in function");
1012  }
1013
1014  final public EmptyCompNode emptyCompExpression(Node path) throws ParseException {
1015    boolean not = false;
1016    jj_consume_token(IS);
1017    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1018    case NOT:
1019      jj_consume_token(NOT);
1020                   not = true;
1021      break;
1022    default:
1023      jj_la1[49] = jj_gen;
1024      ;
1025    }
1026    jj_consume_token(EMPTY);
1027      {if (true) return new EmptyCompNode(path, not);}
1028    throw new Error JavaDoc("Missing return statement in function");
1029  }
1030
1031  final public MemberCompNode memberCompExpression(Node arg) throws ParseException {
1032    boolean not = false;
1033    PathNode path;
1034    jj_consume_token(MEMBER);
1035    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1036    case OF:
1037      jj_consume_token(OF);
1038      break;
1039    default:
1040      jj_la1[50] = jj_gen;
1041      ;
1042    }
1043    path = pathExpression(PathNode.WHERE);
1044      {if (true) return new MemberCompNode(arg, not, path);}
1045    throw new Error JavaDoc("Missing return statement in function");
1046  }
1047
1048  final public ExistsNode existsExpression() throws ParseException {
1049    boolean not = false;
1050    SelectNode sub;
1051    jj_consume_token(EXISTS);
1052    jj_consume_token(LPAREN);
1053    sub = subquery();
1054    jj_consume_token(RPAREN);
1055      {if (true) return new ExistsNode(not, sub);}
1056    throw new Error JavaDoc("Missing return statement in function");
1057  }
1058
1059  final public SelectNode subquery() throws ParseException {
1060    boolean distinct = false;
1061    Node selectList = null, fromList = null, where = null, groupBy = null;
1062    Node having = null;
1063    jj_consume_token(SELECT);
1064    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1065    case DISTINCT:
1066      jj_consume_token(DISTINCT);
1067                            distinct = true;
1068      break;
1069    default:
1070      jj_la1[51] = jj_gen;
1071      ;
1072    }
1073    selectList = selectExpression();
1074    fromList = fromClause();
1075    if (jj_2_11(2)) {
1076      jj_consume_token(WHERE);
1077      where = conditionalExpression();
1078    } else {
1079      ;
1080    }
1081    if (jj_2_12(2)) {
1082      groupBy = groupByClause();
1083      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1084      case HAVING:
1085        jj_consume_token(HAVING);
1086        having = conditionalExpression();
1087        break;
1088      default:
1089        jj_la1[52] = jj_gen;
1090        ;
1091      }
1092    } else {
1093      ;
1094    }
1095      {if (true) return new SelectNode(distinct, selectList, fromList, where,
1096        groupBy, having, null);}
1097    throw new Error JavaDoc("Missing return statement in function");
1098  }
1099
1100  final public AllOrAnyNode allOrAnyExpression() throws ParseException {
1101    boolean all = false;
1102    SelectNode sub;
1103    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1104    case ALL:
1105      jj_consume_token(ALL);
1106              all = true;
1107      break;
1108    case ANY:
1109      jj_consume_token(ANY);
1110      break;
1111    case SOME:
1112      jj_consume_token(SOME);
1113      break;
1114    default:
1115      jj_la1[53] = jj_gen;
1116      jj_consume_token(-1);
1117      throw new ParseException();
1118    }
1119    jj_consume_token(LPAREN);
1120    sub = subquery();
1121    jj_consume_token(RPAREN);
1122      {if (true) return new AllOrAnyNode(all, sub);}
1123    throw new Error JavaDoc("Missing return statement in function");
1124  }
1125
1126  final public Node compExpression(Node left) throws ParseException {
1127    Node right;
1128    int op;
1129    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1130    case EQ:
1131      jj_consume_token(EQ);
1132             op = CompNode.EQ;
1133      break;
1134    case LT:
1135      jj_consume_token(LT);
1136             op = CompNode.LT;
1137      break;
1138    case LE:
1139      jj_consume_token(LE);
1140             op = CompNode.LE;
1141      break;
1142    case GT:
1143      jj_consume_token(GT);
1144             op = CompNode.GT;
1145      break;
1146    case GE:
1147      jj_consume_token(GE);
1148             op = CompNode.GE;
1149      break;
1150    case NE:
1151      jj_consume_token(NE);
1152             op = CompNode.NE;
1153      break;
1154    default:
1155      jj_la1[54] = jj_gen;
1156      jj_consume_token(-1);
1157      throw new ParseException();
1158    }
1159    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1160    case LPAREN:
1161    case QUESTION:
1162    case COLON:
1163    case CONCAT:
1164    case SUBSTRING:
1165    case TRIM:
1166    case LOWER:
1167    case UPPER:
1168    case LENGTH:
1169    case LOCATE:
1170    case ABS:
1171    case SQRT:
1172    case MOD:
1173    case BIT_LENGTH:
1174    case CURRENT_DATE:
1175    case CURRENT_TIME:
1176    case CURRENT_TIMESTAMP:
1177    case DECIMAL_LITERAL:
1178    case HEX_LITERAL:
1179    case FLOATING_POINT_LITERAL:
1180    case CHARACTER_LITERAL:
1181    case BOOLEAN_LITERAL:
1182    case STRING_LITERAL:
1183    case IDENTIFIER:
1184    case 93:
1185    case 94:
1186      right = expression();
1187      break;
1188    case ALL:
1189    case ANY:
1190    case SOME:
1191      right = allOrAnyExpression();
1192      break;
1193    default:
1194      jj_la1[55] = jj_gen;
1195      jj_consume_token(-1);
1196      throw new ParseException();
1197    }
1198      {if (true) return new CompNode(left, op, right);}
1199    throw new Error JavaDoc("Missing return statement in function");
1200  }
1201
1202  final public Node expression() throws ParseException {
1203    Node left, right;
1204    int op;
1205    left = term();
1206    if (jj_2_13(2)) {
1207      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1208      case 93:
1209        jj_consume_token(93);
1210                           op = AddNode.ADD;
1211        break;
1212      case 94:
1213        jj_consume_token(94);
1214              op = AddNode.SUBTRACT;
1215        break;
1216      default:
1217        jj_la1[56] = jj_gen;
1218        jj_consume_token(-1);
1219        throw new ParseException();
1220      }
1221      right = expression();
1222                                left = new AddNode(left, op, right);
1223    } else {
1224      ;
1225    }
1226      {if (true) return left;}
1227    throw new Error JavaDoc("Missing return statement in function");
1228  }
1229
1230  final public Node term() throws ParseException {
1231    Node left, right;
1232    int op;
1233    left = factor();
1234    if (jj_2_14(2)) {
1235      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1236      case 95:
1237        jj_consume_token(95);
1238                           op = MultiplyNode.MULTIPLY;
1239        break;
1240      case 96:
1241        jj_consume_token(96);
1242              op = MultiplyNode.DIVIDE;
1243        break;
1244      default:
1245        jj_la1[57] = jj_gen;
1246        jj_consume_token(-1);
1247        throw new ParseException();
1248      }
1249      right = term();
1250                          left = new MultiplyNode(left, op, right);
1251    } else {
1252      ;
1253    }
1254      {if (true) return left;}
1255    throw new Error JavaDoc("Missing return statement in function");
1256  }
1257
1258  final public Node factor() throws ParseException {
1259    boolean neg = false;
1260    Node e;
1261    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1262    case 93:
1263    case 94:
1264      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1265      case 93:
1266        jj_consume_token(93);
1267        break;
1268      case 94:
1269        jj_consume_token(94);
1270                    neg = true;
1271        break;
1272      default:
1273        jj_la1[58] = jj_gen;
1274        jj_consume_token(-1);
1275        throw new ParseException();
1276      }
1277      break;
1278    default:
1279      jj_la1[59] = jj_gen;
1280      ;
1281    }
1282    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1283    case IDENTIFIER:
1284      e = pathExpression(PathNode.WHERE);
1285      break;
1286    case DECIMAL_LITERAL:
1287    case HEX_LITERAL:
1288    case FLOATING_POINT_LITERAL:
1289    case CHARACTER_LITERAL:
1290    case BOOLEAN_LITERAL:
1291    case STRING_LITERAL:
1292      e = literal();
1293      break;
1294    case LPAREN:
1295      jj_consume_token(LPAREN);
1296      e = subquery();
1297      jj_consume_token(RPAREN);
1298      break;
1299    case QUESTION:
1300    case COLON:
1301      e = inputParameter();
1302      break;
1303    case LENGTH:
1304    case LOCATE:
1305    case ABS:
1306    case SQRT:
1307    case MOD:
1308    case BIT_LENGTH:
1309      e = numericFunction();
1310      break;
1311    case CONCAT:
1312    case SUBSTRING:
1313    case TRIM:
1314    case LOWER:
1315    case UPPER:
1316      e = stringFunction();
1317      break;
1318    case CURRENT_DATE:
1319    case CURRENT_TIME:
1320    case CURRENT_TIMESTAMP:
1321      e = dateFunction();
1322      break;
1323    default:
1324      jj_la1[60] = jj_gen;
1325      jj_consume_token(-1);
1326      throw new ParseException();
1327    }
1328      {if (true) return neg ? new UnaryMinusNode(e) : e;}
1329    throw new Error JavaDoc("Missing return statement in function");
1330  }
1331
1332  final public StringFunctionNode stringFunction() throws ParseException {
1333    Node arg1, arg2, arg3;
1334    int trimSpec = 0;
1335    LiteralNode trimChar = null;
1336    StringFunctionNode f;
1337    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1338    case CONCAT:
1339      jj_consume_token(CONCAT);
1340      jj_consume_token(LPAREN);
1341      arg1 = expression();
1342      jj_consume_token(COMMA);
1343      arg2 = expression();
1344                                    arg1.setNext(arg2);
1345        f = new StringFunctionNode(StringFunctionNode.CONCAT, arg1);
1346      break;
1347    case SUBSTRING:
1348      jj_consume_token(SUBSTRING);
1349      jj_consume_token(LPAREN);
1350      arg1 = expression();
1351      jj_consume_token(COMMA);
1352      arg2 = expression();
1353                                    arg1.setNext(arg2);
1354      jj_consume_token(COMMA);
1355      arg3 = expression();
1356                                    arg2.setNext(arg3);
1357        f = new StringFunctionNode(StringFunctionNode.SUBSTRING, arg1);
1358      break;
1359    case LOWER:
1360      jj_consume_token(LOWER);
1361      jj_consume_token(LPAREN);
1362      arg1 = expression();
1363        f = new StringFunctionNode(StringFunctionNode.LOWER, arg1);
1364      break;
1365    case UPPER:
1366      jj_consume_token(UPPER);
1367      jj_consume_token(LPAREN);
1368      arg1 = expression();
1369        f = new StringFunctionNode(StringFunctionNode.UPPER, arg1);
1370      break;
1371    case TRIM:
1372      jj_consume_token(TRIM);
1373      jj_consume_token(LPAREN);
1374      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1375      case LEADING:
1376      case TRAILING:
1377      case BOTH:
1378        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1379        case LEADING:
1380          jj_consume_token(LEADING);
1381                      trimSpec = StringFunctionNode.TRIM_LEADING;
1382          break;
1383        case TRAILING:
1384          jj_consume_token(TRAILING);
1385                       trimSpec = StringFunctionNode.TRIM_TRAILING;
1386          break;
1387        case BOTH:
1388          jj_consume_token(BOTH);
1389                   trimSpec = StringFunctionNode.TRIM_BOTH;
1390          break;
1391        default:
1392          jj_la1[61] = jj_gen;
1393          jj_consume_token(-1);
1394          throw new ParseException();
1395        }
1396        trimChar = literal();
1397        jj_consume_token(FROM);
1398        break;
1399      default:
1400        jj_la1[62] = jj_gen;
1401        ;
1402      }
1403      arg1 = expression();
1404        f = new StringFunctionNode(trimSpec, trimChar, arg1);
1405      break;
1406    default:
1407      jj_la1[63] = jj_gen;
1408      jj_consume_token(-1);
1409      throw new ParseException();
1410    }
1411    jj_consume_token(RPAREN);
1412      {if (true) return f;}
1413    throw new Error JavaDoc("Missing return statement in function");
1414  }
1415
1416  final public NumericFunctionNode numericFunction() throws ParseException {
1417    Node arg1, arg2, arg3;
1418    NumericFunctionNode f;
1419    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1420    case LENGTH:
1421      jj_consume_token(LENGTH);
1422      jj_consume_token(LENGTH);
1423      arg1 = expression();
1424        f = new NumericFunctionNode(NumericFunctionNode.LENGTH, arg1);
1425      break;
1426    case ABS:
1427      jj_consume_token(ABS);
1428      jj_consume_token(ABS);
1429      arg1 = expression();
1430        f = new NumericFunctionNode(NumericFunctionNode.ABS, arg1);
1431      break;
1432    case SQRT:
1433      jj_consume_token(SQRT);
1434      jj_consume_token(SQRT);
1435      arg1 = expression();
1436        f = new NumericFunctionNode(NumericFunctionNode.SQRT, arg1);
1437      break;
1438    case BIT_LENGTH:
1439      jj_consume_token(BIT_LENGTH);
1440      jj_consume_token(BIT_LENGTH);
1441      arg1 = expression();
1442        f = new NumericFunctionNode(NumericFunctionNode.BIT_LENGTH, arg1);
1443      break;
1444    case MOD:
1445      jj_consume_token(MOD);
1446      jj_consume_token(MOD);
1447      arg1 = expression();
1448      jj_consume_token(COMMA);
1449      arg2 = expression();
1450                                    arg1.setNext(arg2);
1451        f = new NumericFunctionNode(NumericFunctionNode.MOD, arg1);
1452      break;
1453    case LOCATE:
1454      jj_consume_token(LOCATE);
1455      jj_consume_token(LOCATE);
1456      arg1 = expression();
1457      jj_consume_token(COMMA);
1458      arg2 = expression();
1459                                    arg1.setNext(arg2);
1460      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1461      case COMMA:
1462        jj_consume_token(COMMA);
1463        arg3 = expression();
1464                                      arg2.setNext(arg3);
1465        break;
1466      default:
1467        jj_la1[64] = jj_gen;
1468        ;
1469      }
1470        f = new NumericFunctionNode(NumericFunctionNode.LOCATE, arg1);
1471      break;
1472    default:
1473      jj_la1[65] = jj_gen;
1474      jj_consume_token(-1);
1475      throw new ParseException();
1476    }
1477    jj_consume_token(RPAREN);
1478      {if (true) return f;}
1479    throw new Error JavaDoc("Missing return statement in function");
1480  }
1481
1482  final public DateFunctionNode dateFunction() throws ParseException {
1483    int function;
1484    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1485    case CURRENT_DATE:
1486      jj_consume_token(CURRENT_DATE);
1487                       function = DateFunctionNode.CURRENT_DATE;
1488      break;
1489    case CURRENT_TIME:
1490      jj_consume_token(CURRENT_TIME);
1491                       function = DateFunctionNode.CURRENT_TIME;
1492      break;
1493    case CURRENT_TIMESTAMP:
1494      jj_consume_token(CURRENT_TIMESTAMP);
1495                            function = DateFunctionNode.CURRENT_TIMESTAMP;
1496      break;
1497    default:
1498      jj_la1[66] = jj_gen;
1499      jj_consume_token(-1);
1500      throw new ParseException();
1501    }
1502      {if (true) return new DateFunctionNode(function);}
1503    throw new Error JavaDoc("Missing return statement in function");
1504  }
1505
1506  final public Token reservedWord() throws ParseException {
1507    Token t;
1508    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1509    case SELECT:
1510      t = jj_consume_token(SELECT);
1511      break;
1512    case FROM:
1513      t = jj_consume_token(FROM);
1514      break;
1515    case DISTINCT:
1516      t = jj_consume_token(DISTINCT);
1517      break;
1518    case OBJECT:
1519      t = jj_consume_token(OBJECT);
1520      break;
1521    case LEFT:
1522      t = jj_consume_token(LEFT);
1523      break;
1524    case OUTER:
1525      t = jj_consume_token(OUTER);
1526      break;
1527    case INNER:
1528      t = jj_consume_token(INNER);
1529      break;
1530    case JOIN:
1531      t = jj_consume_token(JOIN);
1532      break;
1533    case FETCH:
1534      t = jj_consume_token(FETCH);
1535      break;
1536    case IN:
1537      t = jj_consume_token(IN);
1538      break;
1539    case AS:
1540      t = jj_consume_token(AS);
1541      break;
1542    case UPDATE:
1543      t = jj_consume_token(UPDATE);
1544      break;
1545    case SET:
1546      t = jj_consume_token(SET);
1547      break;
1548    case DELETE:
1549      t = jj_consume_token(DELETE);
1550      break;
1551    case NEW:
1552      t = jj_consume_token(NEW);
1553      break;
1554    case AVG:
1555      t = jj_consume_token(AVG);
1556      break;
1557    case MAX:
1558      t = jj_consume_token(MAX);
1559      break;
1560    case MIN:
1561      t = jj_consume_token(MIN);
1562      break;
1563    case SUM:
1564      t = jj_consume_token(SUM);
1565      break;
1566    case COUNT:
1567      t = jj_consume_token(COUNT);
1568      break;
1569    case WHERE:
1570      t = jj_consume_token(WHERE);
1571      break;
1572    case GROUP:
1573      t = jj_consume_token(GROUP);
1574      break;
1575    case BY:
1576      t = jj_consume_token(BY);
1577      break;
1578    case HAVING:
1579      t = jj_consume_token(HAVING);
1580      break;
1581    case OR:
1582      t = jj_consume_token(OR);
1583      break;
1584    case AND:
1585      t = jj_consume_token(AND);
1586      break;
1587    case NOT:
1588      t = jj_consume_token(NOT);
1589      break;
1590    case BETWEEN:
1591      t = jj_consume_token(BETWEEN);
1592      break;
1593    case LIKE:
1594      t = jj_consume_token(LIKE);
1595      break;
1596    case ESCAPE:
1597      t = jj_consume_token(ESCAPE);
1598      break;
1599    case IS:
1600      t = jj_consume_token(IS);
1601      break;
1602    case EMPTY:
1603      t = jj_consume_token(EMPTY);
1604      break;
1605    case MEMBER:
1606      t = jj_consume_token(MEMBER);
1607      break;
1608    case OF:
1609      t = jj_consume_token(OF);
1610      break;
1611    case EXISTS:
1612      t = jj_consume_token(EXISTS);
1613      break;
1614    case ALL:
1615      t = jj_consume_token(ALL);
1616      break;
1617    case ANY:
1618      t = jj_consume_token(ANY);
1619      break;
1620    case SOME:
1621      t = jj_consume_token(SOME);
1622      break;
1623    case CONCAT:
1624      t = jj_consume_token(CONCAT);
1625      break;
1626    case SUBSTRING:
1627      t = jj_consume_token(SUBSTRING);
1628      break;
1629    case TRIM:
1630      t = jj_consume_token(TRIM);
1631      break;
1632    case LOWER:
1633      t = jj_consume_token(LOWER);
1634      break;
1635    case UPPER:
1636      t = jj_consume_token(UPPER);
1637      break;
1638    case LEADING:
1639      t = jj_consume_token(LEADING);
1640      break;
1641    case TRAILING:
1642      t = jj_consume_token(TRAILING);
1643      break;
1644    case BOTH:
1645      t = jj_consume_token(BOTH);
1646      break;
1647    case LENGTH:
1648      t = jj_consume_token(LENGTH);
1649      break;
1650    case LOCATE:
1651      t = jj_consume_token(LOCATE);
1652      break;
1653    case ABS:
1654      t = jj_consume_token(ABS);
1655      break;
1656    case SQRT:
1657      t = jj_consume_token(SQRT);
1658      break;
1659    case MOD:
1660      t = jj_consume_token(MOD);
1661      break;
1662    case BIT_LENGTH:
1663      t = jj_consume_token(BIT_LENGTH);
1664      break;
1665    case CURRENT_DATE:
1666      t = jj_consume_token(CURRENT_DATE);
1667      break;
1668    case CURRENT_TIME:
1669      t = jj_consume_token(CURRENT_TIME);
1670      break;
1671    case CURRENT_TIMESTAMP:
1672      t = jj_consume_token(CURRENT_TIMESTAMP);
1673      break;
1674    case ORDER:
1675      t = jj_consume_token(ORDER);
1676      break;
1677    case ASC:
1678      t = jj_consume_token(ASC);
1679      break;
1680    case DESC:
1681      t = jj_consume_token(DESC);
1682      break;
1683    default:
1684      jj_la1[67] = jj_gen;
1685      jj_consume_token(-1);
1686      throw new ParseException();
1687    }
1688      {if (true) return t;}
1689    throw new Error JavaDoc("Missing return statement in function");
1690  }
1691
1692  final private boolean jj_2_1(int xla) {
1693    jj_la = xla; jj_lastpos = jj_scanpos = token;
1694    try { return !jj_3_1(); }
1695    catch(LookaheadSuccess ls) { return true; }
1696    finally { jj_save(0, xla); }
1697  }
1698
1699  final private boolean jj_2_2(int xla) {
1700    jj_la = xla; jj_lastpos = jj_scanpos = token;
1701    try { return !jj_3_2(); }
1702    catch(LookaheadSuccess ls) { return true; }
1703    finally { jj_save(1, xla); }
1704  }
1705
1706  final private boolean jj_2_3(int xla) {
1707    jj_la = xla; jj_lastpos = jj_scanpos = token;
1708    try { return !jj_3_3(); }
1709    catch(LookaheadSuccess ls) { return true; }
1710    finally { jj_save(2, xla); }
1711  }
1712
1713  final private boolean jj_2_4(int xla) {
1714    jj_la = xla; jj_lastpos = jj_scanpos = token;
1715    try { return !jj_3_4(); }
1716    catch(LookaheadSuccess ls) { return true; }
1717    finally { jj_save(3, xla); }
1718  }
1719
1720  final private boolean jj_2_5(int xla) {
1721    jj_la = xla; jj_lastpos = jj_scanpos = token;
1722    try { return !jj_3_5(); }
1723    catch(LookaheadSuccess ls) { return true; }
1724    finally { jj_save(4, xla); }
1725  }
1726
1727  final private boolean jj_2_6(int xla) {
1728    jj_la = xla; jj_lastpos = jj_scanpos = token;
1729    try { return !jj_3_6(); }
1730    catch(LookaheadSuccess ls) { return true; }
1731    finally { jj_save(5, xla); }
1732  }
1733
1734  final private boolean jj_2_7(int xla) {
1735    jj_la = xla; jj_lastpos = jj_scanpos = token;
1736    try { return !jj_3_7(); }
1737    catch(LookaheadSuccess ls) { return true; }
1738    finally { jj_save(6, xla); }
1739  }
1740
1741  final private boolean jj_2_8(int xla) {
1742    jj_la = xla; jj_lastpos = jj_scanpos = token;
1743    try { return !jj_3_8(); }
1744    catch(LookaheadSuccess ls) { return true; }
1745    finally { jj_save(7, xla); }
1746  }
1747
1748  final private boolean jj_2_9(int xla) {
1749    jj_la = xla; jj_lastpos = jj_scanpos = token;
1750    try { return !jj_3_9(); }
1751    catch(LookaheadSuccess ls) { return true; }
1752    finally { jj_save(8, xla); }
1753  }
1754
1755  final private boolean jj_2_10(int xla) {
1756    jj_la = xla; jj_lastpos = jj_scanpos = token;
1757    try { return !jj_3_10(); }
1758    catch(LookaheadSuccess ls) { return true; }
1759    finally { jj_save(9, xla); }
1760  }
1761
1762  final private boolean jj_2_11(int xla) {
1763    jj_la = xla; jj_lastpos = jj_scanpos = token;
1764    try { return !jj_3_11(); }
1765    catch(LookaheadSuccess ls) { return true; }
1766    finally { jj_save(10, xla); }
1767  }
1768
1769  final private boolean jj_2_12(int xla) {
1770    jj_la = xla; jj_lastpos = jj_scanpos = token;
1771    try { return !jj_3_12(); }
1772    catch(LookaheadSuccess ls) { return true; }
1773    finally { jj_save(11, xla); }
1774  }
1775
1776  final private boolean jj_2_13(int xla) {
1777    jj_la = xla; jj_lastpos = jj_scanpos = token;
1778    try { return !jj_3_13(); }
1779    catch(LookaheadSuccess ls) { return true; }
1780    finally { jj_save(12, xla); }
1781  }
1782
1783  final private boolean jj_2_14(int xla) {
1784    jj_la = xla; jj_lastpos = jj_scanpos = token;
1785    try { return !jj_3_14(); }
1786    catch(LookaheadSuccess ls) { return true; }
1787    finally { jj_save(13, xla); }
1788  }
1789
1790  final private boolean jj_3_12() {
1791    if (jj_3R_20()) return true;
1792    return false;
1793  }
1794
1795  final private boolean jj_3_11() {
1796    if (jj_scan_token(WHERE)) return true;
1797    if (jj_3R_13()) return true;
1798    return false;
1799  }
1800
1801  final private boolean jj_3R_87() {
1802    if (jj_scan_token(SELECT)) return true;
1803    return false;
1804  }
1805
1806  final private boolean jj_3R_41() {
1807    if (jj_scan_token(EXISTS)) return true;
1808    if (jj_scan_token(LPAREN)) return true;
1809    return false;
1810  }
1811
1812  final private boolean jj_3R_27() {
1813    if (jj_scan_token(IDENTIFIER)) return true;
1814    return false;
1815  }
1816
1817  final private boolean jj_3R_86() {
1818    if (jj_scan_token(CURRENT_TIMESTAMP)) return true;
1819    return false;
1820  }
1821
1822  final private boolean jj_3R_85() {
1823    if (jj_scan_token(CURRENT_TIME)) return true;
1824    return false;
1825  }
1826
1827  final private boolean jj_3R_84() {
1828    if (jj_scan_token(CURRENT_DATE)) return true;
1829    return false;
1830  }
1831
1832  final private boolean jj_3R_33() {
1833    if (jj_3R_43()) return true;
1834    return false;
1835  }
1836
1837  final private boolean jj_3R_53() {
1838    if (jj_scan_token(MEMBER)) return true;
1839    return false;
1840  }
1841
1842  final private boolean jj_3R_66() {
1843    Token xsp;
1844    xsp = jj_scanpos;
1845    if (jj_3R_84()) {
1846    jj_scanpos = xsp;
1847    if (jj_3R_85()) {
1848    jj_scanpos = xsp;
1849    if (jj_3R_86()) return true;
1850    }
1851    }
1852    return false;
1853  }
1854
1855  final private boolean jj_3R_34() {
1856    if (jj_scan_token(NOT)) return true;
1857    return false;
1858  }
1859
1860  final private boolean jj_3R_19() {
1861    if (jj_scan_token(IS)) return true;
1862    Token xsp;
1863    xsp = jj_scanpos;
1864    if (jj_3R_34()) jj_scanpos = xsp;
1865    if (jj_scan_token(EMPTY)) return true;
1866    return false;
1867  }
1868
1869  final private boolean jj_3R_78() {
1870    if (jj_scan_token(LOCATE)) return true;
1871    if (jj_scan_token(LOCATE)) return true;
1872    return false;
1873  }
1874
1875  final private boolean jj_3R_77() {
1876    if (jj_scan_token(MOD)) return true;
1877    if (jj_scan_token(MOD)) return true;
1878    return false;
1879  }
1880
1881  final private boolean jj_3R_54() {
1882    if (jj_scan_token(IS)) return true;
1883    return false;
1884  }
1885
1886  final private boolean jj_3R_32() {
1887    if (jj_3R_42()) return true;
1888    return false;
1889  }
1890
1891  final private boolean jj_3R_76() {
1892    if (jj_scan_token(BIT_LENGTH)) return true;
1893    if (jj_scan_token(BIT_LENGTH)) return true;
1894    return false;
1895  }
1896
1897  final private boolean jj_3R_75() {
1898    if (jj_scan_token(SQRT)) return true;
1899    if (jj_scan_token(SQRT)) return true;
1900    return false;
1901  }
1902
1903  final private boolean jj_3R_17() {
1904    if (jj_scan_token(LIKE)) return true;
1905    Token xsp;
1906    xsp = jj_scanpos;
1907    if (jj_3R_32()) {
1908    jj_scanpos = xsp;
1909    if (jj_3R_33()) return true;
1910    }
1911    return false;
1912  }
1913
1914  final private boolean jj_3R_74() {
1915    if (jj_scan_token(ABS)) return true;
1916    if (jj_scan_token(ABS)) return true;
1917    return false;
1918  }
1919
1920  final private boolean jj_3R_73() {
1921    if (jj_scan_token(LENGTH)) return true;
1922    if (jj_scan_token(LENGTH)) return true;
1923    return false;
1924  }
1925
1926  final private boolean jj_3R_62() {
1927    if (jj_scan_token(COLON)) return true;
1928    if (jj_scan_token(IDENTIFIER)) return true;
1929    return false;
1930  }
1931
1932  final private boolean jj_3R_64() {
1933    Token xsp;
1934    xsp = jj_scanpos;
1935    if (jj_3R_73()) {
1936    jj_scanpos = xsp;
1937    if (jj_3R_74()) {
1938    jj_scanpos = xsp;
1939    if (jj_3R_75()) {
1940    jj_scanpos = xsp;
1941    if (jj_3R_76()) {
1942    jj_scanpos = xsp;
1943    if (jj_3R_77()) {
1944    jj_scanpos = xsp;
1945    if (jj_3R_78()) return true;
1946    }
1947    }
1948    }
1949    }
1950    }
1951    return false;
1952  }
1953
1954  final private boolean jj_3R_61() {
1955    if (jj_scan_token(QUESTION)) return true;
1956    if (jj_scan_token(DECIMAL_LITERAL)) return true;
1957    return false;
1958  }
1959
1960  final private boolean jj_3R_88() {
1961    if (jj_scan_token(DOT)) return true;
1962    return false;
1963  }
1964
1965  final private boolean jj_3R_43() {
1966    Token xsp;
1967    xsp = jj_scanpos;
1968    if (jj_3R_61()) {
1969    jj_scanpos = xsp;
1970    if (jj_3R_62()) return true;
1971    }
1972    return false;
1973  }
1974
1975  final private boolean jj_3R_12() {
1976    if (jj_scan_token(IDENTIFIER)) return true;
1977    Token xsp;
1978    while (true) {
1979      xsp = jj_scanpos;
1980      if (jj_3R_88()) { jj_scanpos = xsp; break; }
1981    }
1982    return false;
1983  }
1984
1985  final private boolean jj_3R_60() {
1986    if (jj_scan_token(BOOLEAN_LITERAL)) return true;
1987    return false;
1988  }
1989
1990  final private boolean jj_3R_59() {
1991    if (jj_scan_token(STRING_LITERAL)) return true;
1992    return false;
1993  }
1994
1995  final private boolean jj_3R_58() {
1996    if (jj_scan_token(CHARACTER_LITERAL)) return true;
1997    return false;
1998  }
1999
2000  final private boolean jj_3R_57() {
2001    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
2002    return false;
2003  }
2004
2005  final private boolean jj_3R_56() {
2006    if (jj_scan_token(HEX_LITERAL)) return true;
2007    return false;
2008  }
2009
2010  final private boolean jj_3R_55() {
2011    if (jj_scan_token(DECIMAL_LITERAL)) return true;
2012    return false;
2013  }
2014
2015  final private boolean jj_3R_42() {
2016    Token xsp;
2017    xsp = jj_scanpos;
2018    if (jj_3R_55()) {
2019    jj_scanpos = xsp;
2020    if (jj_3R_56()) {
2021    jj_scanpos = xsp;
2022    if (jj_3R_57()) {
2023    jj_scanpos = xsp;
2024    if (jj_3R_58()) {
2025    jj_scanpos = xsp;
2026    if (jj_3R_59()) {
2027    jj_scanpos = xsp;
2028    if (jj_3R_60()) return true;
2029    }
2030    }
2031    }
2032    }
2033    }
2034    return false;
2035  }
2036
2037  final private boolean jj_3R_83() {
2038    if (jj_scan_token(TRIM)) return true;
2039    if (jj_scan_token(LPAREN)) return true;
2040    return false;
2041  }
2042
2043  final private boolean jj_3R_82() {
2044    if (jj_scan_token(UPPER)) return true;
2045    if (jj_scan_token(LPAREN)) return true;
2046    return false;
2047  }
2048
2049  final private boolean jj_3R_81() {
2050    if (jj_scan_token(LOWER)) return true;
2051    if (jj_scan_token(LPAREN)) return true;
2052    return false;
2053  }
2054
2055  final private boolean jj_3_3() {
2056    if (jj_scan_token(COMMA)) return true;
2057    if (jj_3R_12()) return true;
2058    return false;
2059  }
2060
2061  final private boolean jj_3R_20() {
2062    if (jj_scan_token(GROUP)) return true;
2063    if (jj_scan_token(BY)) return true;
2064    return false;
2065  }
2066
2067  final private boolean jj_3R_80() {
2068    if (jj_scan_token(SUBSTRING)) return true;
2069    if (jj_scan_token(LPAREN)) return true;
2070    return false;
2071  }
2072
2073  final private boolean jj_3R_79() {
2074    if (jj_scan_token(CONCAT)) return true;
2075    if (jj_scan_token(LPAREN)) return true;
2076    return false;
2077  }
2078
2079  final private boolean jj_3R_65() {
2080    Token xsp;
2081    xsp = jj_scanpos;
2082    if (jj_3R_79()) {
2083    jj_scanpos = xsp;
2084    if (jj_3R_80()) {
2085    jj_scanpos = xsp;
2086    if (jj_3R_81()) {
2087    jj_scanpos = xsp;
2088    if (jj_3R_82()) {
2089    jj_scanpos = xsp;
2090    if (jj_3R_83()) return true;
2091    }
2092    }
2093    }
2094    }
2095    return false;
2096  }
2097
2098  final private boolean jj_3R_18() {
2099    if (jj_scan_token(IN)) return true;
2100    if (jj_scan_token(LPAREN)) return true;
2101    return false;
2102  }
2103
2104  final private boolean jj_3R_11() {
2105    if (jj_3R_28()) return true;
2106    return false;
2107  }
2108
2109  final private boolean jj_3R_10() {
2110    if (jj_3R_27()) return true;
2111    return false;
2112  }
2113
2114  final private boolean jj_3R_16() {
2115    if (jj_scan_token(BETWEEN)) return true;
2116    if (jj_3R_23()) return true;
2117    return false;
2118  }
2119
2120  final private boolean jj_3R_51() {
2121    if (jj_3R_66()) return true;
2122    return false;
2123  }
2124
2125  final private boolean jj_3R_63() {
2126    if (jj_scan_token(94)) return true;
2127    return false;
2128  }
2129
2130  final private boolean jj_3R_50() {
2131    if (jj_3R_65()) return true;
2132    return false;
2133  }
2134
2135  final private boolean jj_3_2() {
2136    if (jj_scan_token(COMMA)) return true;
2137    Token xsp;
2138    xsp = jj_scanpos;
2139    if (jj_3R_10()) {
2140    jj_scanpos = xsp;
2141    if (jj_3R_11()) return true;
2142    }
2143    return false;
2144  }
2145
2146  final private boolean jj_3R_49() {
2147    if (jj_3R_64()) return true;
2148    return false;
2149  }
2150
2151  final private boolean jj_3R_48() {
2152    if (jj_3R_43()) return true;
2153    return false;
2154  }
2155
2156  final private boolean jj_3R_47() {
2157    if (jj_scan_token(LPAREN)) return true;
2158    if (jj_3R_87()) return true;
2159    return false;
2160  }
2161
2162  final private boolean jj_3R_24() {
2163    if (jj_scan_token(95)) return true;
2164    return false;
2165  }
2166
2167  final private boolean jj_3R_46() {
2168    if (jj_3R_42()) return true;
2169    return false;
2170  }
2171
2172  final private boolean jj_3R_45() {
2173    if (jj_3R_12()) return true;
2174    return false;
2175  }
2176
2177  final private boolean jj_3R_40() {
2178    if (jj_3R_54()) return true;
2179    return false;
2180  }
2181
2182  final private boolean jj_3R_44() {
2183    Token xsp;
2184    xsp = jj_scanpos;
2185    if (jj_scan_token(93)) {
2186    jj_scanpos = xsp;
2187    if (jj_3R_63()) return true;
2188    }
2189    return false;
2190  }
2191
2192  final private boolean jj_3_10() {
2193    if (jj_3R_19()) return true;
2194    return false;
2195  }
2196
2197  final private boolean jj_3R_31() {
2198    if (jj_3R_41()) return true;
2199    return false;
2200  }
2201
2202  final private boolean jj_3R_39() {
2203    if (jj_3R_53()) return true;
2204    return false;
2205  }
2206
2207  final private boolean jj_3R_35() {
2208    Token xsp;
2209    xsp = jj_scanpos;
2210    if (jj_3R_44()) jj_scanpos = xsp;
2211    xsp = jj_scanpos;
2212    if (jj_3R_45()) {
2213    jj_scanpos = xsp;
2214    if (jj_3R_46()) {
2215    jj_scanpos = xsp;
2216    if (jj_3R_47()) {
2217    jj_scanpos = xsp;
2218    if (jj_3R_48()) {
2219    jj_scanpos = xsp;
2220    if (jj_3R_49()) {
2221    jj_scanpos = xsp;
2222    if (jj_3R_50()) {
2223    jj_scanpos = xsp;
2224    if (jj_3R_51()) return true;
2225    }
2226    }
2227    }
2228    }
2229    }
2230    }
2231    return false;
2232  }
2233
2234  final private boolean jj_3_9() {
2235    if (jj_3R_18()) return true;
2236    return false;
2237  }
2238
2239  final private boolean jj_3_8() {
2240    if (jj_3R_17()) return true;
2241    return false;
2242  }
2243
2244  final private boolean jj_3_7() {
2245    if (jj_3R_16()) return true;
2246    return false;
2247  }
2248
2249  final private boolean jj_3_1() {
2250    if (jj_scan_token(IDENTIFIER)) return true;
2251    if (jj_scan_token(DOT)) return true;
2252    return false;
2253  }
2254
2255  final private boolean jj_3R_38() {
2256    if (jj_3R_52()) return true;
2257    return false;
2258  }
2259
2260  final private boolean jj_3R_25() {
2261    if (jj_scan_token(96)) return true;
2262    return false;
2263  }
2264
2265  final private boolean jj_3R_21() {
2266    if (jj_scan_token(93)) return true;
2267    return false;
2268  }
2269
2270  final private boolean jj_3R_30() {
2271    if (jj_3R_23()) return true;
2272    Token xsp;
2273    xsp = jj_scanpos;
2274    if (jj_3R_38()) {
2275    jj_scanpos = xsp;
2276    if (jj_3_7()) {
2277    jj_scanpos = xsp;
2278    if (jj_3_8()) {
2279    jj_scanpos = xsp;
2280    if (jj_3_9()) {
2281    jj_scanpos = xsp;
2282    if (jj_3R_39()) {
2283    jj_scanpos = xsp;
2284    if (jj_3_10()) {
2285    jj_scanpos = xsp;
2286    if (jj_3R_40()) return true;
2287    }
2288    }
2289    }
2290    }
2291    }
2292    }
2293    return false;
2294  }
2295
2296  final private boolean jj_3_14() {
2297    Token xsp;
2298    xsp = jj_scanpos;
2299    if (jj_3R_24()) {
2300    jj_scanpos = xsp;
2301    if (jj_3R_25()) return true;
2302    }
2303    if (jj_3R_26()) return true;
2304    return false;
2305  }
2306
2307  final private boolean jj_3R_15() {
2308    Token xsp;
2309    xsp = jj_scanpos;
2310    if (jj_3R_30()) {
2311    jj_scanpos = xsp;
2312    if (jj_3R_31()) return true;
2313    }
2314    return false;
2315  }
2316
2317  final private boolean jj_3R_26() {
2318    if (jj_3R_35()) return true;
2319    Token xsp;
2320    xsp = jj_scanpos;
2321    if (jj_3_14()) jj_scanpos = xsp;
2322    return false;
2323  }
2324
2325  final private boolean jj_3R_37() {
2326    if (jj_scan_token(LPAREN)) return true;
2327    return false;
2328  }
2329
2330  final private boolean jj_3R_22() {
2331    if (jj_scan_token(94)) return true;
2332    return false;
2333  }
2334
2335  final private boolean jj_3_6() {
2336    if (jj_3R_15()) return true;
2337    return false;
2338  }
2339
2340  final private boolean jj_3R_36() {
2341    if (jj_scan_token(NOT)) return true;
2342    return false;
2343  }
2344
2345  final private boolean jj_3_13() {
2346    Token xsp;
2347    xsp = jj_scanpos;
2348    if (jj_3R_21()) {
2349    jj_scanpos = xsp;
2350    if (jj_3R_22()) return true;
2351    }
2352    if (jj_3R_23()) return true;
2353    return false;
2354  }
2355
2356  final private boolean jj_3R_29() {
2357    Token xsp;
2358    xsp = jj_scanpos;
2359    if (jj_3R_36()) jj_scanpos = xsp;
2360    xsp = jj_scanpos;
2361    if (jj_3_6()) {
2362    jj_scanpos = xsp;
2363    if (jj_3R_37()) return true;
2364    }
2365    return false;
2366  }
2367
2368  final private boolean jj_3R_23() {
2369    if (jj_3R_26()) return true;
2370    Token xsp;
2371    xsp = jj_scanpos;
2372    if (jj_3_13()) jj_scanpos = xsp;
2373    return false;
2374  }
2375
2376  final private boolean jj_3_5() {
2377    if (jj_scan_token(AND)) return true;
2378    if (jj_3R_14()) return true;
2379    return false;
2380  }
2381
2382  final private boolean jj_3R_14() {
2383    if (jj_3R_29()) return true;
2384    return false;
2385  }
2386
2387  final private boolean jj_3R_72() {
2388    if (jj_scan_token(NE)) return true;
2389    return false;
2390  }
2391
2392  final private boolean jj_3R_71() {
2393    if (jj_scan_token(GE)) return true;
2394    return false;
2395  }
2396
2397  final private boolean jj_3R_70() {
2398    if (jj_scan_token(GT)) return true;
2399    return false;
2400  }
2401
2402  final private boolean jj_3R_69() {
2403    if (jj_scan_token(LE)) return true;
2404    return false;
2405  }
2406
2407  final private boolean jj_3R_68() {
2408    if (jj_scan_token(LT)) return true;
2409    return false;
2410  }
2411
2412  final private boolean jj_3_4() {
2413    if (jj_scan_token(OR)) return true;
2414    if (jj_3R_13()) return true;
2415    return false;
2416  }
2417
2418  final private boolean jj_3R_67() {
2419    if (jj_scan_token(EQ)) return true;
2420    return false;
2421  }
2422
2423  final private boolean jj_3R_13() {
2424    if (jj_3R_14()) return true;
2425    return false;
2426  }
2427
2428  final private boolean jj_3R_52() {
2429    Token xsp;
2430    xsp = jj_scanpos;
2431    if (jj_3R_67()) {
2432    jj_scanpos = xsp;
2433    if (jj_3R_68()) {
2434    jj_scanpos = xsp;
2435    if (jj_3R_69()) {
2436    jj_scanpos = xsp;
2437    if (jj_3R_70()) {
2438    jj_scanpos = xsp;
2439    if (jj_3R_71()) {
2440    jj_scanpos = xsp;
2441    if (jj_3R_72()) return true;
2442    }
2443    }
2444    }
2445    }
2446    }
2447    return false;
2448  }
2449
2450  final private boolean jj_3R_28() {
2451    if (jj_scan_token(IN)) return true;
2452    return false;
2453  }
2454
2455  public EJBQLParserTokenManager token_source;
2456  JavaCharStream jj_input_stream;
2457  public Token token, jj_nt;
2458  private int jj_ntk;
2459  private Token jj_scanpos, jj_lastpos;
2460  private int jj_la;
2461  public boolean lookingAhead = false;
2462  private boolean jj_semLA;
2463  private int jj_gen;
2464  final private int[] jj_la1 = new int[68];
2465  static private int[] jj_la1_0;
2466  static private int[] jj_la1_1;
2467  static private int[] jj_la1_2;
2468  static private int[] jj_la1_3;
2469  static {
2470      jj_la1_0();
2471      jj_la1_1();
2472      jj_la1_2();
2473      jj_la1_3();
2474   }
2475   private static void jj_la1_0() {
2476      jj_la1_0 = new int[] {0x800000,0x1001,0x2000000,0x2000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000,0x0,0x0,0x2000,0x4000000,0x4000,0xff800000,0x0,0x2000000,0x0,0x2000,0x0,0x0,0x68000000,0x10000000,0x28000000,0x28000000,0x0,0x80000000,0x0,0x0,0x40,0x7e0000,0x0,0x0,0x18040,0x818000,0x18000,0x2000,0x18000,0x0,0x18000,0x18000,0x18000,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x7e0000,0x18040,0x0,0x0,0x0,0x0,0x18040,0x0,0x0,0x0,0x2000,0x0,0x0,0xff800000,};
2477   }
2478   private static void jj_la1_1() {
2479      jj_la1_1 = new int[] {0x14,0x0,0x0,0x0,0x800,0x4000,0x1000,0x0,0x2,0x2,0x800,0x2,0x2,0x0,0x800,0x1,0x0,0x7e0,0x0,0xffffffff,0x7c0,0x0,0x7c0,0x0,0x7c0,0x2,0x0,0x0,0x0,0x0,0x2,0x0,0x2,0x20000,0x0,0x0,0x800000,0x200000,0xe2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x20000,0x20000,0x1000000,0x0,0x4000,0x1c000000,0x0,0xfc000000,0x0,0x0,0x0,0x0,0xe0000000,0x0,0x0,0xe0000000,0x0,0x0,0x0,0xffffffff,};
2480   }
2481   private static void jj_la1_2() {
2482      jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x4000000,0x0,0x0,0x4000000,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x401ffff,0x0,0x0,0x4000000,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x67563fe3,0x3560000,0x3560000,0x0,0x3560000,0x3560000,0x0,0x3560000,0x3560000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x67563fe3,0x60000000,0x80000000,0x60000000,0x60000000,0x7563fe3,0x1c,0x1c,0x3,0x0,0x7e0,0x3800,0x1ffff,};
2483   }
2484   private static void jj_la1_3() {
2485      jj_la1_3 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
2486   }
2487  final private JJCalls[] jj_2_rtns = new JJCalls[14];
2488  private boolean jj_rescan = false;
2489  private int jj_gc = 0;
2490
2491  public EJBQLParser(java.io.InputStream JavaDoc stream) {
2492    jj_input_stream = new JavaCharStream(stream, 1, 1);
2493    token_source = new EJBQLParserTokenManager(jj_input_stream);
2494    token = new Token();
2495    jj_ntk = -1;
2496    jj_gen = 0;
2497    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2498    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2499  }
2500
2501  public void ReInit(java.io.InputStream JavaDoc stream) {
2502    jj_input_stream.ReInit(stream, 1, 1);
2503    token_source.ReInit(jj_input_stream);
2504    token = new Token();
2505    jj_ntk = -1;
2506    jj_gen = 0;
2507    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2508    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2509  }
2510
2511  public EJBQLParser(java.io.Reader JavaDoc stream) {
2512    jj_input_stream = new JavaCharStream(stream, 1, 1);
2513    token_source = new EJBQLParserTokenManager(jj_input_stream);
2514    token = new Token();
2515    jj_ntk = -1;
2516    jj_gen = 0;
2517    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2518    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2519  }
2520
2521  public void ReInit(java.io.Reader JavaDoc stream) {
2522    jj_input_stream.ReInit(stream, 1, 1);
2523    token_source.ReInit(jj_input_stream);
2524    token = new Token();
2525    jj_ntk = -1;
2526    jj_gen = 0;
2527    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2528    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2529  }
2530
2531  public EJBQLParser(EJBQLParserTokenManager tm) {
2532    token_source = tm;
2533    token = new Token();
2534    jj_ntk = -1;
2535    jj_gen = 0;
2536    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2537    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2538  }
2539
2540  public void ReInit(EJBQLParserTokenManager tm) {
2541    token_source = tm;
2542    token = new Token();
2543    jj_ntk = -1;
2544    jj_gen = 0;
2545    for (int i = 0; i < 68; i++) jj_la1[i] = -1;
2546    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2547  }
2548
2549  final private Token jj_consume_token(int kind) throws ParseException {
2550    Token oldToken;
2551    if ((oldToken = token).next != null) token = token.next;
2552    else token = token.next = token_source.getNextToken();
2553    jj_ntk = -1;
2554    if (token.kind == kind) {
2555      jj_gen++;
2556      if (++jj_gc > 100) {
2557        jj_gc = 0;
2558        for (int i = 0; i < jj_2_rtns.length; i++) {
2559          JJCalls c = jj_2_rtns[i];
2560          while (c != null) {
2561            if (c.gen < jj_gen) c.first = null;
2562            c = c.next;
2563          }
2564        }
2565      }
2566      return token;
2567    }
2568    token = oldToken;
2569    jj_kind = kind;
2570    throw generateParseException();
2571  }
2572
2573  static private final class LookaheadSuccess extends java.lang.Error JavaDoc { }
2574  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
2575  final private boolean jj_scan_token(int kind) {
2576    if (jj_scanpos == jj_lastpos) {
2577      jj_la--;
2578      if (jj_scanpos.next == null) {
2579        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
2580      } else {
2581        jj_lastpos = jj_scanpos = jj_scanpos.next;
2582      }
2583    } else {
2584      jj_scanpos = jj_scanpos.next;
2585    }
2586    if (jj_rescan) {
2587      int i = 0; Token tok = token;
2588      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
2589      if (tok != null) jj_add_error_token(kind, i);
2590    }
2591    if (jj_scanpos.kind != kind) return true;
2592    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
2593    return false;
2594  }
2595
2596  final public Token getNextToken() {
2597    if (token.next != null) token = token.next;
2598    else token = token.next = token_source.getNextToken();
2599    jj_ntk = -1;
2600    jj_gen++;
2601    return token;
2602  }
2603
2604  final public Token getToken(int index) {
2605    Token t = lookingAhead ? jj_scanpos : token;
2606    for (int i = 0; i < index; i++) {
2607      if (t.next != null) t = t.next;
2608      else t = t.next = token_source.getNextToken();
2609    }
2610    return t;
2611  }
2612
2613  final private int jj_ntk() {
2614    if ((jj_nt=token.next) == null)
2615      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
2616    else
2617      return (jj_ntk = jj_nt.kind);
2618  }
2619
2620  private java.util.Vector JavaDoc jj_expentries = new java.util.Vector JavaDoc();
2621  private int[] jj_expentry;
2622  private int jj_kind = -1;
2623  private int[] jj_lasttokens = new int[100];
2624  private int jj_endpos;
2625
2626  private void jj_add_error_token(int kind, int pos) {
2627    if (pos >= 100) return;
2628    if (pos == jj_endpos + 1) {
2629      jj_lasttokens[jj_endpos++] = kind;
2630    } else if (jj_endpos != 0) {
2631      jj_expentry = new int[jj_endpos];
2632      for (int i = 0; i < jj_endpos; i++) {
2633        jj_expentry[i] = jj_lasttokens[i];
2634      }
2635      boolean exists = false;
2636      for (java.util.Enumeration JavaDoc e = jj_expentries.elements(); e.hasMoreElements();) {
2637        int[] oldentry = (int[])(e.nextElement());
2638        if (oldentry.length == jj_expentry.length) {
2639          exists = true;
2640          for (int i = 0; i < jj_expentry.length; i++) {
2641            if (oldentry[i] != jj_expentry[i]) {
2642              exists = false;
2643              break;
2644            }
2645          }
2646          if (exists) break;
2647        }
2648      }
2649      if (!exists) jj_expentries.addElement(jj_expentry);
2650      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
2651    }
2652  }
2653
2654  public ParseException generateParseException() {
2655    jj_expentries.removeAllElements();
2656    boolean[] la1tokens = new boolean[97];
2657    for (int i = 0; i < 97; i++) {
2658      la1tokens[i] = false;
2659    }
2660    if (jj_kind >= 0) {
2661      la1tokens[jj_kind] = true;
2662      jj_kind = -1;
2663    }
2664    for (int i = 0; i < 68; i++) {
2665      if (jj_la1[i] == jj_gen) {
2666        for (int j = 0; j < 32; j++) {
2667          if ((jj_la1_0[i] & (1<<j)) != 0) {
2668            la1tokens[j] = true;
2669          }
2670          if ((jj_la1_1[i] & (1<<j)) != 0) {
2671            la1tokens[32+j] = true;
2672          }
2673          if ((jj_la1_2[i] & (1<<j)) != 0) {
2674            la1tokens[64+j] = true;
2675          }
2676          if ((jj_la1_3[i] & (1<<j)) != 0) {
2677            la1tokens[96+j] = true;
2678          }
2679        }
2680      }
2681    }
2682    for (int i = 0; i < 97; i++) {
2683      if (la1tokens[i]) {
2684        jj_expentry = new int[1];
2685        jj_expentry[0] = i;
2686        jj_expentries.addElement(jj_expentry);
2687      }
2688    }
2689    jj_endpos = 0;
2690    jj_rescan_token();
2691    jj_add_error_token(0, 0);
2692    int[][] exptokseq = new int[jj_expentries.size()][];
2693    for (int i = 0; i < jj_expentries.size(); i++) {
2694      exptokseq[i] = (int[])jj_expentries.elementAt(i);
2695    }
2696    return new ParseException(token, exptokseq, tokenImage);
2697  }
2698
2699  final public void enable_tracing() {
2700  }
2701
2702  final public void disable_tracing() {
2703  }
2704
2705  final private void jj_rescan_token() {
2706    jj_rescan = true;
2707    for (int i = 0; i < 14; i++) {
2708      JJCalls p = jj_2_rtns[i];
2709      do {
2710        if (p.gen > jj_gen) {
2711          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
2712          switch (i) {
2713            case 0: jj_3_1(); break;
2714            case 1: jj_3_2(); break;
2715            case 2: jj_3_3(); break;
2716            case 3: jj_3_4(); break;
2717            case 4: jj_3_5(); break;
2718            case 5: jj_3_6(); break;
2719            case 6: jj_3_7(); break;
2720            case 7: jj_3_8(); break;
2721            case 8: jj_3_9(); break;
2722            case 9: jj_3_10(); break;
2723            case 10: jj_3_11(); break;
2724            case 11: jj_3_12(); break;
2725            case 12: jj_3_13(); break;
2726            case 13: jj_3_14(); break;
2727          }
2728        }
2729        p = p.next;
2730      } while (p != null);
2731    }
2732    jj_rescan = false;
2733  }
2734
2735  final private void jj_save(int index, int xla) {
2736    JJCalls p = jj_2_rtns[index];
2737    while (p.gen > jj_gen) {
2738      if (p.next == null) { p = p.next = new JJCalls(); break; }
2739      p = p.next;
2740    }
2741    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
2742  }
2743
2744  static final class JJCalls {
2745    int gen;
2746    Token first;
2747    int arg;
2748    JJCalls next;
2749  }
2750
2751}
2752
Popular Tags