KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdo > query > JDOQLParser


1 /* Generated By:JavaCC: Do not edit this line. JDOQLParser.java */
2 package com.versant.core.jdo.query;
3
4 import com.versant.core.util.CharBuf;
5 import com.versant.core.util.IntArray;
6
7 import java.util.ArrayList JavaDoc;
8
9 /**
10  * JavaCC generated parser. Do not put a main method in this class as that
11  * breaks obfuscation.
12  */

13 public class JDOQLParser implements JDOQLParserConstants {
14
15     /**
16      * Put method name to the method node
17      * for example a.b.c() is FieldNavNode a, FieldNavNode b, FieldNode c and MethodNode () [ name = null ]
18      * after this method a.b.c() becomes FieldNavNode a, FieldNode b MethodNode () [name = c ]
19      * if the Primary expresssion resolves to a method only then that method is returned instead
20      * of PrimaryExprNode this.
21      */

22
23
24         private void moveMethodName(MethodNode method){
25                 Node left = method.childList;
26                 if(left == null ){
27                         return;
28                 }
29                 if(left instanceof FieldNode ){
30                         FieldNode f = (FieldNode)left;
31                         method.setName(f.lexeme);
32                         f.lexeme = "this";
33                 }else if( left instanceof FieldNavNode){
34                         Node n = left, next = left.next;
35                         while(!(n.childList instanceof FieldNode))n = n.childList;
36                         FieldNode f = (FieldNode)n.childList;
37                         method.setName(f.lexeme);
38
39                         //Reset the FieldNode to it's parent
40
f.lexeme = ((FieldNavNode)n).lexeme;
41                         f.parent = n.parent;
42                         n.parent.childList = f;
43
44                         //Reset next
45
method.childList.next = next;
46                 }
47
48         }
49         public Node resolveMethod(Node node){
50         for(Node current = node.childList, previous = null;
51                                 current != null;){
52             if(current.next instanceof MethodNode){
53                 MethodNode currentMethod = (MethodNode)current.next;
54
55                                 if(previous != null){
56                                         previous.next = currentMethod;
57                                 }else{
58                                         node.childList = currentMethod;
59                                 }
60                                 current.next = currentMethod.childList;
61                                 currentMethod.childList = current;
62                                 current.parent = currentMethod;
63
64                                 moveMethodName(currentMethod);
65
66                                 current = currentMethod;
67                         }else{
68                                 previous = current;
69                                 current = current.next;
70                         }
71                 }
72
73
74                 resolveMethod2(node);
75                 /*
76         if(node.childList.next == null){
77             return node.childList;
78         }
79         */

80                 return node;
81         }
82
83          public Node resolveMethod2(Node node){
84         for(Node current = node.childList, previous = null;
85                                 current != null;){
86             if(current.next instanceof MethodNode){
87                 MethodNode currentMethod = (MethodNode)current.next;
88
89                                 if(previous != null){
90                                         previous.next = currentMethod;
91                                 }else{
92                                         node.childList = currentMethod;
93                                 }
94                                 current.next = (currentMethod.childList instanceof FieldNode
95                                         && ((FieldNode)currentMethod.childList).lexeme.equals("this"))?
96                                         currentMethod.childList.next : currentMethod.childList;
97
98                                 currentMethod.childList = current;
99                                 current.parent = currentMethod;
100
101                                 current = currentMethod;
102                         }else{
103                                 previous = current;
104                                 current = current.next;
105                         }
106                 }
107
108                 return node;
109         }
110
111     public static void main(String JavaDoc args[])throws Exception JavaDoc{
112                 JDOQLParser parser = new JDOQLParser(System.in);
113                 System.out.println("Type some input and Ctrl-D to parse :");
114                 //parser.literal();
115
//parser.type().dump(" ");
116
parser.filterExpression().dump(" ");
117                 //Node nodes[] = parser.declareVariables();
118
//Node nodes[] = parser.declareImports();
119
//Node nodes[] = parser.setOrderings();
120
/*Node nodes[] = parser.declareParameters();
121         if(nodes != null){
122             for(int i=0; i<nodes.length; i++){
123                 nodes[i].dump(">>>");
124                 System.out.println();
125             }
126         }*/

127         }
128
129 /**
130   * Parameter declaration
131   */

132   final public ParamNode[] declareParameters() throws ParseException {
133         ArrayList JavaDoc list = new ArrayList JavaDoc();
134     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
135     case BOOLEAN:
136     case BYTE:
137     case CHAR:
138     case DOUBLE:
139     case FLOAT:
140     case INT:
141     case LONG:
142     case SHORT:
143     case IDENTIFIER:
144       parameters(list);
145       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
146       case COMMA:
147         jj_consume_token(COMMA);
148         break;
149       default:
150         jj_la1[0] = jj_gen;
151         ;
152       }
153       jj_consume_token(0);
154                 int size = list.size();
155                 ParamNode[] params = new ParamNode[size];
156                 for(int i = 0; i < size; params[i] = (ParamNode)list.get(i++));
157                 {if (true) return params;}
158       break;
159     case 0:
160       jj_consume_token(0);
161                 {if (true) return null;}
162       break;
163     default:
164       jj_la1[1] = jj_gen;
165       jj_consume_token(-1);
166       throw new ParseException();
167     }
168     throw new Error JavaDoc("Missing return statement in function");
169   }
170
171   final public void parameters(ArrayList JavaDoc list) throws ParseException {
172                                   ParamNode n;
173     n = parameter();
174                         list.add(n);
175     label_1:
176     while (true) {
177       if (jj_2_1(2)) {
178         ;
179       } else {
180         break label_1;
181       }
182       jj_consume_token(COMMA);
183       n = parameter();
184                                                                              list.add(n);
185     }
186   }
187
188   final public ParamNode parameter() throws ParseException {
189     ParamNode n = new ParamNode();
190     Token t;
191     Object JavaDoc tp;
192     tp = type();
193     t = jj_consume_token(IDENTIFIER);
194         if (tp instanceof Class JavaDoc) n.setCls((Class JavaDoc)tp);
195         else n.setType((String JavaDoc)tp);
196                 n.setIdentifier(t.image);
197                 {if (true) return n;}
198     throw new Error JavaDoc("Missing return statement in function");
199   }
200
201 /**
202   * variable declaration
203   */

204   final public VarNode[] declareVariables() throws ParseException {
205         ArrayList JavaDoc list = new ArrayList JavaDoc();
206     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
207     case BOOLEAN:
208     case BYTE:
209     case CHAR:
210     case DOUBLE:
211     case FLOAT:
212     case INT:
213     case LONG:
214     case SHORT:
215     case IDENTIFIER:
216       variables(list);
217       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
218       case SEMICOLON:
219         jj_consume_token(SEMICOLON);
220         break;
221       default:
222         jj_la1[2] = jj_gen;
223         ;
224       }
225       jj_consume_token(0);
226                 int size = list.size();
227                 VarNode[] Vars = new VarNode[size];
228                 for(int i = 0; i < size; Vars[i] = (VarNode)list.get(i++));
229                 {if (true) return Vars;}
230       break;
231     case 0:
232       jj_consume_token(0);
233                 {if (true) return null;}
234       break;
235     default:
236       jj_la1[3] = jj_gen;
237       jj_consume_token(-1);
238       throw new ParseException();
239     }
240     throw new Error JavaDoc("Missing return statement in function");
241   }
242
243   final public void variables(ArrayList JavaDoc list) throws ParseException {
244 VarNode n;
245     n = variable();
246                        list.add(n);
247     label_2:
248     while (true) {
249       if (jj_2_2(2)) {
250         ;
251       } else {
252         break label_2;
253       }
254       jj_consume_token(SEMICOLON);
255       n = variable();
256                                                                               list.add(n);
257     }
258   }
259
260   final public VarNode variable() throws ParseException {
261         VarNode n = new VarNode();
262         Token t;
263     Object JavaDoc tp;
264     tp = type();
265     t = jj_consume_token(IDENTIFIER);
266         if (tp instanceof Class JavaDoc) n.setCls((Class JavaDoc)tp);
267         else n.setType((String JavaDoc)tp);
268                 n.setIdentifier(t.image);
269                 {if (true) return n;}
270     throw new Error JavaDoc("Missing return statement in function");
271   }
272
273 /**
274   * Import declaration
275   */

276   final public ImportNode[] declareImports() throws ParseException {
277         ArrayList JavaDoc list = new ArrayList JavaDoc();
278     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
279     case IMPORT:
280       importDeclarations(list);
281       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
282       case SEMICOLON:
283         jj_consume_token(SEMICOLON);
284         break;
285       default:
286         jj_la1[4] = jj_gen;
287         ;
288       }
289                 int size = list.size();
290                 ImportNode[] imports = new ImportNode[size];
291                 for(int i = 0; i < size; imports[i] = (ImportNode)list.get(i++));
292                 {if (true) return imports;}
293       break;
294     case 0:
295       jj_consume_token(0);
296                 {if (true) return null;}
297       break;
298     default:
299       jj_la1[5] = jj_gen;
300       jj_consume_token(-1);
301       throw new ParseException();
302     }
303     throw new Error JavaDoc("Missing return statement in function");
304   }
305
306   final public void importDeclarations(ArrayList JavaDoc list) throws ParseException {
307                                           ImportNode n;
308     n = importDeclaration();
309                                 list.add(n);
310     label_3:
311     while (true) {
312       if (jj_2_3(2)) {
313         ;
314       } else {
315         break label_3;
316       }
317       jj_consume_token(SEMICOLON);
318       n = importDeclaration();
319                                                            list.add(n);
320     }
321   }
322
323   final public ImportNode importDeclaration() throws ParseException {
324         ImportNode n = new ImportNode();
325         Token t;
326         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
327     jj_consume_token(IMPORT);
328     t = jj_consume_token(IDENTIFIER);
329                                    sb.append(t.image);
330     label_4:
331     while (true) {
332       if (jj_2_4(2)) {
333         ;
334       } else {
335         break label_4;
336       }
337       jj_consume_token(DOT);
338       t = jj_consume_token(IDENTIFIER);
339                                                         sb.append("."); sb.append(t.image);
340     }
341     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
342     case DOT:
343       jj_consume_token(DOT);
344       t = jj_consume_token(STAR);
345                                      sb.append("."); n.all = true;
346       break;
347     default:
348       jj_la1[6] = jj_gen;
349       ;
350     }
351                 n.name = sb.toString();
352                 {if (true) return n;}
353     throw new Error JavaDoc("Missing return statement in function");
354   }
355
356 /**
357   * orderSpecification declaration
358   */

359   final public OrderNode[] setOrderings() throws ParseException {
360         ArrayList JavaDoc list = new ArrayList JavaDoc();
361     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
362     case MAX:
363     case MIN:
364     case AVG:
365     case COUNT_STAR:
366     case COUNT:
367     case SUM:
368     case THIS:
369     case INTEGER_LITERAL:
370     case FLOATING_POINT_LITERAL:
371     case CHARACTER_LITERAL:
372     case NULL:
373     case BOOLEAN_LITERAL:
374     case STRING_LITERAL:
375     case IDENTIFIER:
376     case LPAREN:
377     case BANG:
378     case TILDE:
379       orderSpecifications(list);
380       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
381       case COMMA:
382         jj_consume_token(COMMA);
383         break;
384       default:
385         jj_la1[7] = jj_gen;
386         ;
387       }
388                 int size = list.size();
389                 OrderNode[] orders = new OrderNode[size];
390                 for(int i = 0; i < size; orders[i] = (OrderNode)list.get(i++));
391                 {if (true) return orders;}
392       break;
393     case 0:
394       jj_consume_token(0);
395                 {if (true) return null;}
396       break;
397     default:
398       jj_la1[8] = jj_gen;
399       jj_consume_token(-1);
400       throw new ParseException();
401     }
402     throw new Error JavaDoc("Missing return statement in function");
403   }
404
405   final public void orderSpecifications(ArrayList JavaDoc list) throws ParseException {
406                                            OrderNode n;
407     n = orderSpecification();
408                                  list.add(n);
409     label_5:
410     while (true) {
411       if (jj_2_5(2)) {
412         ;
413       } else {
414         break label_5;
415       }
416       jj_consume_token(COMMA);
417       n = orderSpecification();
418                                                                                                list.add(n);
419     }
420   }
421
422   final public OrderNode orderSpecification() throws ParseException {
423         OrderNode n = new OrderNode();
424     n.childList = unaryExpressionNotPlusMinus();
425     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
426     case ASCENDING:
427       jj_consume_token(ASCENDING);
428                               n.order=OrderNode.ORDER_ASCENDING;
429       break;
430     case DESCENDING:
431       jj_consume_token(DESCENDING);
432                                    n.order = OrderNode.ORDER_DESCENDING;
433       break;
434     default:
435       jj_la1[9] = jj_gen;
436       jj_consume_token(-1);
437       throw new ParseException();
438     }
439                 n.childList.parent = n;
440                 {if (true) return n;}
441     throw new Error JavaDoc("Missing return statement in function");
442   }
443
444 /**
445   * orderSpecification declaration
446   */

447   final public ResultNode setResults() throws ParseException {
448     ResultNode rNode = null;
449     Node current = null;
450     boolean distinct = false;
451     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
452     case DISTINCT:
453       jj_consume_token(DISTINCT);
454                     distinct = true;
455       break;
456     default:
457       jj_la1[10] = jj_gen;
458       ;
459     }
460     current = setResultsImp(rNode);
461         rNode = new ResultNode(current);
462         current.parent = rNode;
463         rNode.setDistinct(distinct);
464     label_6:
465     while (true) {
466       if (jj_2_6(2)) {
467         ;
468       } else {
469         break label_6;
470       }
471       jj_consume_token(COMMA);
472       current.next = setResultsImp(rNode);
473                                                                   current = current.next;
474     }
475         {if (true) return rNode;}
476     throw new Error JavaDoc("Missing return statement in function");
477   }
478
479   final public Node setResultsImp(Node parent) throws ParseException {
480     Node n = null;
481     if (jj_2_7(2147483647)) {
482       jj_consume_token(COUNT_STAR);
483                                           n = new AggregateCountStarNode(parent);
484       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
485       case AS:
486         jj_consume_token(AS);
487         AsClause(n);
488         break;
489       default:
490         jj_la1[11] = jj_gen;
491         ;
492       }
493                                                                                                         {if (true) return n;}
494     } else if (jj_2_8(2147483647)) {
495       jj_consume_token(COUNT);
496       n = aggregateNode(AggregateNode.TYPE_COUNT, parent);
497                                                                                     {if (true) return n;}
498     } else if (jj_2_9(2147483647)) {
499       jj_consume_token(AVG);
500       n = aggregateNode(AggregateNode.TYPE_AVG, parent);
501                                                                               {if (true) return n;}
502     } else if (jj_2_10(2147483647)) {
503       jj_consume_token(SUM);
504       n = aggregateNode(AggregateNode.TYPE_SUM, parent);
505                                                                               {if (true) return n;}
506     } else if (jj_2_11(2147483647)) {
507       jj_consume_token(MIN);
508       n = aggregateNode(AggregateNode.TYPE_MIN, parent);
509                                                                               {if (true) return n;}
510     } else if (jj_2_12(2147483647)) {
511       jj_consume_token(MAX);
512       n = aggregateNode(AggregateNode.TYPE_MAX, parent);
513                                                                               {if (true) return n;}
514     } else {
515       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
516       case MAX:
517       case MIN:
518       case AVG:
519       case COUNT_STAR:
520       case COUNT:
521       case SUM:
522       case THIS:
523       case INTEGER_LITERAL:
524       case FLOATING_POINT_LITERAL:
525       case CHARACTER_LITERAL:
526       case NULL:
527       case BOOLEAN_LITERAL:
528       case STRING_LITERAL:
529       case IDENTIFIER:
530       case LPAREN:
531       case BANG:
532       case TILDE:
533       case PLUS:
534       case MINUS:
535         n = unExpImp();
536                     n.parent = parent; {if (true) return n;}
537         break;
538       default:
539         jj_la1[12] = jj_gen;
540         jj_consume_token(-1);
541         throw new ParseException();
542       }
543     }
544     throw new Error JavaDoc("Missing return statement in function");
545   }
546
547   final public Node aggregateNode(int type, Node parent) throws ParseException {
548     AggregateNode an = null;
549     Node n = null;
550     n = unExpImp();
551      an = new AggregateNode(n, type);
552      an.parent = parent; {if (true) return an;}
553     throw new Error JavaDoc("Missing return statement in function");
554   }
555
556   final public Node unExpImp() throws ParseException {
557     Node n = null;
558     n = unaryExpression();
559     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
560     case AS:
561       jj_consume_token(AS);
562       AsClause(n);
563       break;
564     default:
565       jj_la1[13] = jj_gen;
566       ;
567     }
568                                               {if (true) return n;}
569     throw new Error JavaDoc("Missing return statement in function");
570   }
571
572   final public void AsClause(Node n) throws ParseException {
573     Token t = null;
574     t = jj_consume_token(IDENTIFIER);
575                       n.asValue = t.image;
576   }
577
578 /**
579 * (LOOKAHEAD(<COMMA>) <COMMA> current.next = setGroupingImp(gNode, gNode) {current = current.next; })*
580 */

581   final public GroupingNode setGrouping() throws ParseException {
582     Node current = null;
583     GroupingNode gNode = null;
584     Node having = null;
585     current = setGroupingImp(gNode, gNode);
586         gNode = new GroupingNode();
587         gNode.childList = current;
588         current.parent = gNode;
589     label_7:
590     while (true) {
591       if (jj_2_13(2147483647)) {
592         ;
593       } else {
594         break label_7;
595       }
596       jj_consume_token(COMMA);
597       current.next = setGroupingImp(gNode, gNode);
598                                                                              current = current.next;
599     }
600     if (jj_2_14(2147483647)) {
601       jj_consume_token(HAVING);
602       having = orExpression();
603                                                            gNode.havingNode = having; having.parent = gNode;
604     } else {
605       ;
606     }
607      {if (true) return gNode;}
608     throw new Error JavaDoc("Missing return statement in function");
609   }
610
611 /**
612 *[LOOKAHEAD(<HAVING>) <HAVING> having = unaryExpression(){gNode.havingNode = having; having.parent = gNode;}]
613 */

614   final public Node setGroupingImp(Node parent, GroupingNode gNode) throws ParseException {
615     Node n = null;
616     Node having = null;
617     n = unaryExpression();
618         n.parent = parent;
619         {if (true) return n;}
620     throw new Error JavaDoc("Missing return statement in function");
621   }
622
623   final public Node nameOrThis() throws ParseException {
624         Node n = null;
625     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
626     case IDENTIFIER:
627       n = name();
628                      {if (true) return n;}
629       break;
630     case THIS:
631       jj_consume_token(THIS);
632                    {if (true) return new ReservedFieldNode(ReservedFieldNode.TYPE_THIS, "this");}
633       break;
634     default:
635       jj_la1[14] = jj_gen;
636       jj_consume_token(-1);
637       throw new ParseException();
638     }
639     throw new Error JavaDoc("Missing return statement in function");
640   }
641
642  /**
643   * Filter Expression
644   */

645   final public Node filterExpression() throws ParseException {
646                            Node n;
647     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
648     case MAX:
649     case MIN:
650     case AVG:
651     case COUNT_STAR:
652     case COUNT:
653     case SUM:
654     case THIS:
655     case INTEGER_LITERAL:
656     case FLOATING_POINT_LITERAL:
657     case CHARACTER_LITERAL:
658     case NULL:
659     case BOOLEAN_LITERAL:
660     case STRING_LITERAL:
661     case IDENTIFIER:
662     case LPAREN:
663     case BANG:
664     case TILDE:
665     case PLUS:
666     case MINUS:
667       n = orExpression();
668       jj_consume_token(0);
669                 {if (true) return n;}
670       break;
671     case 0:
672       jj_consume_token(0);
673                 {if (true) return null;}
674       break;
675     default:
676       jj_la1[15] = jj_gen;
677       jj_consume_token(-1);
678       throw new ParseException();
679     }
680     throw new Error JavaDoc("Missing return statement in function");
681   }
682
683   final public Node orExpression() throws ParseException {
684         OrNode node = new OrNode();
685         Node n = null;
686     Node pos = null;
687     n = andExpression();
688     pos = node.childList = n;
689     label_8:
690     while (true) {
691       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
692       case SC_OR:
693       case BIT_OR:
694         ;
695         break;
696       default:
697         jj_la1[16] = jj_gen;
698         break label_8;
699       }
700       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
701       case SC_OR:
702         jj_consume_token(SC_OR);
703         break;
704       case BIT_OR:
705         jj_consume_token(BIT_OR);
706         break;
707       default:
708         jj_la1[17] = jj_gen;
709         jj_consume_token(-1);
710         throw new ParseException();
711       }
712       n = andExpression();
713     pos = pos.next = n;
714     }
715     if (pos == node.childList) {if (true) return n;}
716     node.setParentOnChildren();
717     {if (true) return node;}
718     throw new Error JavaDoc("Missing return statement in function");
719   }
720
721   final public Node andExpression() throws ParseException {
722         AndNode node = new AndNode();
723         Node n = null;
724     Node pos = null;
725     if (jj_2_15(2147483647)) {
726       n = equalityExpression();
727     } else {
728       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
729       case MAX:
730       case MIN:
731       case AVG:
732       case COUNT_STAR:
733       case COUNT:
734       case SUM:
735       case THIS:
736       case INTEGER_LITERAL:
737       case FLOATING_POINT_LITERAL:
738       case CHARACTER_LITERAL:
739       case NULL:
740       case BOOLEAN_LITERAL:
741       case STRING_LITERAL:
742       case IDENTIFIER:
743       case LPAREN:
744       case BANG:
745       case TILDE:
746       case PLUS:
747       case MINUS:
748         n = inequalityExpression();
749         break;
750       default:
751         jj_la1[18] = jj_gen;
752         jj_consume_token(-1);
753         throw new ParseException();
754       }
755     }
756     pos = node.childList = n;
757     label_9:
758     while (true) {
759       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
760       case SC_AND:
761       case BIT_AND:
762         ;
763         break;
764       default:
765         jj_la1[19] = jj_gen;
766         break label_9;
767       }
768       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
769       case SC_AND:
770         jj_consume_token(SC_AND);
771         break;
772       case BIT_AND:
773         jj_consume_token(BIT_AND);
774         break;
775       default:
776         jj_la1[20] = jj_gen;
777         jj_consume_token(-1);
778         throw new ParseException();
779       }
780       if (jj_2_16(2147483647)) {
781         n = equalityExpression();
782       } else {
783         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
784         case MAX:
785         case MIN:
786         case AVG:
787         case COUNT_STAR:
788         case COUNT:
789         case SUM:
790         case THIS:
791         case INTEGER_LITERAL:
792         case FLOATING_POINT_LITERAL:
793         case CHARACTER_LITERAL:
794         case NULL:
795         case BOOLEAN_LITERAL:
796         case STRING_LITERAL:
797         case IDENTIFIER:
798         case LPAREN:
799         case BANG:
800         case TILDE:
801         case PLUS:
802         case MINUS:
803           n = inequalityExpression();
804           break;
805         default:
806           jj_la1[21] = jj_gen;
807           jj_consume_token(-1);
808           throw new ParseException();
809         }
810       }
811         pos = pos.next = n;
812     }
813     if (pos == node.childList) {if (true) return n;}
814     node.setParentOnChildren();
815     {if (true) return node;}
816     throw new Error JavaDoc("Missing return statement in function");
817   }
818
819   final public Node equalityExpression() throws ParseException {
820         Node n1;
821         Node n2;
822     n1 = relationalExpression();
823     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
824     case EQ:
825       jj_consume_token(EQ);
826       n2 = relationalExpression();
827                         n1 = new EqualNode(n1, n2);
828       break;
829     default:
830       jj_la1[22] = jj_gen;
831       ;
832     }
833                 //System.out.println("returning equality = "+n1);
834
{if (true) return n1;}
835     throw new Error JavaDoc("Missing return statement in function");
836   }
837
838   final public Node inequalityExpression() throws ParseException {
839         Node n1;
840         Node n2;
841     n1 = relationalExpression();
842     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
843     case NE:
844       jj_consume_token(NE);
845       n2 = relationalExpression();
846                         n1 = new NotEqualNode(n1, n2);
847       break;
848     default:
849       jj_la1[23] = jj_gen;
850       ;
851     }
852                 //System.out.println("returning inequality = "+n1);
853
{if (true) return n1;}
854     throw new Error JavaDoc("Missing return statement in function");
855   }
856
857   final public Node relationalExpression() throws ParseException {
858         Node n1;
859         Node n2;
860     int op = 0;
861     n1 = additiveExpression();
862     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
863     case GT:
864     case LT:
865     case LE:
866     case GE:
867       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
868       case LT:
869         jj_consume_token(LT);
870                          op = CompareOpNode.LT;
871         break;
872       case GT:
873         jj_consume_token(GT);
874                      op = CompareOpNode.GT;
875         break;
876       case LE:
877         jj_consume_token(LE);
878                          op = CompareOpNode.LE;
879         break;
880       case GE:
881         jj_consume_token(GE);
882                          op = CompareOpNode.GE;
883         break;
884       default:
885         jj_la1[24] = jj_gen;
886         jj_consume_token(-1);
887         throw new ParseException();
888       }
889       n2 = additiveExpression();
890         n1 = new CompareOpNode(n1, n2, op);
891       break;
892     default:
893       jj_la1[25] = jj_gen;
894       ;
895     }
896            //System.out.println("returning relational = "+n1);
897
{if (true) return n1;}
898     throw new Error JavaDoc("Missing return statement in function");
899   }
900
901   final public Node additiveExpression() throws ParseException {
902         AddNode node = new AddNode();
903         Node n = null;
904     Node pos = null;
905     IntArray ops = new IntArray();
906     n = multiplicativeExpression();
907     pos = node.childList = n;
908     label_10:
909     while (true) {
910       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
911       case PLUS:
912       case MINUS:
913         ;
914         break;
915       default:
916         jj_la1[26] = jj_gen;
917         break label_10;
918       }
919       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
920       case PLUS:
921         jj_consume_token(PLUS);
922             ops.add(node.OP_PLUS);
923         break;
924       case MINUS:
925         jj_consume_token(MINUS);
926              ops.add(node.OP_MINUS);
927         break;
928       default:
929         jj_la1[27] = jj_gen;
930         jj_consume_token(-1);
931         throw new ParseException();
932       }
933       n = multiplicativeExpression();
934     pos = pos.next = n;
935     }
936     if (pos == node.childList) {if (true) return n;}
937     node.setParentOnChildren();
938     node.ops = ops.toArray();
939     {if (true) return node;}
940     throw new Error JavaDoc("Missing return statement in function");
941   }
942
943   final public Node multiplicativeExpression() throws ParseException {
944         MultiplyNode node = new MultiplyNode();
945         Node n = null;
946     Node pos = null;
947     IntArray ops = new IntArray();
948     n = unaryExpression();
949     pos = node.childList = n;
950     label_11:
951     while (true) {
952       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
953       case STAR:
954       case SLASH:
955         ;
956         break;
957       default:
958         jj_la1[28] = jj_gen;
959         break label_11;
960       }
961       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
962       case STAR:
963         jj_consume_token(STAR);
964             ops.add(node.OP_TIMES);
965         break;
966       case SLASH:
967         jj_consume_token(SLASH);
968                   ops.add(node.OP_DIVIDE);
969         break;
970       default:
971         jj_la1[29] = jj_gen;
972         jj_consume_token(-1);
973         throw new ParseException();
974       }
975       n = unaryExpression();
976     pos = pos.next = n;
977     }
978     if (pos == node.childList) {if (true) return n;}
979     node.setParentOnChildren();
980     node.ops = ops.toArray();
981     {if (true) return node;}
982     throw new Error JavaDoc("Missing return statement in function");
983   }
984
985   final public Node unaryExpression() throws ParseException {
986         Node n;
987     int op;
988     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
989     case PLUS:
990     case MINUS:
991       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
992       case PLUS:
993         jj_consume_token(PLUS);
994                   op = UnaryOpNode.OP_PLUS;
995         break;
996       case MINUS:
997         jj_consume_token(MINUS);
998                     op = UnaryOpNode.OP_MINUS;
999         break;
1000      default:
1001        jj_la1[30] = jj_gen;
1002        jj_consume_token(-1);
1003        throw new ParseException();
1004      }
1005      n = unaryExpression();
1006        {if (true) return new UnaryOpNode(n, op);}
1007      break;
1008    case MAX:
1009    case MIN:
1010    case AVG:
1011    case COUNT_STAR:
1012    case COUNT:
1013    case SUM:
1014    case THIS:
1015    case INTEGER_LITERAL:
1016    case FLOATING_POINT_LITERAL:
1017    case CHARACTER_LITERAL:
1018    case NULL:
1019    case BOOLEAN_LITERAL:
1020    case STRING_LITERAL:
1021    case IDENTIFIER:
1022    case LPAREN:
1023    case BANG:
1024    case TILDE:
1025      n = unaryExpressionNotPlusMinus();
1026                //System.out.println("returning unaryExpression = "+n);
1027
{if (true) return n;}
1028      break;
1029    default:
1030      jj_la1[31] = jj_gen;
1031      jj_consume_token(-1);
1032      throw new ParseException();
1033    }
1034    throw new Error JavaDoc("Missing return statement in function");
1035  }
1036
1037  final public Node unaryExpressionNotPlusMinus() throws ParseException {
1038    Node n;
1039    int op;
1040    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1041    case BANG:
1042    case TILDE:
1043      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1044      case TILDE:
1045        jj_consume_token(TILDE);
1046                   op = UnaryOpNode.OP_TILDE;
1047        break;
1048      case BANG:
1049        jj_consume_token(BANG);
1050                   op = UnaryOpNode.OP_BANG;
1051        break;
1052      default:
1053        jj_la1[32] = jj_gen;
1054        jj_consume_token(-1);
1055        throw new ParseException();
1056      }
1057      n = unaryExpression();
1058        {if (true) return new UnaryOpNode(n, op);}
1059      break;
1060    default:
1061      jj_la1[33] = jj_gen;
1062      if (jj_2_17(2147483647)) {
1063        n = castExpression();
1064                {if (true) return n;}
1065      } else {
1066        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1067        case MAX:
1068        case MIN:
1069        case AVG:
1070        case COUNT_STAR:
1071        case COUNT:
1072        case SUM:
1073        case THIS:
1074        case INTEGER_LITERAL:
1075        case FLOATING_POINT_LITERAL:
1076        case CHARACTER_LITERAL:
1077        case NULL:
1078        case BOOLEAN_LITERAL:
1079        case STRING_LITERAL:
1080        case IDENTIFIER:
1081        case LPAREN:
1082          n = primaryExpression();
1083                //System.out.println("returning unaryExpressionNOtPlusMinus = "+n);
1084
{if (true) return n;}
1085          break;
1086        default:
1087          jj_la1[34] = jj_gen;
1088          jj_consume_token(-1);
1089          throw new ParseException();
1090        }
1091      }
1092    }
1093    throw new Error JavaDoc("Missing return statement in function");
1094  }
1095
1096// This production is to determine lookahead.
1097
final public void castLookahead() throws ParseException {
1098    if (jj_2_18(2147483647)) {
1099      jj_consume_token(LPAREN);
1100      type();
1101      jj_consume_token(LBRACKET);
1102      jj_consume_token(RBRACKET);
1103    } else {
1104      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1105      case LPAREN:
1106        jj_consume_token(LPAREN);
1107        type();
1108        jj_consume_token(RPAREN);
1109        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1110        case TILDE:
1111          jj_consume_token(TILDE);
1112          break;
1113        case BANG:
1114          jj_consume_token(BANG);
1115          break;
1116        case LPAREN:
1117          jj_consume_token(LPAREN);
1118          break;
1119        case IDENTIFIER:
1120          jj_consume_token(IDENTIFIER);
1121          break;
1122        case THIS:
1123          jj_consume_token(THIS);
1124          break;
1125        case INTEGER_LITERAL:
1126        case FLOATING_POINT_LITERAL:
1127        case CHARACTER_LITERAL:
1128        case NULL:
1129        case BOOLEAN_LITERAL:
1130        case STRING_LITERAL:
1131          literal();
1132          break;
1133        default:
1134          jj_la1[35] = jj_gen;
1135          jj_consume_token(-1);
1136          throw new ParseException();
1137        }
1138        break;
1139      default:
1140        jj_la1[36] = jj_gen;
1141        jj_consume_token(-1);
1142        throw new ParseException();
1143      }
1144    }
1145  }
1146
1147  final public Node castExpression() throws ParseException {
1148    Object JavaDoc tp;
1149    int brackets = 0;
1150    Node n;
1151    jj_consume_token(LPAREN);
1152    tp = type();
1153    label_12:
1154    while (true) {
1155      if (jj_2_19(2)) {
1156        ;
1157      } else {
1158        break label_12;
1159      }
1160      jj_consume_token(LBRACKET);
1161                                            brackets++;
1162      jj_consume_token(RBRACKET);
1163    }
1164    jj_consume_token(RPAREN);
1165    n = unaryExpression();
1166        {if (true) return new CastNode(n, brackets, tp);}
1167    throw new Error JavaDoc("Missing return statement in function");
1168  }
1169
1170  final public Node primaryExpression() throws ParseException {
1171        PrimaryExprNode node = new PrimaryExprNode();
1172        Node n = null;
1173    Node pos = null;
1174    n = primaryPrefix();
1175    pos = node.childList = n;
1176    label_13:
1177    while (true) {
1178      if (jj_2_20(3)) {
1179        ;
1180      } else {
1181        break label_13;
1182      }
1183      n = primarySuffix();
1184        pos = pos.next = n;
1185    }
1186    /*if(pos == node.childList && ! (node.childList instanceof MethodNode)){
1187        return n;
1188    }
1189    node.setParentOnChildren();
1190    return resolveMethod(node);
1191    */

1192
1193        if(pos == node.childList &&
1194                !( node.childList instanceof MethodNode)){
1195                {if (true) return node.childList;}
1196        }else{
1197                Node tmp = node;
1198                tmp.setParentOnChildren();
1199                resolveMethod(tmp);
1200
1201                if(tmp.childList.next == null){
1202                        tmp = tmp.childList;
1203                }
1204
1205                if(tmp != null && tmp.childList instanceof ReservedFieldNode ){
1206                        Node tmp2 = tmp.childList;
1207                        tmp2.childList = tmp2.next;
1208
1209                        if(tmp2.childList != null){
1210                                tmp2.next = tmp2.childList.next;
1211                                tmp2.childList.next = null;
1212                        }else{
1213                                tmp2.next = null;
1214                        }
1215                        tmp2.setParentOnChildren();
1216                }
1217                tmp.setParentOnChildren();
1218                if(tmp instanceof PrimaryExprNode && tmp.childList.next == null){
1219                        tmp = tmp.childList;
1220                }
1221                tmp.parent = null;
1222                {if (true) return tmp;}
1223        }
1224
1225        //return node;
1226

1227    throw new Error JavaDoc("Missing return statement in function");
1228  }
1229
1230  final public Node primaryPrefix() throws ParseException {
1231                       Node n = null; Token t; Node tmp;
1232    if (jj_2_21(2147483647)) {
1233      jj_consume_token(COUNT_STAR);
1234                                              {if (true) return new AggregateCountStarNode();}
1235    } else if (jj_2_22(2147483647)) {
1236      jj_consume_token(COUNT);
1237      tmp = unaryExpression();
1238        n = new AggregateNode(tmp, AggregateNode.TYPE_COUNT);
1239        {if (true) return n;}
1240    } else if (jj_2_23(2147483647)) {
1241      jj_consume_token(AVG);
1242      tmp = unaryExpression();
1243        n = new AggregateNode(tmp, AggregateNode.TYPE_AVG);
1244        {if (true) return n;}
1245    } else if (jj_2_24(2147483647)) {
1246      jj_consume_token(SUM);
1247      tmp = unaryExpression();
1248        n = new AggregateNode(tmp, AggregateNode.TYPE_SUM);
1249        {if (true) return n;}
1250    } else if (jj_2_25(2147483647)) {
1251      jj_consume_token(MIN);
1252      tmp = unaryExpression();
1253        n = new AggregateNode(tmp, AggregateNode.TYPE_MIN);
1254        {if (true) return n;}
1255    } else if (jj_2_26(2147483647)) {
1256      jj_consume_token(MAX);
1257      tmp = unaryExpression();
1258        n = new AggregateNode(tmp, AggregateNode.TYPE_MAX);
1259        {if (true) return n;}
1260    } else {
1261      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1262      case INTEGER_LITERAL:
1263      case FLOATING_POINT_LITERAL:
1264      case CHARACTER_LITERAL:
1265      case NULL:
1266      case BOOLEAN_LITERAL:
1267      case STRING_LITERAL:
1268        n = literal();
1269        break;
1270      case IDENTIFIER:
1271        n = name();
1272        break;
1273      case THIS:
1274        jj_consume_token(THIS);
1275                n = new ReservedFieldNode(ReservedFieldNode.TYPE_THIS,"this");
1276        break;
1277      case LPAREN:
1278        jj_consume_token(LPAREN);
1279        n = orExpression();
1280        jj_consume_token(RPAREN);
1281        break;
1282      default:
1283        jj_la1[37] = jj_gen;
1284        jj_consume_token(-1);
1285        throw new ParseException();
1286      }
1287    }
1288                //System.out.println("returning primaryPrefix = "+n);
1289
{if (true) return n;}
1290    throw new Error JavaDoc("Missing return statement in function");
1291  }
1292
1293  final public Node primarySuffix() throws ParseException {
1294        Token t;
1295        Node n;
1296    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1297    case LBRACKET:
1298      jj_consume_token(LBRACKET);
1299      n = orExpression();
1300      jj_consume_token(RBRACKET);
1301                ArrayNode an = new ArrayNode();
1302                an.args = n;
1303                if(n != null) n.parent = an;
1304                {if (true) return an;}
1305      break;
1306    case DOT:
1307      jj_consume_token(DOT);
1308      n = name();
1309                            {if (true) return n;}
1310      break;
1311    case LPAREN:
1312      n = arguments();
1313                MethodNode mn = new MethodNode();
1314                //mn.args = n;
1315
mn.childList = n;
1316                if (n != null) {
1317            n.next = null;
1318            n.parent = mn;
1319        }
1320                {if (true) return mn;}
1321      break;
1322    default:
1323      jj_la1[38] = jj_gen;
1324      jj_consume_token(-1);
1325      throw new ParseException();
1326    }
1327    throw new Error JavaDoc("Missing return statement in function");
1328  }
1329
1330  final public Node arguments() throws ParseException {
1331                  Node n = null;
1332    jj_consume_token(LPAREN);
1333    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1334    case MAX:
1335    case MIN:
1336    case AVG:
1337    case COUNT_STAR:
1338    case COUNT:
1339    case SUM:
1340    case THIS:
1341    case INTEGER_LITERAL:
1342    case FLOATING_POINT_LITERAL:
1343    case CHARACTER_LITERAL:
1344    case NULL:
1345    case BOOLEAN_LITERAL:
1346    case STRING_LITERAL:
1347    case IDENTIFIER:
1348    case LPAREN:
1349    case BANG:
1350    case TILDE:
1351    case PLUS:
1352    case MINUS:
1353      n = argumentList();
1354      break;
1355    default:
1356      jj_la1[39] = jj_gen;
1357      ;
1358    }
1359    jj_consume_token(RPAREN);
1360                                            {if (true) return n;}
1361    throw new Error JavaDoc("Missing return statement in function");
1362  }
1363
1364  final public Node argumentList() throws ParseException {
1365        ArgNode node = new ArgNode();
1366        Node n = null;
1367    Node pos = null;
1368    n = orExpression();
1369        pos = node.childList = n;
1370    label_14:
1371    while (true) {
1372      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1373      case COMMA:
1374        ;
1375        break;
1376      default:
1377        jj_la1[40] = jj_gen;
1378        break label_14;
1379      }
1380      jj_consume_token(COMMA);
1381      n = orExpression();
1382    }
1383        pos = pos.next = n;
1384    if (pos == node.childList) {if (true) return n;}
1385    node.setParentOnChildren();
1386    {if (true) return node;}
1387    throw new Error JavaDoc("Missing return statement in function");
1388  }
1389
1390/**
1391 * Definition of types. Primitives and Names (e.g. String).
1392 */

1393  final public Object JavaDoc type() throws ParseException {
1394    CharBuf s = null;
1395    Token t = null;
1396    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1397    case INT:
1398      jj_consume_token(INT);
1399                 {if (true) return Integer.TYPE;}
1400      break;
1401    case BYTE:
1402      jj_consume_token(BYTE);
1403                   {if (true) return Byte.TYPE;}
1404      break;
1405    case SHORT:
1406      jj_consume_token(SHORT);
1407                    {if (true) return Short.TYPE;}
1408      break;
1409    case LONG:
1410      jj_consume_token(LONG);
1411                   {if (true) return Long.TYPE;}
1412      break;
1413    case CHAR:
1414      jj_consume_token(CHAR);
1415                   {if (true) return Character.TYPE;}
1416      break;
1417    case FLOAT:
1418      jj_consume_token(FLOAT);
1419                    {if (true) return Float.TYPE;}
1420      break;
1421    case DOUBLE:
1422      jj_consume_token(DOUBLE);
1423                     {if (true) return Double.TYPE;}
1424      break;
1425    case BOOLEAN:
1426      jj_consume_token(BOOLEAN);
1427                      {if (true) return Boolean.TYPE;}
1428      break;
1429    case IDENTIFIER:
1430            s = new CharBuf();
1431      t = jj_consume_token(IDENTIFIER);
1432                           s.append(t.image);
1433      label_15:
1434      while (true) {
1435        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1436        case DOT:
1437          ;
1438          break;
1439        default:
1440          jj_la1[41] = jj_gen;
1441          break label_15;
1442        }
1443        jj_consume_token(DOT);
1444                  s.append(".");
1445        t = jj_consume_token(IDENTIFIER);
1446                                                      s.append(t.image);
1447      }
1448          {if (true) return s.toString();}
1449      break;
1450    default:
1451      jj_la1[42] = jj_gen;
1452      jj_consume_token(-1);
1453      throw new ParseException();
1454    }
1455    throw new Error JavaDoc("Missing return statement in function");
1456  }
1457
1458  final public Node name() throws ParseException {
1459              ArrayList JavaDoc list = new ArrayList JavaDoc(); Token t = null;
1460    t = jj_consume_token(IDENTIFIER);
1461                          list.add(t.image);
1462    label_16:
1463    while (true) {
1464      if (jj_2_27(2)) {
1465        ;
1466      } else {
1467        break label_16;
1468      }
1469      jj_consume_token(DOT);
1470      t = jj_consume_token(IDENTIFIER);
1471                                                      list.add(t.image);
1472    }
1473                FieldNavNode parent = null;
1474                Node root = null;
1475                for(int i = 0; i < list.size() - 1; i++){
1476                        FieldNavNode node = new FieldNavNode();
1477            node.parent = parent;
1478                        node.lexeme = (String JavaDoc)list.get(i);
1479                        if(parent != null){
1480                                parent.childList = node;
1481                        }else{
1482                                root = node;
1483                        }
1484                        parent = node;
1485                }
1486
1487                FieldNode node = new FieldNode(parent,t.image);
1488// node.parent = parent;
1489
// node.lexeme = t.image;
1490
if(parent != null){
1491                        parent.childList = node;
1492                }else{
1493                        root = node;
1494                }
1495                //System.out.println("returning name = "+root);
1496
{if (true) return root;}
1497    throw new Error JavaDoc("Missing return statement in function");
1498  }
1499
1500  final public LiteralNode literal() throws ParseException {
1501        Token t = null;
1502        LiteralNode literal = new LiteralNode(null,LiteralNode.TYPE_OTHER,null);
1503    StringBuffer JavaDoc buffer;
1504    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1505    case INTEGER_LITERAL:
1506      t = jj_consume_token(INTEGER_LITERAL);
1507            literal.type = LiteralNode.TYPE_LONG;
1508      break;
1509    case FLOATING_POINT_LITERAL:
1510      t = jj_consume_token(FLOATING_POINT_LITERAL);
1511            literal.type = LiteralNode.TYPE_DOUBLE;
1512      break;
1513    case BOOLEAN_LITERAL:
1514      t = jj_consume_token(BOOLEAN_LITERAL);
1515                literal.type = LiteralNode.TYPE_BOOLEAN;
1516      break;
1517    case NULL:
1518      t = jj_consume_token(NULL);
1519                literal.type = LiteralNode.TYPE_NULL;
1520      break;
1521    case STRING_LITERAL:
1522      t = jj_consume_token(STRING_LITERAL);
1523                literal.type = LiteralNode.TYPE_STRING;
1524                buffer = new StringBuffer JavaDoc(t.image);
1525                buffer.deleteCharAt(0);
1526                buffer.deleteCharAt(buffer.length() - 1);
1527                literal.value = buffer.toString();
1528                {if (true) return literal;}
1529      break;
1530    case CHARACTER_LITERAL:
1531      t = jj_consume_token(CHARACTER_LITERAL);
1532                literal.type = LiteralNode.TYPE_STRING;
1533                buffer = new StringBuffer JavaDoc(t.image);
1534                buffer.deleteCharAt(0);
1535                buffer.deleteCharAt(buffer.length() - 1);
1536                literal.value = buffer.toString();
1537                {if (true) return literal;}
1538      break;
1539    default:
1540      jj_la1[43] = jj_gen;
1541      jj_consume_token(-1);
1542      throw new ParseException();
1543    }
1544                                literal.value = t.image;
1545                                {if (true) return literal;}
1546    throw new Error JavaDoc("Missing return statement in function");
1547  }
1548
1549  final private boolean jj_2_1(int xla) {
1550    jj_la = xla; jj_lastpos = jj_scanpos = token;
1551    try { return !jj_3_1(); }
1552    catch(LookaheadSuccess ls) { return true; }
1553    finally { jj_save(0, xla); }
1554  }
1555
1556  final private boolean jj_2_2(int xla) {
1557    jj_la = xla; jj_lastpos = jj_scanpos = token;
1558    try { return !jj_3_2(); }
1559    catch(LookaheadSuccess ls) { return true; }
1560    finally { jj_save(1, xla); }
1561  }
1562
1563  final private boolean jj_2_3(int xla) {
1564    jj_la = xla; jj_lastpos = jj_scanpos = token;
1565    try { return !jj_3_3(); }
1566    catch(LookaheadSuccess ls) { return true; }
1567    finally { jj_save(2, xla); }
1568  }
1569
1570  final private boolean jj_2_4(int xla) {
1571    jj_la = xla; jj_lastpos = jj_scanpos = token;
1572    try { return !jj_3_4(); }
1573    catch(LookaheadSuccess ls) { return true; }
1574    finally { jj_save(3, xla); }
1575  }
1576
1577  final private boolean jj_2_5(int xla) {
1578    jj_la = xla; jj_lastpos = jj_scanpos = token;
1579    try { return !jj_3_5(); }
1580    catch(LookaheadSuccess ls) { return true; }
1581    finally { jj_save(4, xla); }
1582  }
1583
1584  final private boolean jj_2_6(int xla) {
1585    jj_la = xla; jj_lastpos = jj_scanpos = token;
1586    try { return !jj_3_6(); }
1587    catch(LookaheadSuccess ls) { return true; }
1588    finally { jj_save(5, xla); }
1589  }
1590
1591  final private boolean jj_2_7(int xla) {
1592    jj_la = xla; jj_lastpos = jj_scanpos = token;
1593    try { return !jj_3_7(); }
1594    catch(LookaheadSuccess ls) { return true; }
1595    finally { jj_save(6, xla); }
1596  }
1597
1598  final private boolean jj_2_8(int xla) {
1599    jj_la = xla; jj_lastpos = jj_scanpos = token;
1600    try { return !jj_3_8(); }
1601    catch(LookaheadSuccess ls) { return true; }
1602    finally { jj_save(7, xla); }
1603  }
1604
1605  final private boolean jj_2_9(int xla) {
1606    jj_la = xla; jj_lastpos = jj_scanpos = token;
1607    try { return !jj_3_9(); }
1608    catch(LookaheadSuccess ls) { return true; }
1609    finally { jj_save(8, xla); }
1610  }
1611
1612  final private boolean jj_2_10(int xla) {
1613    jj_la = xla; jj_lastpos = jj_scanpos = token;
1614    try { return !jj_3_10(); }
1615    catch(LookaheadSuccess ls) { return true; }
1616    finally { jj_save(9, xla); }
1617  }
1618
1619  final private boolean jj_2_11(int xla) {
1620    jj_la = xla; jj_lastpos = jj_scanpos = token;
1621    try { return !jj_3_11(); }
1622    catch(LookaheadSuccess ls) { return true; }
1623    finally { jj_save(10, xla); }
1624  }
1625
1626  final private boolean jj_2_12(int xla) {
1627    jj_la = xla; jj_lastpos = jj_scanpos = token;
1628    try { return !jj_3_12(); }
1629    catch(LookaheadSuccess ls) { return true; }
1630    finally { jj_save(11, xla); }
1631  }
1632
1633  final private boolean jj_2_13(int xla) {
1634    jj_la = xla; jj_lastpos = jj_scanpos = token;
1635    try { return !jj_3_13(); }
1636    catch(LookaheadSuccess ls) { return true; }
1637    finally { jj_save(12, xla); }
1638  }
1639
1640  final private boolean jj_2_14(int xla) {
1641    jj_la = xla; jj_lastpos = jj_scanpos = token;
1642    try { return !jj_3_14(); }
1643    catch(LookaheadSuccess ls) { return true; }
1644    finally { jj_save(13, xla); }
1645  }
1646
1647  final private boolean jj_2_15(int xla) {
1648    jj_la = xla; jj_lastpos = jj_scanpos = token;
1649    try { return !jj_3_15(); }
1650    catch(LookaheadSuccess ls) { return true; }
1651    finally { jj_save(14, xla); }
1652  }
1653
1654  final private boolean jj_2_16(int xla) {
1655    jj_la = xla; jj_lastpos = jj_scanpos = token;
1656    try { return !jj_3_16(); }
1657    catch(LookaheadSuccess ls) { return true; }
1658    finally { jj_save(15, xla); }
1659  }
1660
1661  final private boolean jj_2_17(int xla) {
1662    jj_la = xla; jj_lastpos = jj_scanpos = token;
1663    try { return !jj_3_17(); }
1664    catch(LookaheadSuccess ls) { return true; }
1665    finally { jj_save(16, xla); }
1666  }
1667
1668  final private boolean jj_2_18(int xla) {
1669    jj_la = xla; jj_lastpos = jj_scanpos = token;
1670    try { return !jj_3_18(); }
1671    catch(LookaheadSuccess ls) { return true; }
1672    finally { jj_save(17, xla); }
1673  }
1674
1675  final private boolean jj_2_19(int xla) {
1676    jj_la = xla; jj_lastpos = jj_scanpos = token;
1677    try { return !jj_3_19(); }
1678    catch(LookaheadSuccess ls) { return true; }
1679    finally { jj_save(18, xla); }
1680  }
1681
1682  final private boolean jj_2_20(int xla) {
1683    jj_la = xla; jj_lastpos = jj_scanpos = token;
1684    try { return !jj_3_20(); }
1685    catch(LookaheadSuccess ls) { return true; }
1686    finally { jj_save(19, xla); }
1687  }
1688
1689  final private boolean jj_2_21(int xla) {
1690    jj_la = xla; jj_lastpos = jj_scanpos = token;
1691    try { return !jj_3_21(); }
1692    catch(LookaheadSuccess ls) { return true; }
1693    finally { jj_save(20, xla); }
1694  }
1695
1696  final private boolean jj_2_22(int xla) {
1697    jj_la = xla; jj_lastpos = jj_scanpos = token;
1698    try { return !jj_3_22(); }
1699    catch(LookaheadSuccess ls) { return true; }
1700    finally { jj_save(21, xla); }
1701  }
1702
1703  final private boolean jj_2_23(int xla) {
1704    jj_la = xla; jj_lastpos = jj_scanpos = token;
1705    try { return !jj_3_23(); }
1706    catch(LookaheadSuccess ls) { return true; }
1707    finally { jj_save(22, xla); }
1708  }
1709
1710  final private boolean jj_2_24(int xla) {
1711    jj_la = xla; jj_lastpos = jj_scanpos = token;
1712    try { return !jj_3_24(); }
1713    catch(LookaheadSuccess ls) { return true; }
1714    finally { jj_save(23, xla); }
1715  }
1716
1717  final private boolean jj_2_25(int xla) {
1718    jj_la = xla; jj_lastpos = jj_scanpos = token;
1719    try { return !jj_3_25(); }
1720    catch(LookaheadSuccess ls) { return true; }
1721    finally { jj_save(24, xla); }
1722  }
1723
1724  final private boolean jj_2_26(int xla) {
1725    jj_la = xla; jj_lastpos = jj_scanpos = token;
1726    try { return !jj_3_26(); }
1727    catch(LookaheadSuccess ls) { return true; }
1728    finally { jj_save(25, xla); }
1729  }
1730
1731  final private boolean jj_2_27(int xla) {
1732    jj_la = xla; jj_lastpos = jj_scanpos = token;
1733    try { return !jj_3_27(); }
1734    catch(LookaheadSuccess ls) { return true; }
1735    finally { jj_save(26, xla); }
1736  }
1737
1738  final private boolean jj_3_19() {
1739    if (jj_scan_token(LBRACKET)) return true;
1740    if (jj_scan_token(RBRACKET)) return true;
1741    return false;
1742  }
1743
1744  final private boolean jj_3R_68() {
1745    if (jj_3R_77()) return true;
1746    Token xsp;
1747    while (true) {
1748      xsp = jj_scanpos;
1749      if (jj_3_20()) { jj_scanpos = xsp; break; }
1750    }
1751    return false;
1752  }
1753
1754  final private boolean jj_3_2() {
1755    if (jj_scan_token(SEMICOLON)) return true;
1756    if (jj_3R_18()) return true;
1757    return false;
1758  }
1759
1760  final private boolean jj_3R_75() {
1761    Token xsp;
1762    xsp = jj_scanpos;
1763    if (jj_scan_token(62)) {
1764    jj_scanpos = xsp;
1765    if (jj_scan_token(69)) return true;
1766    }
1767    if (jj_3R_74()) return true;
1768    return false;
1769  }
1770
1771  final private boolean jj_3_27() {
1772    if (jj_scan_token(DOT)) return true;
1773    if (jj_scan_token(IDENTIFIER)) return true;
1774    return false;
1775  }
1776
1777  final private boolean jj_3R_62() {
1778    if (jj_3R_74()) return true;
1779    Token xsp;
1780    while (true) {
1781      xsp = jj_scanpos;
1782      if (jj_3R_75()) { jj_scanpos = xsp; break; }
1783    }
1784    return false;
1785  }
1786
1787  final private boolean jj_3R_67() {
1788    if (jj_scan_token(LPAREN)) return true;
1789    if (jj_3R_24()) return true;
1790    Token xsp;
1791    while (true) {
1792      xsp = jj_scanpos;
1793      if (jj_3_19()) { jj_scanpos = xsp; break; }
1794    }
1795    if (jj_scan_token(RPAREN)) return true;
1796    if (jj_3R_69()) return true;
1797    return false;
1798  }
1799
1800  final private boolean jj_3_18() {
1801    if (jj_scan_token(LPAREN)) return true;
1802    if (jj_3R_24()) return true;
1803    if (jj_scan_token(LBRACKET)) return true;
1804    return false;
1805  }
1806
1807  final private boolean jj_3R_63() {
1808    if (jj_scan_token(IDENTIFIER)) return true;
1809    Token xsp;
1810    while (true) {
1811      xsp = jj_scanpos;
1812      if (jj_3_27()) { jj_scanpos = xsp; break; }
1813    }
1814    return false;
1815  }
1816
1817  final private boolean jj_3R_37() {
1818    if (jj_scan_token(LPAREN)) return true;
1819    if (jj_3R_24()) return true;
1820    if (jj_scan_token(RPAREN)) return true;
1821    Token xsp;
1822    xsp = jj_scanpos;
1823    if (jj_scan_token(57)) {
1824    jj_scanpos = xsp;
1825    if (jj_scan_token(56)) {
1826    jj_scanpos = xsp;
1827    if (jj_scan_token(45)) {
1828    jj_scanpos = xsp;
1829    if (jj_scan_token(42)) {
1830    jj_scanpos = xsp;
1831    if (jj_scan_token(31)) {
1832    jj_scanpos = xsp;
1833    if (jj_3R_60()) return true;
1834    }
1835    }
1836    }
1837    }
1838    }
1839    return false;
1840  }
1841
1842  final private boolean jj_3R_61() {
1843    if (jj_scan_token(DOT)) return true;
1844    if (jj_scan_token(IDENTIFIER)) return true;
1845    return false;
1846  }
1847
1848  final private boolean jj_3_17() {
1849    if (jj_3R_23()) return true;
1850    return false;
1851  }
1852
1853  final private boolean jj_3R_46() {
1854    if (jj_scan_token(IDENTIFIER)) return true;
1855    Token xsp;
1856    while (true) {
1857      xsp = jj_scanpos;
1858      if (jj_3R_61()) { jj_scanpos = xsp; break; }
1859    }
1860    return false;
1861  }
1862
1863  final private boolean jj_3R_23() {
1864    Token xsp;
1865    xsp = jj_scanpos;
1866    if (jj_3R_36()) {
1867    jj_scanpos = xsp;
1868    if (jj_3R_37()) return true;
1869    }
1870    return false;
1871  }
1872
1873  final private boolean jj_3R_36() {
1874    if (jj_scan_token(LPAREN)) return true;
1875    if (jj_3R_24()) return true;
1876    if (jj_scan_token(LBRACKET)) return true;
1877    if (jj_scan_token(RBRACKET)) return true;
1878    return false;
1879  }
1880
1881  final private boolean jj_3R_45() {
1882    if (jj_scan_token(BOOLEAN)) return true;
1883    return false;
1884  }
1885
1886  final private boolean jj_3R_18() {
1887    if (jj_3R_24()) return true;
1888    return false;
1889  }
1890
1891  final private boolean jj_3R_44() {
1892    if (jj_scan_token(DOUBLE)) return true;
1893    return false;
1894  }
1895
1896  final private boolean jj_3R_43() {
1897    if (jj_scan_token(FLOAT)) return true;
1898    return false;
1899  }
1900
1901  final private boolean jj_3R_42() {
1902    if (jj_scan_token(CHAR)) return true;
1903    return false;
1904  }
1905
1906  final private boolean jj_3R_41() {
1907    if (jj_scan_token(LONG)) return true;
1908    return false;
1909  }
1910
1911  final private boolean jj_3R_40() {
1912    if (jj_scan_token(SHORT)) return true;
1913    return false;
1914  }
1915
1916  final private boolean jj_3R_52() {
1917    if (jj_3R_68()) return true;
1918    return false;
1919  }
1920
1921  final private boolean jj_3R_39() {
1922    if (jj_scan_token(BYTE)) return true;
1923    return false;
1924  }
1925
1926  final private boolean jj_3R_38() {
1927    if (jj_scan_token(INT)) return true;
1928    return false;
1929  }
1930
1931  final private boolean jj_3R_24() {
1932    Token xsp;
1933    xsp = jj_scanpos;
1934    if (jj_3R_38()) {
1935    jj_scanpos = xsp;
1936    if (jj_3R_39()) {
1937    jj_scanpos = xsp;
1938    if (jj_3R_40()) {
1939    jj_scanpos = xsp;
1940    if (jj_3R_41()) {
1941    jj_scanpos = xsp;
1942    if (jj_3R_42()) {
1943    jj_scanpos = xsp;
1944    if (jj_3R_43()) {
1945    jj_scanpos = xsp;
1946    if (jj_3R_44()) {
1947    jj_scanpos = xsp;
1948    if (jj_3R_45()) {
1949    jj_scanpos = xsp;
1950    if (jj_3R_46()) return true;
1951    }
1952    }
1953    }
1954    }
1955    }
1956    }
1957    }
1958    }
1959    return false;
1960  }
1961
1962  final private boolean jj_3R_51() {
1963    if (jj_3R_67()) return true;
1964    return false;
1965  }
1966
1967  final private boolean jj_3R_66() {
1968    if (jj_scan_token(BANG)) return true;
1969    return false;
1970  }
1971
1972  final private boolean jj_3_1() {
1973    if (jj_scan_token(COMMA)) return true;
1974    if (jj_3R_17()) return true;
1975    return false;
1976  }
1977
1978  final private boolean jj_3R_65() {
1979    if (jj_scan_token(TILDE)) return true;
1980    return false;
1981  }
1982
1983  final private boolean jj_3R_26() {
1984    Token xsp;
1985    xsp = jj_scanpos;
1986    if (jj_3R_50()) {
1987    jj_scanpos = xsp;
1988    if (jj_3R_51()) {
1989    jj_scanpos = xsp;
1990    if (jj_3R_52()) return true;
1991    }
1992    }
1993    return false;
1994  }
1995
1996  final private boolean jj_3R_50() {
1997    Token xsp;
1998    xsp = jj_scanpos;
1999    if (jj_3R_65()) {
2000    jj_scanpos = xsp;
2001    if (jj_3R_66()) return true;
2002    }
2003    if (jj_3R_69()) return true;
2004    return false;
2005  }
2006
2007  final private boolean jj_3_14() {
2008    if (jj_scan_token(HAVING)) return true;
2009    return false;
2010  }
2011
2012  final private boolean jj_3_13() {
2013    if (jj_scan_token(COMMA)) return true;
2014    return false;
2015  }
2016
2017  final private boolean jj_3R_106() {
2018    if (jj_scan_token(COMMA)) return true;
2019    if (jj_3R_62()) return true;
2020    return false;
2021  }
2022
2023  final private boolean jj_3R_79() {
2024    if (jj_3R_26()) return true;
2025    return false;
2026  }
2027
2028  final private boolean jj_3R_103() {
2029    if (jj_scan_token(MINUS)) return true;
2030    return false;
2031  }
2032
2033  final private boolean jj_3R_102() {
2034    if (jj_scan_token(PLUS)) return true;
2035    return false;
2036  }
2037
2038  final private boolean jj_3R_78() {
2039    Token xsp;
2040    xsp = jj_scanpos;
2041    if (jj_3R_102()) {
2042    jj_scanpos = xsp;
2043    if (jj_3R_103()) return true;
2044    }
2045    if (jj_3R_69()) return true;
2046    return false;
2047  }
2048
2049  final private boolean jj_3R_69() {
2050    Token xsp;
2051    xsp = jj_scanpos;
2052    if (jj_3R_78()) {
2053    jj_scanpos = xsp;
2054    if (jj_3R_79()) return true;
2055    }
2056    return false;
2057  }
2058
2059  final private boolean jj_3R_76() {
2060    if (jj_3R_91()) return true;
2061    return false;
2062  }
2063
2064  final private boolean jj_3R_17() {
2065    if (jj_3R_24()) return true;
2066    return false;
2067  }
2068
2069  final private boolean jj_3R_91() {
2070    if (jj_3R_62()) return true;
2071    Token xsp;
2072    while (true) {
2073      xsp = jj_scanpos;
2074      if (jj_3R_106()) { jj_scanpos = xsp; break; }
2075    }
2076    return false;
2077  }
2078
2079  final private boolean jj_3R_64() {
2080    if (jj_scan_token(LPAREN)) return true;
2081    Token xsp;
2082    xsp = jj_scanpos;
2083    if (jj_3R_76()) jj_scanpos = xsp;
2084    if (jj_scan_token(RPAREN)) return true;
2085    return false;
2086  }
2087
2088  final private boolean jj_3R_81() {
2089    if (jj_scan_token(SLASH)) return true;
2090    return false;
2091  }
2092
2093  final private boolean jj_3R_49() {
2094    if (jj_3R_64()) return true;
2095    return false;
2096  }
2097
2098  final private boolean jj_3R_48() {
2099    if (jj_scan_token(DOT)) return true;
2100    if (jj_3R_63()) return true;
2101    return false;
2102  }
2103
2104  final private boolean jj_3R_80() {
2105    if (jj_scan_token(STAR)) return true;
2106    return false;
2107  }
2108
2109  final private boolean jj_3R_70() {
2110    Token xsp;
2111    xsp = jj_scanpos;
2112    if (jj_3R_80()) {
2113    jj_scanpos = xsp;
2114    if (jj_3R_81()) return true;
2115    }
2116    if (jj_3R_69()) return true;
2117    return false;
2118  }
2119
2120  final private boolean jj_3R_53() {
2121    if (jj_3R_69()) return true;
2122    return false;
2123  }
2124
2125  final private boolean jj_3R_54() {
2126    if (jj_3R_69()) return true;
2127    Token xsp;
2128    while (true) {
2129      xsp = jj_scanpos;
2130      if (jj_3R_70()) { jj_scanpos = xsp; break; }
2131    }
2132    return false;
2133  }
2134
2135  final private boolean jj_3R_25() {
2136    Token xsp;
2137    xsp = jj_scanpos;
2138    if (jj_3R_47()) {
2139    jj_scanpos = xsp;
2140    if (jj_3R_48()) {
2141    jj_scanpos = xsp;
2142    if (jj_3R_49()) return true;
2143    }
2144    }
2145    return false;
2146  }
2147
2148  final private boolean jj_3R_47() {
2149    if (jj_scan_token(LBRACKET)) return true;
2150    if (jj_3R_62()) return true;
2151    if (jj_scan_token(RBRACKET)) return true;
2152    return false;
2153  }
2154
2155  final private boolean jj_3_12() {
2156    if (jj_scan_token(MAX)) return true;
2157    return false;
2158  }
2159
2160  final private boolean jj_3R_101() {
2161    if (jj_scan_token(LPAREN)) return true;
2162    if (jj_3R_62()) return true;
2163    if (jj_scan_token(RPAREN)) return true;
2164    return false;
2165  }
2166
2167  final private boolean jj_3_11() {
2168    if (jj_scan_token(MIN)) return true;
2169    return false;
2170  }
2171
2172  final private boolean jj_3_10() {
2173    if (jj_scan_token(SUM)) return true;
2174    return false;
2175  }
2176
2177  final private boolean jj_3R_72() {
2178    if (jj_scan_token(MINUS)) return true;
2179    return false;
2180  }
2181
2182  final private boolean jj_3_9() {
2183    if (jj_scan_token(AVG)) return true;
2184    return false;
2185  }
2186
2187  final private boolean jj_3R_71() {
2188    if (jj_scan_token(PLUS)) return true;
2189    return false;
2190  }
2191
2192  final private boolean jj_3_8() {
2193    if (jj_scan_token(COUNT)) return true;
2194    return false;
2195  }
2196
2197  final private boolean jj_3R_33() {
2198    if (jj_3R_53()) return true;
2199    return false;
2200  }
2201
2202  final private boolean jj_3R_55() {
2203    Token xsp;
2204    xsp = jj_scanpos;
2205    if (jj_3R_71()) {
2206    jj_scanpos = xsp;
2207    if (jj_3R_72()) return true;
2208    }
2209    if (jj_3R_54()) return true;
2210    return false;
2211  }
2212
2213  final private boolean jj_3_7() {
2214    if (jj_scan_token(COUNT_STAR)) return true;
2215    return false;
2216  }
2217
2218  final private boolean jj_3R_32() {
2219    if (jj_scan_token(MAX)) return true;
2220    return false;
2221  }
2222
2223  final private boolean jj_3R_100() {
2224    if (jj_scan_token(THIS)) return true;
2225    return false;
2226  }
2227
2228  final private boolean jj_3R_99() {
2229    if (jj_3R_63()) return true;
2230    return false;
2231  }
2232
2233  final private boolean jj_3R_31() {
2234    if (jj_scan_token(MIN)) return true;
2235    return false;
2236  }
2237
2238  final private boolean jj_3R_34() {
2239    if (jj_3R_54()) return true;
2240    Token xsp;
2241    while (true) {
2242      xsp = jj_scanpos;
2243      if (jj_3R_55()) { jj_scanpos = xsp; break; }
2244    }
2245    return false;
2246  }
2247
2248  final private boolean jj_3R_98() {
2249    if (jj_3R_73()) return true;
2250    return false;
2251  }
2252
2253  final private boolean jj_3R_30() {
2254    if (jj_scan_token(SUM)) return true;
2255    return false;
2256  }
2257
2258  final private boolean jj_3_26() {
2259    if (jj_scan_token(MAX)) return true;
2260    return false;
2261  }
2262
2263  final private boolean jj_3R_29() {
2264    if (jj_scan_token(AVG)) return true;
2265    return false;
2266  }
2267
2268  final private boolean jj_3R_59() {
2269    if (jj_scan_token(GE)) return true;
2270    return false;
2271  }
2272
2273  final private boolean jj_3R_58() {
2274    if (jj_scan_token(LE)) return true;
2275    return false;
2276  }
2277
2278  final private boolean jj_3R_28() {
2279    if (jj_scan_token(COUNT)) return true;
2280    return false;
2281  }
2282
2283  final private boolean jj_3_5() {
2284    if (jj_scan_token(COMMA)) return true;
2285    if (jj_3R_20()) return true;
2286    return false;
2287  }
2288
2289  final private boolean jj_3R_56() {
2290    if (jj_scan_token(LT)) return true;
2291    return false;
2292  }
2293
2294  final private boolean jj_3R_21() {
2295    Token xsp;
2296    xsp = jj_scanpos;
2297    if (jj_3R_27()) {
2298    jj_scanpos = xsp;
2299    if (jj_3R_28()) {
2300    jj_scanpos = xsp;
2301    if (jj_3R_29()) {
2302    jj_scanpos = xsp;
2303    if (jj_3R_30()) {
2304    jj_scanpos = xsp;
2305    if (jj_3R_31()) {
2306    jj_scanpos = xsp;
2307    if (jj_3R_32()) {
2308    jj_scanpos = xsp;
2309    if (jj_3R_33()) return true;
2310    }
2311    }
2312    }
2313    }
2314    }
2315    }
2316    return false;
2317  }
2318
2319  final private boolean jj_3R_27() {
2320    if (jj_scan_token(COUNT_STAR)) return true;
2321    return false;
2322  }
2323
2324  final private boolean jj_3_25() {
2325    if (jj_scan_token(MIN)) return true;
2326    return false;
2327  }
2328
2329  final private boolean jj_3R_35() {
2330    Token xsp;
2331    xsp = jj_scanpos;
2332    if (jj_3R_56()) {
2333    jj_scanpos = xsp;
2334    if (jj_3R_57()) {
2335    jj_scanpos = xsp;
2336    if (jj_3R_58()) {
2337    jj_scanpos = xsp;
2338    if (jj_3R_59()) return true;
2339    }
2340    }
2341    }
2342    if (jj_3R_34()) return true;
2343    return false;
2344  }
2345
2346  final private boolean jj_3R_57() {
2347    if (jj_scan_token(GT)) return true;
2348    return false;
2349  }
2350
2351  final private boolean jj_3R_97() {
2352    if (jj_scan_token(MAX)) return true;
2353    if (jj_3R_69()) return true;
2354    return false;
2355  }
2356
2357  final private boolean jj_3_6() {
2358    if (jj_scan_token(COMMA)) return true;
2359    if (jj_3R_21()) return true;
2360    return false;
2361  }
2362
2363  final private boolean jj_3_24() {
2364    if (jj_scan_token(SUM)) return true;
2365    return false;
2366  }
2367
2368  final private boolean jj_3R_96() {
2369    if (jj_scan_token(MIN)) return true;
2370    if (jj_3R_69()) return true;
2371    return false;
2372  }
2373
2374  final private boolean jj_3_23() {
2375    if (jj_scan_token(AVG)) return true;
2376    return false;
2377  }
2378
2379  final private boolean jj_3_21() {
2380    if (jj_scan_token(COUNT_STAR)) return true;
2381    return false;
2382  }
2383
2384  final private boolean jj_3R_95() {
2385    if (jj_scan_token(SUM)) return true;
2386    if (jj_3R_69()) return true;
2387    return false;
2388  }
2389
2390  final private boolean jj_3_22() {
2391    if (jj_scan_token(COUNT)) return true;
2392    return false;
2393  }
2394
2395  final private boolean jj_3R_108() {
2396    if (jj_scan_token(NE)) return true;
2397    if (jj_3R_22()) return true;
2398    return false;
2399  }
2400
2401  final private boolean jj_3R_22() {
2402    if (jj_3R_34()) return true;
2403    Token xsp;
2404    xsp = jj_scanpos;
2405    if (jj_3R_35()) jj_scanpos = xsp;
2406    return false;
2407  }
2408
2409  final private boolean jj_3R_94() {
2410    if (jj_scan_token(AVG)) return true;
2411    if (jj_3R_69()) return true;
2412    return false;
2413  }
2414
2415  final private boolean jj_3R_92() {
2416    if (jj_scan_token(COUNT_STAR)) return true;
2417    return false;
2418  }
2419
2420  final private boolean jj_3R_77() {
2421    Token xsp;
2422    xsp = jj_scanpos;
2423    if (jj_3R_92()) {
2424    jj_scanpos = xsp;
2425    if (jj_3R_93()) {
2426    jj_scanpos = xsp;
2427    if (jj_3R_94()) {
2428    jj_scanpos = xsp;
2429    if (jj_3R_95()) {
2430    jj_scanpos = xsp;
2431    if (jj_3R_96()) {
2432    jj_scanpos = xsp;
2433    if (jj_3R_97()) {
2434    jj_scanpos = xsp;
2435    if (jj_3R_98()) {
2436    jj_scanpos = xsp;
2437    if (jj_3R_99()) {
2438    jj_scanpos = xsp;
2439    if (jj_3R_100()) {
2440    jj_scanpos = xsp;
2441    if (jj_3R_101()) return true;
2442    }
2443    }
2444    }
2445    }
2446    }
2447    }
2448    }
2449    }
2450    }
2451    return false;
2452  }
2453
2454  final private boolean jj_3R_93() {
2455    if (jj_scan_token(COUNT)) return true;
2456    if (jj_3R_69()) return true;
2457    return false;
2458  }
2459
2460  final private boolean jj_3_16() {
2461    if (jj_3R_22()) return true;
2462    if (jj_scan_token(EQ)) return true;
2463    return false;
2464  }
2465
2466  final private boolean jj_3R_105() {
2467    if (jj_3R_22()) return true;
2468    Token xsp;
2469    xsp = jj_scanpos;
2470    if (jj_3R_108()) jj_scanpos = xsp;
2471    return false;
2472  }
2473
2474  final private boolean jj_3R_107() {
2475    if (jj_scan_token(EQ)) return true;
2476    if (jj_3R_22()) return true;
2477    return false;
2478  }
2479
2480  final private boolean jj_3R_20() {
2481    if (jj_3R_26()) return true;
2482    return false;
2483  }
2484
2485  final private boolean jj_3R_87() {
2486    if (jj_scan_token(CHARACTER_LITERAL)) return true;
2487    return false;
2488  }
2489
2490  final private boolean jj_3R_109() {
2491    if (jj_3R_104()) return true;
2492    return false;
2493  }
2494
2495  final private boolean jj_3R_86() {
2496    if (jj_scan_token(STRING_LITERAL)) return true;
2497    return false;
2498  }
2499
2500  final private boolean jj_3R_104() {
2501    if (jj_3R_22()) return true;
2502    Token xsp;
2503    xsp = jj_scanpos;
2504    if (jj_3R_107()) jj_scanpos = xsp;
2505    return false;
2506  }
2507
2508  final private boolean jj_3R_85() {
2509    if (jj_scan_token(NULL)) return true;
2510    return false;
2511  }
2512
2513  final private boolean jj_3R_110() {
2514    if (jj_3R_105()) return true;
2515    return false;
2516  }
2517
2518  final private boolean jj_3R_84() {
2519    if (jj_scan_token(BOOLEAN_LITERAL)) return true;
2520    return false;
2521  }
2522
2523  final private boolean jj_3R_83() {
2524    if (jj_scan_token(FLOATING_POINT_LITERAL)) return true;
2525    return false;
2526  }
2527
2528  final private boolean jj_3_4() {
2529    if (jj_scan_token(DOT)) return true;
2530    if (jj_scan_token(IDENTIFIER)) return true;
2531    return false;
2532  }
2533
2534  final private boolean jj_3_15() {
2535    if (jj_3R_22()) return true;
2536    if (jj_scan_token(EQ)) return true;
2537    return false;
2538  }
2539
2540  final private boolean jj_3R_82() {
2541    if (jj_scan_token(INTEGER_LITERAL)) return true;
2542    return false;
2543  }
2544
2545  final private boolean jj_3R_60() {
2546    if (jj_3R_73()) return true;
2547    return false;
2548  }
2549
2550  final private boolean jj_3R_73() {
2551    Token xsp;
2552    xsp = jj_scanpos;
2553    if (jj_3R_82()) {
2554    jj_scanpos = xsp;
2555    if (jj_3R_83()) {
2556    jj_scanpos = xsp;
2557    if (jj_3R_84()) {
2558    jj_scanpos = xsp;
2559    if (jj_3R_85()) {
2560    jj_scanpos = xsp;
2561    if (jj_3R_86()) {
2562    jj_scanpos = xsp;
2563    if (jj_3R_87()) return true;
2564    }
2565    }
2566    }
2567    }
2568    }
2569    return false;
2570  }
2571
2572  final private boolean jj_3R_90() {
2573    Token xsp;
2574    xsp = jj_scanpos;
2575    if (jj_scan_token(63)) {
2576    jj_scanpos = xsp;
2577    if (jj_scan_token(68)) return true;
2578    }
2579    xsp = jj_scanpos;
2580    if (jj_3R_109()) {
2581    jj_scanpos = xsp;
2582    if (jj_3R_110()) return true;
2583    }
2584    return false;
2585  }
2586
2587  final private boolean jj_3R_89() {
2588    if (jj_3R_105()) return true;
2589    return false;
2590  }
2591
2592  final private boolean jj_3R_88() {
2593    if (jj_3R_104()) return true;
2594    return false;
2595  }
2596
2597  final private boolean jj_3R_19() {
2598    if (jj_scan_token(IMPORT)) return true;
2599    return false;
2600  }
2601
2602  final private boolean jj_3R_74() {
2603    Token xsp;
2604    xsp = jj_scanpos;
2605    if (jj_3R_88()) {
2606    jj_scanpos = xsp;
2607    if (jj_3R_89()) return true;
2608    }
2609    while (true) {
2610      xsp = jj_scanpos;
2611      if (jj_3R_90()) { jj_scanpos = xsp; break; }
2612    }
2613    return false;
2614  }
2615
2616  final private boolean jj_3_20() {
2617    if (jj_3R_25()) return true;
2618    return false;
2619  }
2620
2621  final private boolean jj_3_3() {
2622    if (jj_scan_token(SEMICOLON)) return true;
2623    if (jj_3R_19()) return true;
2624    return false;
2625  }
2626
2627  public JDOQLParserTokenManager token_source;
2628  JavaCharStream jj_input_stream;
2629  public Token token, jj_nt;
2630  private int jj_ntk;
2631  private Token jj_scanpos, jj_lastpos;
2632  private int jj_la;
2633  public boolean lookingAhead = false;
2634  private boolean jj_semLA;
2635  private int jj_gen;
2636  final private int[] jj_la1 = new int[44];
2637  static private int[] jj_la1_0;
2638  static private int[] jj_la1_1;
2639  static private int[] jj_la1_2;
2640  static {
2641      jj_la1_0();
2642      jj_la1_1();
2643      jj_la1_2();
2644   }
2645   private static void jj_la1_0() {
2646      jj_la1_0 = new int[] {0x0,0x76e00001,0x0,0x76e00001,0x0,0x8000001,0x0,0x0,0x800fc001,0x1000400,0x800,0x100000,0x800fc000,0x100000,0x80000000,0x800fc001,0x0,0x0,0x800fc000,0x0,0x0,0x800fc000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800fc000,0x0,0x0,0x800fc000,0x80000000,0x0,0x80000000,0x0,0x800fc000,0x0,0x0,0x76e00000,0x0,};
2647   }
2648   private static void jj_la1_1() {
2649      jj_la1_1 = new int[] {0x100000,0x400,0x80000,0x400,0x80000,0x0,0x200000,0x100000,0x30027d1,0x0,0x0,0x0,0x30027d1,0x0,0x400,0x30027d1,0x40000000,0x40000000,0x30027d1,0x80000000,0x80000000,0x30027d1,0x4000000,0x20000000,0x18c00000,0x18c00000,0x0,0x0,0x0,0x0,0x0,0x30027d1,0x3000000,0x3000000,0x27d1,0x30027d1,0x2000,0x27d1,0x222000,0x30027d1,0x100000,0x200000,0x400,0x3d1,};
2650   }
2651   private static void jj_la1_2() {
2652      jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x3,0x20,0x20,0x3,0x10,0x10,0x3,0x0,0x0,0x0,0x0,0x3,0x3,0xc,0xc,0x3,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x0,};
2653   }
2654  final private JJCalls[] jj_2_rtns = new JJCalls[27];
2655  private boolean jj_rescan = false;
2656  private int jj_gc = 0;
2657
2658  public JDOQLParser(java.io.InputStream JavaDoc stream) {
2659    jj_input_stream = new JavaCharStream(stream, 1, 1);
2660    token_source = new JDOQLParserTokenManager(jj_input_stream);
2661    token = new Token();
2662    jj_ntk = -1;
2663    jj_gen = 0;
2664    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2665    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2666  }
2667
2668  public void ReInit(java.io.InputStream JavaDoc stream) {
2669    jj_input_stream.ReInit(stream, 1, 1);
2670    token_source.ReInit(jj_input_stream);
2671    token = new Token();
2672    jj_ntk = -1;
2673    jj_gen = 0;
2674    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2675    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2676  }
2677
2678  public JDOQLParser(java.io.Reader JavaDoc stream) {
2679    jj_input_stream = new JavaCharStream(stream, 1, 1);
2680    token_source = new JDOQLParserTokenManager(jj_input_stream);
2681    token = new Token();
2682    jj_ntk = -1;
2683    jj_gen = 0;
2684    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2685    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2686  }
2687
2688  public void ReInit(java.io.Reader JavaDoc stream) {
2689    jj_input_stream.ReInit(stream, 1, 1);
2690    token_source.ReInit(jj_input_stream);
2691    token = new Token();
2692    jj_ntk = -1;
2693    jj_gen = 0;
2694    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2695    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2696  }
2697
2698  public JDOQLParser(JDOQLParserTokenManager tm) {
2699    token_source = tm;
2700    token = new Token();
2701    jj_ntk = -1;
2702    jj_gen = 0;
2703    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2704    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2705  }
2706
2707  public void ReInit(JDOQLParserTokenManager tm) {
2708    token_source = tm;
2709    token = new Token();
2710    jj_ntk = -1;
2711    jj_gen = 0;
2712    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2713    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2714  }
2715
2716  final private Token jj_consume_token(int kind) throws ParseException {
2717    Token oldToken;
2718    if ((oldToken = token).next != null) token = token.next;
2719    else token = token.next = token_source.getNextToken();
2720    jj_ntk = -1;
2721    if (token.kind == kind) {
2722      jj_gen++;
2723      if (++jj_gc > 100) {
2724        jj_gc = 0;
2725        for (int i = 0; i < jj_2_rtns.length; i++) {
2726          JJCalls c = jj_2_rtns[i];
2727          while (c != null) {
2728            if (c.gen < jj_gen) c.first = null;
2729            c = c.next;
2730          }
2731        }
2732      }
2733      return token;
2734    }
2735    token = oldToken;
2736    jj_kind = kind;
2737    throw generateParseException();
2738  }
2739
2740  static private final class LookaheadSuccess extends java.lang.Error JavaDoc { }
2741  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
2742  final private boolean jj_scan_token(int kind) {
2743    if (jj_scanpos == jj_lastpos) {
2744      jj_la--;
2745      if (jj_scanpos.next == null) {
2746        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
2747      } else {
2748        jj_lastpos = jj_scanpos = jj_scanpos.next;
2749      }
2750    } else {
2751      jj_scanpos = jj_scanpos.next;
2752    }
2753    if (jj_rescan) {
2754      int i = 0; Token tok = token;
2755      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
2756      if (tok != null) jj_add_error_token(kind, i);
2757    }
2758    if (jj_scanpos.kind != kind) return true;
2759    if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
2760    return false;
2761  }
2762
2763  final public Token getNextToken() {
2764    if (token.next != null) token = token.next;
2765    else token = token.next = token_source.getNextToken();
2766    jj_ntk = -1;
2767    jj_gen++;
2768    return token;
2769  }
2770
2771  final public Token getToken(int index) {
2772    Token t = lookingAhead ? jj_scanpos : token;
2773    for (int i = 0; i < index; i++) {
2774      if (t.next != null) t = t.next;
2775      else t = t.next = token_source.getNextToken();
2776    }
2777    return t;
2778  }
2779
2780  final private int jj_ntk() {
2781    if ((jj_nt=token.next) == null)
2782      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
2783    else
2784      return (jj_ntk = jj_nt.kind);
2785  }
2786
2787  private java.util.Vector JavaDoc jj_expentries = new java.util.Vector JavaDoc();
2788  private int[] jj_expentry;
2789  private int jj_kind = -1;
2790  private int[] jj_lasttokens = new int[100];
2791  private int jj_endpos;
2792
2793  private void jj_add_error_token(int kind, int pos) {
2794    if (pos >= 100) return;
2795    if (pos == jj_endpos + 1) {
2796      jj_lasttokens[jj_endpos++] = kind;
2797    } else if (jj_endpos != 0) {
2798      jj_expentry = new int[jj_endpos];
2799      for (int i = 0; i < jj_endpos; i++) {
2800        jj_expentry[i] = jj_lasttokens[i];
2801      }
2802      boolean exists = false;
2803      for (java.util.Enumeration JavaDoc e = jj_expentries.elements(); e.hasMoreElements();) {
2804        int[] oldentry = (int[])(e.nextElement());
2805        if (oldentry.length == jj_expentry.length) {
2806          exists = true;
2807          for (int i = 0; i < jj_expentry.length; i++) {
2808            if (oldentry[i] != jj_expentry[i]) {
2809              exists = false;
2810              break;
2811            }
2812          }
2813          if (exists) break;
2814        }
2815      }
2816      if (!exists) jj_expentries.addElement(jj_expentry);
2817      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
2818    }
2819  }
2820
2821  public ParseException generateParseException() {
2822    jj_expentries.removeAllElements();
2823    boolean[] la1tokens = new boolean[70];
2824    for (int i = 0; i < 70; i++) {
2825      la1tokens[i] = false;
2826    }
2827    if (jj_kind >= 0) {
2828      la1tokens[jj_kind] = true;
2829      jj_kind = -1;
2830    }
2831    for (int i = 0; i < 44; i++) {
2832      if (jj_la1[i] == jj_gen) {
2833        for (int j = 0; j < 32; j++) {
2834          if ((jj_la1_0[i] & (1<<j)) != 0) {
2835            la1tokens[j] = true;
2836          }
2837          if ((jj_la1_1[i] & (1<<j)) != 0) {
2838            la1tokens[32+j] = true;
2839          }
2840          if ((jj_la1_2[i] & (1<<j)) != 0) {
2841            la1tokens[64+j] = true;
2842          }
2843        }
2844      }
2845    }
2846    for (int i = 0; i < 70; i++) {
2847      if (la1tokens[i]) {
2848        jj_expentry = new int[1];
2849        jj_expentry[0] = i;
2850        jj_expentries.addElement(jj_expentry);
2851      }
2852    }
2853    jj_endpos = 0;
2854    jj_rescan_token();
2855    jj_add_error_token(0, 0);
2856    int[][] exptokseq = new int[jj_expentries.size()][];
2857    for (int i = 0; i < jj_expentries.size(); i++) {
2858      exptokseq[i] = (int[])jj_expentries.elementAt(i);
2859    }
2860    return new ParseException(token, exptokseq, tokenImage);
2861  }
2862
2863  final public void enable_tracing() {
2864  }
2865
2866  final public void disable_tracing() {
2867  }
2868
2869  final private void jj_rescan_token() {
2870    jj_rescan = true;
2871    for (int i = 0; i < 27; i++) {
2872      JJCalls p = jj_2_rtns[i];
2873      do {
2874        if (p.gen > jj_gen) {
2875          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
2876          switch (i) {
2877            case 0: jj_3_1(); break;
2878            case 1: jj_3_2(); break;
2879            case 2: jj_3_3(); break;
2880            case 3: jj_3_4(); break;
2881            case 4: jj_3_5(); break;
2882            case 5: jj_3_6(); break;
2883            case 6: jj_3_7(); break;
2884            case 7: jj_3_8(); break;
2885            case 8: jj_3_9(); break;
2886            case 9: jj_3_10(); break;
2887            case 10: jj_3_11(); break;
2888            case 11: jj_3_12(); break;
2889            case 12: jj_3_13(); break;
2890            case 13: jj_3_14(); break;
2891            case 14: jj_3_15(); break;
2892            case 15: jj_3_16(); break;
2893            case 16: jj_3_17(); break;
2894            case 17: jj_3_18(); break;
2895            case 18: jj_3_19(); break;
2896            case 19: jj_3_20(); break;
2897            case 20: jj_3_21(); break;
2898            case 21: jj_3_22(); break;
2899            case 22: jj_3_23(); break;
2900            case 23: jj_3_24(); break;
2901            case 24: jj_3_25(); break;
2902            case 25: jj_3_26(); break;
2903            case 26: jj_3_27(); break;
2904          }
2905        }
2906        p = p.next;
2907      } while (p != null);
2908    }
2909    jj_rescan = false;
2910  }
2911
2912  final private void jj_save(int index, int xla) {
2913    JJCalls p = jj_2_rtns[index];
2914    while (p.gen > jj_gen) {
2915      if (p.next == null) { p = p.next = new JJCalls(); break; }
2916      p = p.next;
2917    }
2918    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
2919  }
2920
2921  static final class JJCalls {
2922    int gen;
2923    Token first;
2924    int arg;
2925    JJCalls next;
2926  }
2927
2928}
2929
Popular Tags