KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > rdql > parser > RDQLParser


1 /* Generated By:JJTree&JavaCC: Do not edit this line. RDQLParser.java */
2 /*
3  * (c) Copyright 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP
4  */

5
6 package com.hp.hpl.jena.rdql.parser ;
7
8 public class RDQLParser/*@bgen(jjtree)*/implements RDQLParserTreeConstants, RDQLParserConstants {/*@bgen(jjtree)*/
9   protected JJTRDQLParserState jjtree = new JJTRDQLParserState();public SimpleNode top()
10    {
11       return (SimpleNode)jjtree.rootNode() ;
12    }
13
14 // **** Debug point
15
final public void CompilationUnit() throws ParseException {
16     Query();
17     jj_consume_token(0);
18   }
19
20 // Optional comma
21
final public void CommaOpt() throws ParseException {
22     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
23     case COMMA:
24       jj_consume_token(COMMA);
25       break;
26     default:
27       jj_la1[0] = jj_gen;
28       ;
29     }
30   }
31
32 // **** Debug point
33
final public void Query() throws ParseException {
34  /*@bgen(jjtree) Query */
35   Q_Query jjtn000 = new Q_Query(JJTQUERY);
36   boolean jjtc000 = true;
37   jjtree.openNodeScope(jjtn000);
38     try {
39       SelectClause();
40       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
41       case SOURCE:
42       case FROM:
43         SourceClause();
44         break;
45       default:
46         jj_la1[1] = jj_gen;
47         ;
48       }
49       TriplePatternClause();
50       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
51       case SUCHTHAT:
52         ConstraintClause();
53         break;
54       default:
55         jj_la1[2] = jj_gen;
56         ;
57       }
58       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
59       case PREFIXES:
60         PrefixesClause();
61         break;
62       default:
63         jj_la1[3] = jj_gen;
64         ;
65       }
66     } catch (Throwable JavaDoc jjte000) {
67     if (jjtc000) {
68       jjtree.clearNodeScope(jjtn000);
69       jjtc000 = false;
70     } else {
71       jjtree.popNode();
72     }
73     if (jjte000 instanceof RuntimeException JavaDoc) {
74       {if (true) throw (RuntimeException JavaDoc)jjte000;}
75     }
76     if (jjte000 instanceof ParseException) {
77       {if (true) throw (ParseException)jjte000;}
78     }
79     {if (true) throw (Error JavaDoc)jjte000;}
80     } finally {
81     if (jjtc000) {
82       jjtree.closeNodeScope(jjtn000, true);
83     }
84     }
85   }
86
87   final public void SelectClause() throws ParseException {
88  /*@bgen(jjtree) SelectClause */
89   Q_SelectClause jjtn000 = new Q_SelectClause(JJTSELECTCLAUSE);
90   boolean jjtc000 = true;
91   jjtree.openNodeScope(jjtn000);
92     try {
93       if (jj_2_1(2)) {
94         jj_consume_token(SELECT);
95         Var();
96         label_1:
97         while (true) {
98           switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
99           case COMMA:
100           case HOOK:
101             ;
102             break;
103           default:
104             jj_la1[4] = jj_gen;
105             break label_1;
106           }
107           CommaOpt();
108           Var();
109         }
110       } else {
111         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
112         case SELECT:
113           jj_consume_token(SELECT);
114           jj_consume_token(STAR);
115           break;
116         default:
117           jj_la1[5] = jj_gen;
118           jj_consume_token(-1);
119           throw new ParseException();
120         }
121       }
122     } catch (Throwable JavaDoc jjte000) {
123     if (jjtc000) {
124       jjtree.clearNodeScope(jjtn000);
125       jjtc000 = false;
126     } else {
127       jjtree.popNode();
128     }
129     if (jjte000 instanceof RuntimeException JavaDoc) {
130       {if (true) throw (RuntimeException JavaDoc)jjte000;}
131     }
132     if (jjte000 instanceof ParseException) {
133       {if (true) throw (ParseException)jjte000;}
134     }
135     {if (true) throw (Error JavaDoc)jjte000;}
136     } finally {
137     if (jjtc000) {
138       jjtree.closeNodeScope(jjtn000, true);
139     }
140     }
141   }
142
143   final public void SourceClause() throws ParseException {
144  /*@bgen(jjtree) SourceClause */
145   Q_SourceClause jjtn000 = new Q_SourceClause(JJTSOURCECLAUSE);
146   boolean jjtc000 = true;
147   jjtree.openNodeScope(jjtn000);
148     try {
149       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
150       case SOURCE:
151         jj_consume_token(SOURCE);
152         break;
153       case FROM:
154         jj_consume_token(FROM);
155         break;
156       default:
157         jj_la1[6] = jj_gen;
158         jj_consume_token(-1);
159         throw new ParseException();
160       }
161       SourceSelector();
162       label_2:
163       while (true) {
164         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
165         case COMMA:
166         case LT:
167           ;
168           break;
169         default:
170           jj_la1[7] = jj_gen;
171           break label_2;
172         }
173         CommaOpt();
174         SourceSelector();
175       }
176     } catch (Throwable JavaDoc jjte000) {
177     if (jjtc000) {
178       jjtree.clearNodeScope(jjtn000);
179       jjtc000 = false;
180     } else {
181       jjtree.popNode();
182     }
183     if (jjte000 instanceof RuntimeException JavaDoc) {
184       {if (true) throw (RuntimeException JavaDoc)jjte000;}
185     }
186     if (jjte000 instanceof ParseException) {
187       {if (true) throw (ParseException)jjte000;}
188     }
189     {if (true) throw (Error JavaDoc)jjte000;}
190     } finally {
191     if (jjtc000) {
192       jjtree.closeNodeScope(jjtn000, true);
193     }
194     }
195   }
196
197   final public void SourceSelector() throws ParseException {
198  /*@bgen(jjtree) SourceSelector */
199   Q_SourceSelector jjtn000 = new Q_SourceSelector(JJTSOURCESELECTOR);
200   boolean jjtc000 = true;
201   jjtree.openNodeScope(jjtn000);
202     try {
203       URL();
204     } catch (Throwable JavaDoc jjte000) {
205     if (jjtc000) {
206       jjtree.clearNodeScope(jjtn000);
207       jjtc000 = false;
208     } else {
209       jjtree.popNode();
210     }
211     if (jjte000 instanceof RuntimeException JavaDoc) {
212       {if (true) throw (RuntimeException JavaDoc)jjte000;}
213     }
214     if (jjte000 instanceof ParseException) {
215       {if (true) throw (ParseException)jjte000;}
216     }
217     {if (true) throw (Error JavaDoc)jjte000;}
218     } finally {
219     if (jjtc000) {
220       jjtree.closeNodeScope(jjtn000, true);
221     }
222     }
223   }
224
225   final public void TriplePatternClause() throws ParseException {
226  /*@bgen(jjtree) TriplePatternClause */
227   Q_TriplePatternClause jjtn000 = new Q_TriplePatternClause(JJTTRIPLEPATTERNCLAUSE);
228   boolean jjtc000 = true;
229   jjtree.openNodeScope(jjtn000);
230     try {
231       jj_consume_token(WHERE);
232       TriplePattern();
233       label_3:
234       while (true) {
235         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
236         case LPAREN:
237         case COMMA:
238           ;
239           break;
240         default:
241           jj_la1[8] = jj_gen;
242           break label_3;
243         }
244         CommaOpt();
245         TriplePattern();
246       }
247     } catch (Throwable JavaDoc jjte000) {
248     if (jjtc000) {
249       jjtree.clearNodeScope(jjtn000);
250       jjtc000 = false;
251     } else {
252       jjtree.popNode();
253     }
254     if (jjte000 instanceof RuntimeException JavaDoc) {
255       {if (true) throw (RuntimeException JavaDoc)jjte000;}
256     }
257     if (jjte000 instanceof ParseException) {
258       {if (true) throw (ParseException)jjte000;}
259     }
260     {if (true) throw (Error JavaDoc)jjte000;}
261     } finally {
262     if (jjtc000) {
263       jjtree.closeNodeScope(jjtn000, true);
264     }
265     }
266   }
267
268   final public void ConstraintClause() throws ParseException {
269  /*@bgen(jjtree) ConstraintClause */
270   Q_ConstraintClause jjtn000 = new Q_ConstraintClause(JJTCONSTRAINTCLAUSE);
271   boolean jjtc000 = true;
272   jjtree.openNodeScope(jjtn000);
273     try {
274       jj_consume_token(SUCHTHAT);
275       Expression();
276       label_4:
277       while (true) {
278         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
279         case SUCHTHAT:
280         case COMMA:
281           ;
282           break;
283         default:
284           jj_la1[9] = jj_gen;
285           break label_4;
286         }
287         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
288         case COMMA:
289           jj_consume_token(COMMA);
290           break;
291         case SUCHTHAT:
292           jj_consume_token(SUCHTHAT);
293           break;
294         default:
295           jj_la1[10] = jj_gen;
296           jj_consume_token(-1);
297           throw new ParseException();
298         }
299         Expression();
300       }
301     } catch (Throwable JavaDoc jjte000) {
302     if (jjtc000) {
303       jjtree.clearNodeScope(jjtn000);
304       jjtc000 = false;
305     } else {
306       jjtree.popNode();
307     }
308     if (jjte000 instanceof RuntimeException JavaDoc) {
309       {if (true) throw (RuntimeException JavaDoc)jjte000;}
310     }
311     if (jjte000 instanceof ParseException) {
312       {if (true) throw (ParseException)jjte000;}
313     }
314     {if (true) throw (Error JavaDoc)jjte000;}
315     } finally {
316     if (jjtc000) {
317       jjtree.closeNodeScope(jjtn000, true);
318     }
319     }
320   }
321
322   final public void TriplePattern() throws ParseException {
323  /*@bgen(jjtree) TriplePattern */
324   Q_TriplePattern jjtn000 = new Q_TriplePattern(JJTTRIPLEPATTERN);
325   boolean jjtc000 = true;
326   jjtree.openNodeScope(jjtn000);
327     try {
328       jj_consume_token(LPAREN);
329       VarOrURI();
330       CommaOpt();
331       VarOrURI();
332       CommaOpt();
333       VarOrLiteral();
334       jj_consume_token(RPAREN);
335     } catch (Throwable JavaDoc jjte000) {
336     if (jjtc000) {
337       jjtree.clearNodeScope(jjtn000);
338       jjtc000 = false;
339     } else {
340       jjtree.popNode();
341     }
342     if (jjte000 instanceof RuntimeException JavaDoc) {
343       {if (true) throw (RuntimeException JavaDoc)jjte000;}
344     }
345     if (jjte000 instanceof ParseException) {
346       {if (true) throw (ParseException)jjte000;}
347     }
348     {if (true) throw (Error JavaDoc)jjte000;}
349     } finally {
350     if (jjtc000) {
351       jjtree.closeNodeScope(jjtn000, true);
352     }
353     }
354   }
355
356   final public void VarOrURI() throws ParseException {
357     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
358     case HOOK:
359       Var();
360       break;
361     case SELECT:
362     case SOURCE:
363     case FROM:
364     case WHERE:
365     case SUCHTHAT:
366     case PREFIXES:
367     case FOR:
368     case STR_EQ:
369     case STR_NE:
370     case NCName:
371     case LT:
372       URI();
373       break;
374     default:
375       jj_la1[11] = jj_gen;
376       jj_consume_token(-1);
377       throw new ParseException();
378     }
379   }
380
381   final public void VarOrLiteral() throws ParseException {
382     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
383     case HOOK:
384       Var();
385       break;
386     case INTEGER_LITERAL:
387     case FLOATING_POINT_LITERAL:
388     case STRING_LITERAL1:
389     case STRING_LITERAL2:
390     case SELECT:
391     case SOURCE:
392     case FROM:
393     case WHERE:
394     case SUCHTHAT:
395     case PREFIXES:
396     case FOR:
397     case STR_EQ:
398     case STR_NE:
399     case BOOLEAN_LITERAL:
400     case NULL_LITERAL:
401     case NCName:
402     case LT:
403       Literal();
404       break;
405     default:
406       jj_la1[12] = jj_gen;
407       jj_consume_token(-1);
408       throw new ParseException();
409     }
410   }
411
412   final public void Var() throws ParseException {
413  /*@bgen(jjtree) Var */
414   Q_Var jjtn000 = new Q_Var(JJTVAR);
415   boolean jjtc000 = true;
416   jjtree.openNodeScope(jjtn000);
417     try {
418       jj_consume_token(HOOK);
419       Identifier();
420     } catch (Throwable JavaDoc jjte000) {
421     if (jjtc000) {
422       jjtree.clearNodeScope(jjtn000);
423       jjtc000 = false;
424     } else {
425       jjtree.popNode();
426     }
427     if (jjte000 instanceof RuntimeException JavaDoc) {
428       {if (true) throw (RuntimeException JavaDoc)jjte000;}
429     }
430     if (jjte000 instanceof ParseException) {
431       {if (true) throw (ParseException)jjte000;}
432     }
433     {if (true) throw (Error JavaDoc)jjte000;}
434     } finally {
435     if (jjtc000) {
436       jjtree.closeNodeScope(jjtn000, true);
437     }
438     }
439   }
440
441   final public void PrefixesClause() throws ParseException {
442  /*@bgen(jjtree) PrefixesClause */
443   Q_PrefixesClause jjtn000 = new Q_PrefixesClause(JJTPREFIXESCLAUSE);
444   boolean jjtc000 = true;
445   jjtree.openNodeScope(jjtn000);
446     try {
447       jj_consume_token(PREFIXES);
448       PrefixDecl();
449       label_5:
450       while (true) {
451         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
452         case SELECT:
453         case SOURCE:
454         case FROM:
455         case WHERE:
456         case SUCHTHAT:
457         case PREFIXES:
458         case FOR:
459         case STR_EQ:
460         case STR_NE:
461         case NCName:
462         case COMMA:
463           ;
464           break;
465         default:
466           jj_la1[13] = jj_gen;
467           break label_5;
468         }
469         CommaOpt();
470         PrefixDecl();
471       }
472     } catch (Throwable JavaDoc jjte000) {
473       if (jjtc000) {
474         jjtree.clearNodeScope(jjtn000);
475         jjtc000 = false;
476       } else {
477         jjtree.popNode();
478       }
479       if (jjte000 instanceof RuntimeException JavaDoc) {
480         {if (true) throw (RuntimeException JavaDoc)jjte000;}
481       }
482       if (jjte000 instanceof ParseException) {
483         {if (true) throw (ParseException)jjte000;}
484       }
485       {if (true) throw (Error JavaDoc)jjte000;}
486     } finally {
487       if (jjtc000) {
488         jjtree.closeNodeScope(jjtn000, true);
489       }
490     }
491   }
492
493   final public void PrefixDecl() throws ParseException {
494  /*@bgen(jjtree) PrefixDecl */
495   Q_PrefixDecl jjtn000 = new Q_PrefixDecl(JJTPREFIXDECL);
496   boolean jjtc000 = true;
497   jjtree.openNodeScope(jjtn000);
498     try {
499       Identifier();
500       jj_consume_token(FOR);
501       QuotedURI();
502     } catch (Throwable JavaDoc jjte000) {
503     if (jjtc000) {
504       jjtree.clearNodeScope(jjtn000);
505       jjtc000 = false;
506     } else {
507       jjtree.popNode();
508     }
509     if (jjte000 instanceof RuntimeException JavaDoc) {
510       {if (true) throw (RuntimeException JavaDoc)jjte000;}
511     }
512     if (jjte000 instanceof ParseException) {
513       {if (true) throw (ParseException)jjte000;}
514     }
515     {if (true) throw (Error JavaDoc)jjte000;}
516     } finally {
517     if (jjtc000) {
518       jjtree.closeNodeScope(jjtn000, true);
519     }
520     }
521   }
522
523 /******************************************************************/
524 // Constraint syntax follows.
525

526 // **** Debug point
527
final public void Expression() throws ParseException {
528     ConditionalOrExpression();
529   }
530
531   final public void ConditionalOrExpression() throws ParseException {
532     ConditionalXorExpression();
533     label_6:
534     while (true) {
535       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
536       case SC_OR:
537         ;
538         break;
539       default:
540         jj_la1[14] = jj_gen;
541         break label_6;
542       }
543       jj_consume_token(SC_OR);
544               Q_LogicalOr jjtn001 = new Q_LogicalOr(JJTLOGICALOR);
545               boolean jjtc001 = true;
546               jjtree.openNodeScope(jjtn001);
547       try {
548         ConditionalXorExpression();
549       } catch (Throwable JavaDoc jjte001) {
550               if (jjtc001) {
551                 jjtree.clearNodeScope(jjtn001);
552                 jjtc001 = false;
553               } else {
554                 jjtree.popNode();
555               }
556               if (jjte001 instanceof RuntimeException JavaDoc) {
557                 {if (true) throw (RuntimeException JavaDoc)jjte001;}
558               }
559               if (jjte001 instanceof ParseException) {
560                 {if (true) throw (ParseException)jjte001;}
561               }
562               {if (true) throw (Error JavaDoc)jjte001;}
563       } finally {
564               if (jjtc001) {
565                 jjtree.closeNodeScope(jjtn001, 2);
566               }
567       }
568     }
569   }
570
571   final public void ConditionalXorExpression() throws ParseException {
572     ConditionalAndExpression();
573   }
574
575   final public void ConditionalAndExpression() throws ParseException {
576     ValueLogical();
577     label_7:
578     while (true) {
579       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
580       case SC_AND:
581         ;
582         break;
583       default:
584         jj_la1[15] = jj_gen;
585         break label_7;
586       }
587       jj_consume_token(SC_AND);
588                 Q_LogicalAnd jjtn001 = new Q_LogicalAnd(JJTLOGICALAND);
589                 boolean jjtc001 = true;
590                 jjtree.openNodeScope(jjtn001);
591       try {
592         ValueLogical();
593       } catch (Throwable JavaDoc jjte001) {
594                 if (jjtc001) {
595                   jjtree.clearNodeScope(jjtn001);
596                   jjtc001 = false;
597                 } else {
598                   jjtree.popNode();
599                 }
600                 if (jjte001 instanceof RuntimeException JavaDoc) {
601                   {if (true) throw (RuntimeException JavaDoc)jjte001;}
602                 }
603                 if (jjte001 instanceof ParseException) {
604                   {if (true) throw (ParseException)jjte001;}
605                 }
606                 {if (true) throw (Error JavaDoc)jjte001;}
607       } finally {
608                 if (jjtc001) {
609                   jjtree.closeNodeScope(jjtn001, 2);
610                 }
611       }
612     }
613   }
614
615 // End of boolean expressions
616

617 /******************************************************************/
618
619 // Things that are not operations on boolean terms.
620
final public void ValueLogical() throws ParseException {
621     StringEqualityExpression();
622   }
623
624   final public void StringEqualityExpression() throws ParseException {
625     NumericalLogical();
626     label_8:
627     while (true) {
628       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
629       case STR_EQ:
630       case STR_NE:
631       case STR_LANGEQ:
632       case STR_MATCH:
633       case STR_NMATCH:
634         ;
635         break;
636       default:
637         jj_la1[16] = jj_gen;
638         break label_8;
639       }
640       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
641       case STR_EQ:
642         jj_consume_token(STR_EQ);
643                Q_StringEqual jjtn001 = new Q_StringEqual(JJTSTRINGEQUAL);
644                boolean jjtc001 = true;
645                jjtree.openNodeScope(jjtn001);
646         try {
647           NumericalLogical();
648         } catch (Throwable JavaDoc jjte001) {
649                if (jjtc001) {
650                  jjtree.clearNodeScope(jjtn001);
651                  jjtc001 = false;
652                } else {
653                  jjtree.popNode();
654                }
655                if (jjte001 instanceof RuntimeException JavaDoc) {
656                  {if (true) throw (RuntimeException JavaDoc)jjte001;}
657                }
658                if (jjte001 instanceof ParseException) {
659                  {if (true) throw (ParseException)jjte001;}
660                }
661                {if (true) throw (Error JavaDoc)jjte001;}
662         } finally {
663                if (jjtc001) {
664                  jjtree.closeNodeScope(jjtn001, 2);
665                }
666         }
667         break;
668       case STR_NE:
669         jj_consume_token(STR_NE);
670                Q_StringNotEqual jjtn002 = new Q_StringNotEqual(JJTSTRINGNOTEQUAL);
671                boolean jjtc002 = true;
672                jjtree.openNodeScope(jjtn002);
673         try {
674           NumericalLogical();
675         } catch (Throwable JavaDoc jjte002) {
676                if (jjtc002) {
677                  jjtree.clearNodeScope(jjtn002);
678                  jjtc002 = false;
679                } else {
680                  jjtree.popNode();
681                }
682                if (jjte002 instanceof RuntimeException JavaDoc) {
683                  {if (true) throw (RuntimeException JavaDoc)jjte002;}
684                }
685                if (jjte002 instanceof ParseException) {
686                  {if (true) throw (ParseException)jjte002;}
687                }
688                {if (true) throw (Error JavaDoc)jjte002;}
689         } finally {
690                if (jjtc002) {
691                  jjtree.closeNodeScope(jjtn002, 2);
692                }
693         }
694         break;
695       case STR_LANGEQ:
696         jj_consume_token(STR_LANGEQ);
697                    Q_StringLangEqual jjtn003 = new Q_StringLangEqual(JJTSTRINGLANGEQUAL);
698                    boolean jjtc003 = true;
699                    jjtree.openNodeScope(jjtn003);
700         try {
701           TextLiteral2();
702         } catch (Throwable JavaDoc jjte003) {
703                    if (jjtc003) {
704                      jjtree.clearNodeScope(jjtn003);
705                      jjtc003 = false;
706                    } else {
707                      jjtree.popNode();
708                    }
709                    if (jjte003 instanceof RuntimeException JavaDoc) {
710                      {if (true) throw (RuntimeException JavaDoc)jjte003;}
711                    }
712                    if (jjte003 instanceof ParseException) {
713                      {if (true) throw (ParseException)jjte003;}
714                    }
715                    {if (true) throw (Error JavaDoc)jjte003;}
716         } finally {
717                    if (jjtc003) {
718                      jjtree.closeNodeScope(jjtn003, 2);
719                    }
720         }
721         break;
722       case STR_MATCH:
723         jj_consume_token(STR_MATCH);
724                    Q_StringMatch jjtn004 = new Q_StringMatch(JJTSTRINGMATCH);
725                    boolean jjtc004 = true;
726                    jjtree.openNodeScope(jjtn004);
727         try {
728           PatternLiteral();
729         } catch (Throwable JavaDoc jjte004) {
730                    if (jjtc004) {
731                      jjtree.clearNodeScope(jjtn004);
732                      jjtc004 = false;
733                    } else {
734                      jjtree.popNode();
735                    }
736                    if (jjte004 instanceof RuntimeException JavaDoc) {
737                      {if (true) throw (RuntimeException JavaDoc)jjte004;}
738                    }
739                    if (jjte004 instanceof ParseException) {
740                      {if (true) throw (ParseException)jjte004;}
741                    }
742                    {if (true) throw (Error JavaDoc)jjte004;}
743         } finally {
744                    if (jjtc004) {
745                      jjtree.closeNodeScope(jjtn004, 2);
746                    }
747         }
748         break;
749       case STR_NMATCH:
750         jj_consume_token(STR_NMATCH);
751                    Q_StringNoMatch jjtn005 = new Q_StringNoMatch(JJTSTRINGNOMATCH);
752                    boolean jjtc005 = true;
753                    jjtree.openNodeScope(jjtn005);
754         try {
755           PatternLiteral();
756         } catch (Throwable JavaDoc jjte005) {
757                    if (jjtc005) {
758                      jjtree.clearNodeScope(jjtn005);
759                      jjtc005 = false;
760                    } else {
761                      jjtree.popNode();
762                    }
763                    if (jjte005 instanceof RuntimeException JavaDoc) {
764                      {if (true) throw (RuntimeException JavaDoc)jjte005;}
765                    }
766                    if (jjte005 instanceof ParseException) {
767                      {if (true) throw (ParseException)jjte005;}
768                    }
769                    {if (true) throw (Error JavaDoc)jjte005;}
770         } finally {
771                    if (jjtc005) {
772                      jjtree.closeNodeScope(jjtn005, 2);
773                    }
774         }
775         break;
776       default:
777         jj_la1[17] = jj_gen;
778         jj_consume_token(-1);
779         throw new ParseException();
780       }
781     }
782   }
783
784 // Expressions that involve comparing numbers.
785
final public void NumericalLogical() throws ParseException {
786     InclusiveOrExpression();
787   }
788
789   final public void InclusiveOrExpression() throws ParseException {
790     ExclusiveOrExpression();
791     label_9:
792     while (true) {
793       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
794       case BIT_OR:
795         ;
796         break;
797       default:
798         jj_la1[18] = jj_gen;
799         break label_9;
800       }
801       jj_consume_token(BIT_OR);
802                Q_BitOr jjtn001 = new Q_BitOr(JJTBITOR);
803                boolean jjtc001 = true;
804                jjtree.openNodeScope(jjtn001);
805       try {
806         ExclusiveOrExpression();
807       } catch (Throwable JavaDoc jjte001) {
808                if (jjtc001) {
809                  jjtree.clearNodeScope(jjtn001);
810                  jjtc001 = false;
811                } else {
812                  jjtree.popNode();
813                }
814                if (jjte001 instanceof RuntimeException JavaDoc) {
815                  {if (true) throw (RuntimeException JavaDoc)jjte001;}
816                }
817                if (jjte001 instanceof ParseException) {
818                  {if (true) throw (ParseException)jjte001;}
819                }
820                {if (true) throw (Error JavaDoc)jjte001;}
821       } finally {
822                if (jjtc001) {
823                  jjtree.closeNodeScope(jjtn001, 2);
824                }
825       }
826     }
827   }
828
829   final public void ExclusiveOrExpression() throws ParseException {
830     AndExpression();
831     label_10:
832     while (true) {
833       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
834       case BIT_XOR:
835         ;
836         break;
837       default:
838         jj_la1[19] = jj_gen;
839         break label_10;
840       }
841       jj_consume_token(BIT_XOR);
842                 Q_BitXor jjtn001 = new Q_BitXor(JJTBITXOR);
843                 boolean jjtc001 = true;
844                 jjtree.openNodeScope(jjtn001);
845       try {
846         AndExpression();
847       } catch (Throwable JavaDoc jjte001) {
848                 if (jjtc001) {
849                   jjtree.clearNodeScope(jjtn001);
850                   jjtc001 = false;
851                 } else {
852                   jjtree.popNode();
853                 }
854                 if (jjte001 instanceof RuntimeException JavaDoc) {
855                   {if (true) throw (RuntimeException JavaDoc)jjte001;}
856                 }
857                 if (jjte001 instanceof ParseException) {
858                   {if (true) throw (ParseException)jjte001;}
859                 }
860                 {if (true) throw (Error JavaDoc)jjte001;}
861       } finally {
862                 if (jjtc001) {
863                   jjtree.closeNodeScope(jjtn001, 2);
864                 }
865       }
866     }
867   }
868
869   final public void AndExpression() throws ParseException {
870     ArithmeticCondition();
871     label_11:
872     while (true) {
873       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
874       case BIT_AND:
875         ;
876         break;
877       default:
878         jj_la1[20] = jj_gen;
879         break label_11;
880       }
881       jj_consume_token(BIT_AND);
882                 Q_BitAnd jjtn001 = new Q_BitAnd(JJTBITAND);
883                 boolean jjtc001 = true;
884                 jjtree.openNodeScope(jjtn001);
885       try {
886         ArithmeticCondition();
887       } catch (Throwable JavaDoc jjte001) {
888                 if (jjtc001) {
889                   jjtree.clearNodeScope(jjtn001);
890                   jjtc001 = false;
891                 } else {
892                   jjtree.popNode();
893                 }
894                 if (jjte001 instanceof RuntimeException JavaDoc) {
895                   {if (true) throw (RuntimeException JavaDoc)jjte001;}
896                 }
897                 if (jjte001 instanceof ParseException) {
898                   {if (true) throw (ParseException)jjte001;}
899                 }
900                 {if (true) throw (Error JavaDoc)jjte001;}
901       } finally {
902                 if (jjtc001) {
903                   jjtree.closeNodeScope(jjtn001, 2);
904                 }
905       }
906     }
907   }
908
909   final public void ArithmeticCondition() throws ParseException {
910     EqualityExpression();
911   }
912
913   final public void EqualityExpression() throws ParseException {
914     RelationalExpression();
915     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
916     case EQ:
917     case NEQ:
918       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
919       case EQ:
920         jj_consume_token(EQ);
921            Q_Equal jjtn001 = new Q_Equal(JJTEQUAL);
922            boolean jjtc001 = true;
923            jjtree.openNodeScope(jjtn001);
924         try {
925           RelationalExpression();
926         } catch (Throwable JavaDoc jjte001) {
927            if (jjtc001) {
928              jjtree.clearNodeScope(jjtn001);
929              jjtc001 = false;
930            } else {
931              jjtree.popNode();
932            }
933            if (jjte001 instanceof RuntimeException JavaDoc) {
934              {if (true) throw (RuntimeException JavaDoc)jjte001;}
935            }
936            if (jjte001 instanceof ParseException) {
937              {if (true) throw (ParseException)jjte001;}
938            }
939            {if (true) throw (Error JavaDoc)jjte001;}
940         } finally {
941            if (jjtc001) {
942              jjtree.closeNodeScope(jjtn001, 2);
943            }
944         }
945         break;
946       case NEQ:
947         jj_consume_token(NEQ);
948             Q_NotEqual jjtn002 = new Q_NotEqual(JJTNOTEQUAL);
949             boolean jjtc002 = true;
950             jjtree.openNodeScope(jjtn002);
951         try {
952           RelationalExpression();
953         } catch (Throwable JavaDoc jjte002) {
954             if (jjtc002) {
955               jjtree.clearNodeScope(jjtn002);
956               jjtc002 = false;
957             } else {
958               jjtree.popNode();
959             }
960             if (jjte002 instanceof RuntimeException JavaDoc) {
961               {if (true) throw (RuntimeException JavaDoc)jjte002;}
962             }
963             if (jjte002 instanceof ParseException) {
964               {if (true) throw (ParseException)jjte002;}
965             }
966             {if (true) throw (Error JavaDoc)jjte002;}
967         } finally {
968             if (jjtc002) {
969               jjtree.closeNodeScope(jjtn002, 2);
970             }
971         }
972         break;
973       default:
974         jj_la1[21] = jj_gen;
975         jj_consume_token(-1);
976         throw new ParseException();
977       }
978       break;
979     default:
980       jj_la1[22] = jj_gen;
981       ;
982     }
983   }
984
985   final public void RelationalExpression() throws ParseException {
986     NumericExpression();
987     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
988     case GT:
989     case LT:
990     case LE:
991     case GE:
992       switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
993       case LT:
994         jj_consume_token(LT);
995            Q_LessThan jjtn001 = new Q_LessThan(JJTLESSTHAN);
996            boolean jjtc001 = true;
997            jjtree.openNodeScope(jjtn001);
998         try {
999           NumericExpression();
1000        } catch (Throwable JavaDoc jjte001) {
1001           if (jjtc001) {
1002             jjtree.clearNodeScope(jjtn001);
1003             jjtc001 = false;
1004           } else {
1005             jjtree.popNode();
1006           }
1007           if (jjte001 instanceof RuntimeException JavaDoc) {
1008             {if (true) throw (RuntimeException JavaDoc)jjte001;}
1009           }
1010           if (jjte001 instanceof ParseException) {
1011             {if (true) throw (ParseException)jjte001;}
1012           }
1013           {if (true) throw (Error JavaDoc)jjte001;}
1014        } finally {
1015           if (jjtc001) {
1016             jjtree.closeNodeScope(jjtn001, 2);
1017           }
1018        }
1019        break;
1020      case GT:
1021        jj_consume_token(GT);
1022           Q_GreaterThan jjtn002 = new Q_GreaterThan(JJTGREATERTHAN);
1023           boolean jjtc002 = true;
1024           jjtree.openNodeScope(jjtn002);
1025        try {
1026          NumericExpression();
1027        } catch (Throwable JavaDoc jjte002) {
1028           if (jjtc002) {
1029             jjtree.clearNodeScope(jjtn002);
1030             jjtc002 = false;
1031           } else {
1032             jjtree.popNode();
1033           }
1034           if (jjte002 instanceof RuntimeException JavaDoc) {
1035             {if (true) throw (RuntimeException JavaDoc)jjte002;}
1036           }
1037           if (jjte002 instanceof ParseException) {
1038             {if (true) throw (ParseException)jjte002;}
1039           }
1040           {if (true) throw (Error JavaDoc)jjte002;}
1041        } finally {
1042           if (jjtc002) {
1043             jjtree.closeNodeScope(jjtn002, 2);
1044           }
1045        }
1046        break;
1047      case LE:
1048        jj_consume_token(LE);
1049           Q_LessThanOrEqual jjtn003 = new Q_LessThanOrEqual(JJTLESSTHANOREQUAL);
1050           boolean jjtc003 = true;
1051           jjtree.openNodeScope(jjtn003);
1052        try {
1053          NumericExpression();
1054        } catch (Throwable JavaDoc jjte003) {
1055           if (jjtc003) {
1056             jjtree.clearNodeScope(jjtn003);
1057             jjtc003 = false;
1058           } else {
1059             jjtree.popNode();
1060           }
1061           if (jjte003 instanceof RuntimeException JavaDoc) {
1062             {if (true) throw (RuntimeException JavaDoc)jjte003;}
1063           }
1064           if (jjte003 instanceof ParseException) {
1065             {if (true) throw (ParseException)jjte003;}
1066           }
1067           {if (true) throw (Error JavaDoc)jjte003;}
1068        } finally {
1069           if (jjtc003) {
1070             jjtree.closeNodeScope(jjtn003, 2);
1071           }
1072        }
1073        break;
1074      case GE:
1075        jj_consume_token(GE);
1076           Q_GreaterThanOrEqual jjtn004 = new Q_GreaterThanOrEqual(JJTGREATERTHANOREQUAL);
1077           boolean jjtc004 = true;
1078           jjtree.openNodeScope(jjtn004);
1079        try {
1080          NumericExpression();
1081        } catch (Throwable JavaDoc jjte004) {
1082           if (jjtc004) {
1083             jjtree.clearNodeScope(jjtn004);
1084             jjtc004 = false;
1085           } else {
1086             jjtree.popNode();
1087           }
1088           if (jjte004 instanceof RuntimeException JavaDoc) {
1089             {if (true) throw (RuntimeException JavaDoc)jjte004;}
1090           }
1091           if (jjte004 instanceof ParseException) {
1092             {if (true) throw (ParseException)jjte004;}
1093           }
1094           {if (true) throw (Error JavaDoc)jjte004;}
1095        } finally {
1096           if (jjtc004) {
1097             jjtree.closeNodeScope(jjtn004, 2);
1098           }
1099        }
1100        break;
1101      default:
1102        jj_la1[23] = jj_gen;
1103        jj_consume_token(-1);
1104        throw new ParseException();
1105      }
1106      break;
1107    default:
1108      jj_la1[24] = jj_gen;
1109      ;
1110    }
1111  }
1112
1113/******************************************************************/
1114
1115// **** Debug point
1116
final public void NumericExpression() throws ParseException {
1117    ShiftExpression();
1118  }
1119
1120  final public void ShiftExpression() throws ParseException {
1121    AdditiveExpression();
1122    label_12:
1123    while (true) {
1124      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1125      case LSHIFT:
1126      case RSIGNEDSHIFT:
1127      case RUNSIGNEDSHIFT:
1128        ;
1129        break;
1130      default:
1131        jj_la1[25] = jj_gen;
1132        break label_12;
1133      }
1134      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1135      case LSHIFT:
1136        jj_consume_token(LSHIFT);
1137               Q_LeftShift jjtn001 = new Q_LeftShift(JJTLEFTSHIFT);
1138               boolean jjtc001 = true;
1139               jjtree.openNodeScope(jjtn001);
1140        try {
1141          AdditiveExpression();
1142        } catch (Throwable JavaDoc jjte001) {
1143               if (jjtc001) {
1144                 jjtree.clearNodeScope(jjtn001);
1145                 jjtc001 = false;
1146               } else {
1147                 jjtree.popNode();
1148               }
1149               if (jjte001 instanceof RuntimeException JavaDoc) {
1150                 {if (true) throw (RuntimeException JavaDoc)jjte001;}
1151               }
1152               if (jjte001 instanceof ParseException) {
1153                 {if (true) throw (ParseException)jjte001;}
1154               }
1155               {if (true) throw (Error JavaDoc)jjte001;}
1156        } finally {
1157               if (jjtc001) {
1158                 jjtree.closeNodeScope(jjtn001, 2);
1159               }
1160        }
1161        break;
1162      case RSIGNEDSHIFT:
1163        jj_consume_token(RSIGNEDSHIFT);
1164                     Q_RightSignedShift jjtn002 = new Q_RightSignedShift(JJTRIGHTSIGNEDSHIFT);
1165                     boolean jjtc002 = true;
1166                     jjtree.openNodeScope(jjtn002);
1167        try {
1168          AdditiveExpression();
1169        } catch (Throwable JavaDoc jjte002) {
1170                     if (jjtc002) {
1171                       jjtree.clearNodeScope(jjtn002);
1172                       jjtc002 = false;
1173                     } else {
1174                       jjtree.popNode();
1175                     }
1176                     if (jjte002 instanceof RuntimeException JavaDoc) {
1177                       {if (true) throw (RuntimeException JavaDoc)jjte002;}
1178                     }
1179                     if (jjte002 instanceof ParseException) {
1180                       {if (true) throw (ParseException)jjte002;}
1181                     }
1182                     {if (true) throw (Error JavaDoc)jjte002;}
1183        } finally {
1184                     if (jjtc002) {
1185                       jjtree.closeNodeScope(jjtn002, 2);
1186                     }
1187        }
1188        break;
1189      case RUNSIGNEDSHIFT:
1190        jj_consume_token(RUNSIGNEDSHIFT);
1191                       Q_RightUnsignedShift jjtn003 = new Q_RightUnsignedShift(JJTRIGHTUNSIGNEDSHIFT);
1192                       boolean jjtc003 = true;
1193                       jjtree.openNodeScope(jjtn003);
1194        try {
1195          AdditiveExpression();
1196        } catch (Throwable JavaDoc jjte003) {
1197                       if (jjtc003) {
1198                         jjtree.clearNodeScope(jjtn003);
1199                         jjtc003 = false;
1200                       } else {
1201                         jjtree.popNode();
1202                       }
1203                       if (jjte003 instanceof RuntimeException JavaDoc) {
1204                         {if (true) throw (RuntimeException JavaDoc)jjte003;}
1205                       }
1206                       if (jjte003 instanceof ParseException) {
1207                         {if (true) throw (ParseException)jjte003;}
1208                       }
1209                       {if (true) throw (Error JavaDoc)jjte003;}
1210        } finally {
1211                       if (jjtc003) {
1212                         jjtree.closeNodeScope(jjtn003, 2);
1213                       }
1214        }
1215        break;
1216      default:
1217        jj_la1[26] = jj_gen;
1218        jj_consume_token(-1);
1219        throw new ParseException();
1220      }
1221    }
1222  }
1223
1224  final public void AdditiveExpression() throws ParseException {
1225    MultiplicativeExpression();
1226    label_13:
1227    while (true) {
1228      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1229      case PLUS:
1230      case MINUS:
1231        ;
1232        break;
1233      default:
1234        jj_la1[27] = jj_gen;
1235        break label_13;
1236      }
1237      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1238      case PLUS:
1239        jj_consume_token(PLUS);
1240             Q_Add jjtn001 = new Q_Add(JJTADD);
1241             boolean jjtc001 = true;
1242             jjtree.openNodeScope(jjtn001);
1243        try {
1244          MultiplicativeExpression();
1245        } catch (Throwable JavaDoc jjte001) {
1246             if (jjtc001) {
1247               jjtree.clearNodeScope(jjtn001);
1248               jjtc001 = false;
1249             } else {
1250               jjtree.popNode();
1251             }
1252             if (jjte001 instanceof RuntimeException JavaDoc) {
1253               {if (true) throw (RuntimeException JavaDoc)jjte001;}
1254             }
1255             if (jjte001 instanceof ParseException) {
1256               {if (true) throw (ParseException)jjte001;}
1257             }
1258             {if (true) throw (Error JavaDoc)jjte001;}
1259        } finally {
1260             if (jjtc001) {
1261               jjtree.closeNodeScope(jjtn001, 2);
1262             }
1263        }
1264        break;
1265      case MINUS:
1266        jj_consume_token(MINUS);
1267              Q_Subtract jjtn002 = new Q_Subtract(JJTSUBTRACT);
1268              boolean jjtc002 = true;
1269              jjtree.openNodeScope(jjtn002);
1270        try {
1271          MultiplicativeExpression();
1272        } catch (Throwable JavaDoc jjte002) {
1273              if (jjtc002) {
1274                jjtree.clearNodeScope(jjtn002);
1275                jjtc002 = false;
1276              } else {
1277                jjtree.popNode();
1278              }
1279              if (jjte002 instanceof RuntimeException JavaDoc) {
1280                {if (true) throw (RuntimeException JavaDoc)jjte002;}
1281              }
1282              if (jjte002 instanceof ParseException) {
1283                {if (true) throw (ParseException)jjte002;}
1284              }
1285              {if (true) throw (Error JavaDoc)jjte002;}
1286        } finally {
1287              if (jjtc002) {
1288                jjtree.closeNodeScope(jjtn002, 2);
1289              }
1290        }
1291        break;
1292      default:
1293        jj_la1[28] = jj_gen;
1294        jj_consume_token(-1);
1295        throw new ParseException();
1296      }
1297    }
1298  }
1299
1300  final public void MultiplicativeExpression() throws ParseException {
1301    UnaryExpression();
1302    label_14:
1303    while (true) {
1304      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1305      case STAR:
1306      case SLASH:
1307      case REM:
1308        ;
1309        break;
1310      default:
1311        jj_la1[29] = jj_gen;
1312        break label_14;
1313      }
1314      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1315      case STAR:
1316        jj_consume_token(STAR);
1317              Q_Multiply jjtn001 = new Q_Multiply(JJTMULTIPLY);
1318              boolean jjtc001 = true;
1319              jjtree.openNodeScope(jjtn001);
1320        try {
1321          UnaryExpression();
1322        } catch (Throwable JavaDoc jjte001) {
1323              if (jjtc001) {
1324                jjtree.clearNodeScope(jjtn001);
1325                jjtc001 = false;
1326              } else {
1327                jjtree.popNode();
1328              }
1329              if (jjte001 instanceof RuntimeException JavaDoc) {
1330                {if (true) throw (RuntimeException JavaDoc)jjte001;}
1331              }
1332              if (jjte001 instanceof ParseException) {
1333                {if (true) throw (ParseException)jjte001;}
1334              }
1335              {if (true) throw (Error JavaDoc)jjte001;}
1336        } finally {
1337              if (jjtc001) {
1338                jjtree.closeNodeScope(jjtn001, 2);
1339              }
1340        }
1341        break;
1342      case SLASH:
1343        jj_consume_token(SLASH);
1344              Q_Divide jjtn002 = new Q_Divide(JJTDIVIDE);
1345              boolean jjtc002 = true;
1346              jjtree.openNodeScope(jjtn002);
1347        try {
1348          UnaryExpression();
1349        } catch (Throwable JavaDoc jjte002) {
1350              if (jjtc002) {
1351                jjtree.clearNodeScope(jjtn002);
1352                jjtc002 = false;
1353              } else {
1354                jjtree.popNode();
1355              }
1356              if (jjte002 instanceof RuntimeException JavaDoc) {
1357                {if (true) throw (RuntimeException JavaDoc)jjte002;}
1358              }
1359              if (jjte002 instanceof ParseException) {
1360                {if (true) throw (ParseException)jjte002;}
1361              }
1362              {if (true) throw (Error JavaDoc)jjte002;}
1363        } finally {
1364              if (jjtc002) {
1365                jjtree.closeNodeScope(jjtn002, 2);
1366              }
1367        }
1368        break;
1369      case REM:
1370        jj_consume_token(REM);
1371              Q_Modulus jjtn003 = new Q_Modulus(JJTMODULUS);
1372              boolean jjtc003 = true;
1373              jjtree.openNodeScope(jjtn003);
1374        try {
1375          UnaryExpression();
1376        } catch (Throwable JavaDoc jjte003) {
1377              if (jjtc003) {
1378                jjtree.clearNodeScope(jjtn003);
1379                jjtc003 = false;
1380              } else {
1381                jjtree.popNode();
1382              }
1383              if (jjte003 instanceof RuntimeException JavaDoc) {
1384                {if (true) throw (RuntimeException JavaDoc)jjte003;}
1385              }
1386              if (jjte003 instanceof ParseException) {
1387                {if (true) throw (ParseException)jjte003;}
1388              }
1389              {if (true) throw (Error JavaDoc)jjte003;}
1390        } finally {
1391              if (jjtc003) {
1392                jjtree.closeNodeScope(jjtn003, 2);
1393              }
1394        }
1395        break;
1396      default:
1397        jj_la1[30] = jj_gen;
1398        jj_consume_token(-1);
1399        throw new ParseException();
1400      }
1401    }
1402  }
1403
1404  final public void UnaryExpression() throws ParseException {
1405    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1406    case INTEGER_LITERAL:
1407    case FLOATING_POINT_LITERAL:
1408    case STRING_LITERAL1:
1409    case STRING_LITERAL2:
1410    case SELECT:
1411    case SOURCE:
1412    case FROM:
1413    case WHERE:
1414    case SUCHTHAT:
1415    case PREFIXES:
1416    case FOR:
1417    case STR_EQ:
1418    case STR_NE:
1419    case BOOLEAN_LITERAL:
1420    case NULL_LITERAL:
1421    case NCName:
1422    case LPAREN:
1423    case LT:
1424    case BANG:
1425    case TILDE:
1426    case HOOK:
1427      UnaryExpressionNotPlusMinus();
1428      break;
1429    case PLUS:
1430    case MINUS:
1431      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1432      case PLUS:
1433        jj_consume_token(PLUS);
1434              Q_UnaryPlus jjtn001 = new Q_UnaryPlus(JJTUNARYPLUS);
1435              boolean jjtc001 = true;
1436              jjtree.openNodeScope(jjtn001);
1437        try {
1438          UnaryExpression();
1439        } catch (Throwable JavaDoc jjte001) {
1440              if (jjtc001) {
1441                jjtree.clearNodeScope(jjtn001);
1442                jjtc001 = false;
1443              } else {
1444                jjtree.popNode();
1445              }
1446              if (jjte001 instanceof RuntimeException JavaDoc) {
1447                {if (true) throw (RuntimeException JavaDoc)jjte001;}
1448              }
1449              if (jjte001 instanceof ParseException) {
1450                {if (true) throw (ParseException)jjte001;}
1451              }
1452              {if (true) throw (Error JavaDoc)jjte001;}
1453        } finally {
1454              if (jjtc001) {
1455                jjtree.closeNodeScope(jjtn001, 1);
1456              }
1457        }
1458        break;
1459      case MINUS:
1460        jj_consume_token(MINUS);
1461              Q_UnaryMinus jjtn002 = new Q_UnaryMinus(JJTUNARYMINUS);
1462              boolean jjtc002 = true;
1463              jjtree.openNodeScope(jjtn002);
1464        try {
1465          UnaryExpression();
1466        } catch (Throwable JavaDoc jjte002) {
1467              if (jjtc002) {
1468                jjtree.clearNodeScope(jjtn002);
1469                jjtc002 = false;
1470              } else {
1471                jjtree.popNode();
1472              }
1473              if (jjte002 instanceof RuntimeException JavaDoc) {
1474                {if (true) throw (RuntimeException JavaDoc)jjte002;}
1475              }
1476              if (jjte002 instanceof ParseException) {
1477                {if (true) throw (ParseException)jjte002;}
1478              }
1479              {if (true) throw (Error JavaDoc)jjte002;}
1480        } finally {
1481              if (jjtc002) {
1482                jjtree.closeNodeScope(jjtn002, 1);
1483              }
1484        }
1485        break;
1486      default:
1487        jj_la1[31] = jj_gen;
1488        jj_consume_token(-1);
1489        throw new ParseException();
1490      }
1491      break;
1492    default:
1493      jj_la1[32] = jj_gen;
1494      jj_consume_token(-1);
1495      throw new ParseException();
1496    }
1497  }
1498
1499  final public void UnaryExpressionNotPlusMinus() throws ParseException {
1500    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1501    case BANG:
1502    case TILDE:
1503      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1504      case TILDE:
1505        jj_consume_token(TILDE);
1506        break;
1507      case BANG:
1508        jj_consume_token(BANG);
1509        break;
1510      default:
1511        jj_la1[33] = jj_gen;
1512        jj_consume_token(-1);
1513        throw new ParseException();
1514      }
1515                         Q_UnaryNot jjtn001 = new Q_UnaryNot(JJTUNARYNOT);
1516                         boolean jjtc001 = true;
1517                         jjtree.openNodeScope(jjtn001);
1518      try {
1519        UnaryExpression();
1520      } catch (Throwable JavaDoc jjte001) {
1521                         if (jjtc001) {
1522                           jjtree.clearNodeScope(jjtn001);
1523                           jjtc001 = false;
1524                         } else {
1525                           jjtree.popNode();
1526                         }
1527                         if (jjte001 instanceof RuntimeException JavaDoc) {
1528                           {if (true) throw (RuntimeException JavaDoc)jjte001;}
1529                         }
1530                         if (jjte001 instanceof ParseException) {
1531                           {if (true) throw (ParseException)jjte001;}
1532                         }
1533                         {if (true) throw (Error JavaDoc)jjte001;}
1534      } finally {
1535                         if (jjtc001) {
1536                           jjtree.closeNodeScope(jjtn001, 1);
1537                         }
1538      }
1539      break;
1540    case INTEGER_LITERAL:
1541    case FLOATING_POINT_LITERAL:
1542    case STRING_LITERAL1:
1543    case STRING_LITERAL2:
1544    case SELECT:
1545    case SOURCE:
1546    case FROM:
1547    case WHERE:
1548    case SUCHTHAT:
1549    case PREFIXES:
1550    case FOR:
1551    case STR_EQ:
1552    case STR_NE:
1553    case BOOLEAN_LITERAL:
1554    case NULL_LITERAL:
1555    case NCName:
1556    case LPAREN:
1557    case LT:
1558    case HOOK:
1559      PrimaryExpression();
1560      break;
1561    default:
1562      jj_la1[34] = jj_gen;
1563      jj_consume_token(-1);
1564      throw new ParseException();
1565    }
1566  }
1567
1568  final public void PrimaryExpression() throws ParseException {
1569    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1570    case HOOK:
1571      Var();
1572      break;
1573    case INTEGER_LITERAL:
1574    case FLOATING_POINT_LITERAL:
1575    case STRING_LITERAL1:
1576    case STRING_LITERAL2:
1577    case SELECT:
1578    case SOURCE:
1579    case FROM:
1580    case WHERE:
1581    case SUCHTHAT:
1582    case PREFIXES:
1583    case FOR:
1584    case STR_EQ:
1585    case STR_NE:
1586    case BOOLEAN_LITERAL:
1587    case NULL_LITERAL:
1588    case NCName:
1589    case LT:
1590      Literal();
1591      break;
1592    case LPAREN:
1593      jj_consume_token(LPAREN);
1594      Expression();
1595      jj_consume_token(RPAREN);
1596      break;
1597    default:
1598      jj_la1[35] = jj_gen;
1599      jj_consume_token(-1);
1600      throw new ParseException();
1601    }
1602  }
1603
1604// void FunctionCall() :
1605
// {}
1606
// {
1607
// Identifier() <LPAREN> ArgList() <RPAREN>
1608
// }
1609
//
1610
// void ArgList() :
1611
// {}
1612
// {
1613
// VarOrLiteral() (<COMMA> VarOrLiteral() ) *
1614
// }
1615

1616
1617/******************************************************************/
1618// Literals (as in query literls - any value in the query
1619
// Not "RDF literals".
1620
final public void Literal() throws ParseException {
1621    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1622    case SELECT:
1623    case SOURCE:
1624    case FROM:
1625    case WHERE:
1626    case SUCHTHAT:
1627    case PREFIXES:
1628    case FOR:
1629    case STR_EQ:
1630    case STR_NE:
1631    case NCName:
1632    case LT:
1633      URI();
1634      break;
1635    case INTEGER_LITERAL:
1636    case FLOATING_POINT_LITERAL:
1637      NumericLiteral();
1638      break;
1639    case STRING_LITERAL1:
1640    case STRING_LITERAL2:
1641      TextLiteral();
1642      break;
1643    case BOOLEAN_LITERAL:
1644      BooleanLiteral();
1645      break;
1646    case NULL_LITERAL:
1647      NullLiteral();
1648      break;
1649    default:
1650      jj_la1[36] = jj_gen;
1651      jj_consume_token(-1);
1652      throw new ParseException();
1653    }
1654  }
1655
1656  final public void NumericLiteral() throws ParseException {
1657 /*@bgen(jjtree) NumericLiteral */
1658  Q_NumericLiteral jjtn000 = new Q_NumericLiteral(JJTNUMERICLITERAL);
1659  boolean jjtc000 = true;
1660  jjtree.openNodeScope(jjtn000);Token t;
1661    try {
1662      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1663      case INTEGER_LITERAL:
1664        t = jj_consume_token(INTEGER_LITERAL);
1665                          jjtree.closeNodeScope(jjtn000, true);
1666                          jjtc000 = false;
1667                          jjtn000.set(true, t.image) ;
1668        break;
1669      case FLOATING_POINT_LITERAL:
1670        t = jj_consume_token(FLOATING_POINT_LITERAL);
1671                                 jjtree.closeNodeScope(jjtn000, true);
1672                                 jjtc000 = false;
1673                                 jjtn000.set(false, t.image) ;
1674        break;
1675      default:
1676        jj_la1[37] = jj_gen;
1677        jj_consume_token(-1);
1678        throw new ParseException();
1679      }
1680    } finally {
1681    if (jjtc000) {
1682      jjtree.closeNodeScope(jjtn000, true);
1683    }
1684    }
1685  }
1686
1687  final public void TextLiteral() throws ParseException {
1688 /*@bgen(jjtree) TextLiteral */
1689  Q_TextLiteral jjtn000 = new Q_TextLiteral(JJTTEXTLITERAL);
1690  boolean jjtc000 = true;
1691  jjtree.openNodeScope(jjtn000);Token t ;
1692    try {
1693      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1694      case STRING_LITERAL1:
1695        t = jj_consume_token(STRING_LITERAL1);
1696                            jjtn000.set(t.image) ;
1697        break;
1698      case STRING_LITERAL2:
1699        t = jj_consume_token(STRING_LITERAL2);
1700                            jjtn000.set(t.image) ;
1701        break;
1702      default:
1703        jj_la1[38] = jj_gen;
1704        jj_consume_token(-1);
1705        throw new ParseException();
1706      }
1707      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1708      case AT:
1709        jj_consume_token(AT);
1710        Identifier();
1711        break;
1712      default:
1713        jj_la1[39] = jj_gen;
1714        ;
1715      }
1716      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1717      case DATATYPE:
1718        jj_consume_token(DATATYPE);
1719        URI();
1720        break;
1721      default:
1722        jj_la1[40] = jj_gen;
1723        ;
1724      }
1725    } catch (Throwable JavaDoc jjte000) {
1726    if (jjtc000) {
1727      jjtree.clearNodeScope(jjtn000);
1728      jjtc000 = false;
1729    } else {
1730      jjtree.popNode();
1731    }
1732    if (jjte000 instanceof RuntimeException JavaDoc) {
1733      {if (true) throw (RuntimeException JavaDoc)jjte000;}
1734    }
1735    if (jjte000 instanceof ParseException) {
1736      {if (true) throw (ParseException)jjte000;}
1737    }
1738    {if (true) throw (Error JavaDoc)jjte000;}
1739    } finally {
1740    if (jjtc000) {
1741      jjtree.closeNodeScope(jjtn000, true);
1742    }
1743    }
1744  }
1745
1746  final public void TextLiteral2() throws ParseException {
1747 /*@bgen(jjtree) TextLiteral2 */
1748  Q_TextLiteral2 jjtn000 = new Q_TextLiteral2(JJTTEXTLITERAL2);
1749  boolean jjtc000 = true;
1750  jjtree.openNodeScope(jjtn000);Token t ;
1751    try {
1752      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1753      case STRING_LITERAL1:
1754        t = jj_consume_token(STRING_LITERAL1);
1755                            jjtree.closeNodeScope(jjtn000, true);
1756                            jjtc000 = false;
1757                            jjtn000.set(t.image) ;
1758        break;
1759      case STRING_LITERAL2:
1760        t = jj_consume_token(STRING_LITERAL2);
1761                            jjtree.closeNodeScope(jjtn000, true);
1762                            jjtc000 = false;
1763                            jjtn000.set(t.image) ;
1764        break;
1765      default:
1766        jj_la1[41] = jj_gen;
1767        jj_consume_token(-1);
1768        throw new ParseException();
1769      }
1770    } finally {
1771    if (jjtc000) {
1772      jjtree.closeNodeScope(jjtn000, true);
1773    }
1774    }
1775  }
1776
1777//<READ_REGEX> SKIP : { " " | "\t" | "\n" | "\r" | "\f" }
1778
final public void PatternLiteral() throws ParseException {
1779 /*@bgen(jjtree) PatternLiteral */
1780  Q_PatternLiteral jjtn000 = new Q_PatternLiteral(JJTPATTERNLITERAL);
1781  boolean jjtc000 = true;
1782  jjtree.openNodeScope(jjtn000);Token t ;
1783  Token mtoken ;
1784  char marker ;
1785  int state = 0 ;
1786    try {
1787    state = token_source.curLexState ;
1788    token_source.SwitchTo(READ_REGEX) ;
1789    jjtree.closeNodeScope(jjtn000, true);
1790    jjtc000 = false;
1791      while(true)
1792      {
1793          t = getNextToken() ;
1794          if ( t.kind == EOF )
1795              {if (true) throw new Error JavaDoc("End of file: expecting the start of a regular expression") ;}
1796          marker = t.image.charAt(0) ;
1797          // Skip whitespace
1798
if ( marker != ' ' && marker != '\n' &&
1799               marker != '\t' && marker != '\r' &&
1800               marker != '\f' )
1801              break ;
1802      }
1803      if ( marker != '/' )
1804      {
1805          if ( marker == 'm' )
1806          {
1807              //marker = jj_input_stream.readChar() ;
1808
t = getNextToken() ;
1809              marker = t.image.charAt(0) ;
1810          }
1811          else
1812          {
1813              if ( marker == '"' || marker == '\'' )
1814                  // Does not start m, and does start with " or '
1815
{if (true) throw new Error JavaDoc("Invalid regular expression (starts with ["+marker+"]) at line " +
1816                      t.beginLine + " column " + t.beginColumn + ".");}
1817          }
1818          // Sanity check - delimiter isn't an alphanumeric
1819
if ( Character.isLetterOrDigit(marker) )
1820              {if (true) throw new Error JavaDoc("Invalid start to regular expression at line " +
1821                              t.beginLine + " column " + t.beginColumn + ".");}
1822      }
1823      String JavaDoc patternString = "" ;
1824      boolean inEscape = false ;
1825      while(true)
1826      {
1827          char ch ;
1828          t = getNextToken() ;
1829          if ( t.kind == EOF )
1830              {if (true) throw new Error JavaDoc("End of file during regular expression") ;}
1831          ch = t.image.charAt(0) ;
1832
1833          if ( ch == '\n' || ch == '\r' || ch == '\f' )
1834              {if (true) throw new Error JavaDoc("Invalid regular expression at line " +
1835                              t.beginLine + " column " + t.beginColumn + ".");}
1836          if ( inEscape )
1837          {
1838              if ( ch == 'n' ) ch = '\n' ;
1839              if ( ch == 't' ) ch = '\t' ;
1840              if ( ch == 'r' ) ch = '\r' ;
1841              if ( ch == 'b' ) ch = '\b' ;
1842
1843              // But if we are escaping a character that is regex significant,
1844
// leave in the esacape.
1845
if ( ch != marker )
1846                  patternString = patternString + '\\' ;
1847
1848              inEscape = false ;
1849          }
1850          else
1851          {
1852              // Escape?
1853
if ( ch == '\\' )
1854              {
1855                  inEscape = true ;
1856                  continue ;
1857              }
1858              if ( ch == marker )
1859                  break ;
1860
1861          }
1862          patternString = patternString + ch ;
1863      }
1864      // Read modifiers
1865
String JavaDoc modifiers = "" ;
1866      while(true)
1867      {
1868          char ch ;
1869          // End of file possible.
1870
t = getNextToken() ;
1871          if ( t.kind == EOF )
1872              break ;
1873          ch = t.image.charAt(0) ;
1874
1875          if ( ch == 'i' || ch == 'm' || ch == 's' || ch == 'x' )
1876              modifiers = modifiers + ch ;
1877          else
1878          {
1879              jj_input_stream.backup(1) ;
1880              break ;
1881          }
1882      }
1883
1884      token_source.SwitchTo(state) ;
1885      jjtn000.setPattern(patternString) ;
1886      if ( modifiers.length() > 0 )
1887          jjtn000.setModifiers(modifiers) ;
1888    } finally {
1889    if (jjtc000) {
1890      jjtree.closeNodeScope(jjtn000, true);
1891    }
1892    }
1893  }
1894
1895  final public void BooleanLiteral() throws ParseException {
1896 /*@bgen(jjtree) BooleanLiteral */
1897  Q_BooleanLiteral jjtn000 = new Q_BooleanLiteral(JJTBOOLEANLITERAL);
1898  boolean jjtc000 = true;
1899  jjtree.openNodeScope(jjtn000);Token t ;
1900    try {
1901      t = jj_consume_token(BOOLEAN_LITERAL);
1902                           jjtree.closeNodeScope(jjtn000, true);
1903                           jjtc000 = false;
1904                           jjtn000.set(t.image) ;
1905    } finally {
1906    if (jjtc000) {
1907      jjtree.closeNodeScope(jjtn000, true);
1908    }
1909    }
1910  }
1911
1912  final public void NullLiteral() throws ParseException {
1913 /*@bgen(jjtree) NullLiteral */
1914  Q_NullLiteral jjtn000 = new Q_NullLiteral(JJTNULLLITERAL);
1915  boolean jjtc000 = true;
1916  jjtree.openNodeScope(jjtn000);
1917    try {
1918      jj_consume_token(NULL_LITERAL);
1919    } finally {
1920    if (jjtc000) {
1921      jjtree.closeNodeScope(jjtn000, true);
1922    }
1923    }
1924  }
1925
1926  final public void URL() throws ParseException {
1927 /*@bgen(jjtree) URL */
1928  Q_URL jjtn000 = new Q_URL(JJTURL);
1929  boolean jjtc000 = true;
1930  jjtree.openNodeScope(jjtn000);
1931    try {
1932      QuotedURI();
1933    } catch (Throwable JavaDoc jjte000) {
1934    if (jjtc000) {
1935      jjtree.clearNodeScope(jjtn000);
1936      jjtc000 = false;
1937    } else {
1938      jjtree.popNode();
1939    }
1940    if (jjte000 instanceof RuntimeException JavaDoc) {
1941      {if (true) throw (RuntimeException JavaDoc)jjte000;}
1942    }
1943    if (jjte000 instanceof ParseException) {
1944      {if (true) throw (ParseException)jjte000;}
1945    }
1946    {if (true) throw (Error JavaDoc)jjte000;}
1947    } finally {
1948    if (jjtc000) {
1949      jjtree.closeNodeScope(jjtn000, true);
1950    }
1951    }
1952  }
1953
1954  final public void URI() throws ParseException {
1955    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
1956    case LT:
1957      QuotedURI();
1958      break;
1959    case SELECT:
1960    case SOURCE:
1961    case FROM:
1962    case WHERE:
1963    case SUCHTHAT:
1964    case PREFIXES:
1965    case FOR:
1966    case STR_EQ:
1967    case STR_NE:
1968    case NCName:
1969      QName();
1970      break;
1971    default:
1972      jj_la1[42] = jj_gen;
1973      jj_consume_token(-1);
1974      throw new ParseException();
1975    }
1976  }
1977
1978  final public void QName() throws ParseException {
1979 /*@bgen(jjtree) QName */
1980  Q_QName jjtn000 = new Q_QName(JJTQNAME);
1981  boolean jjtc000 = true;
1982  jjtree.openNodeScope(jjtn000);Token t1, t2 ;
1983    try {
1984      Identifier();
1985      t1 = token ;
1986      jj_consume_token(COLON);
1987      if (jj_2_2(2)) {
1988        Identifier();
1989      } else {
1990        ;
1991      }
1992      jjtree.closeNodeScope(jjtn000, true);
1993      jjtc000 = false;
1994      t2 = token ;
1995      jjtn000.set(t1.image+":"+t2.image) ;
1996    } catch (Throwable JavaDoc jjte000) {
1997      if (jjtc000) {
1998        jjtree.clearNodeScope(jjtn000);
1999        jjtc000 = false;
2000      } else {
2001        jjtree.popNode();
2002      }
2003      if (jjte000 instanceof RuntimeException JavaDoc) {
2004        {if (true) throw (RuntimeException JavaDoc)jjte000;}
2005      }
2006      if (jjte000 instanceof ParseException) {
2007        {if (true) throw (ParseException)jjte000;}
2008      }
2009      {if (true) throw (Error JavaDoc)jjte000;}
2010    } finally {
2011      if (jjtc000) {
2012        jjtree.closeNodeScope(jjtn000, true);
2013      }
2014    }
2015  }
2016
2017  final public void QuotedURI() throws ParseException {
2018 /*@bgen(jjtree) QuotedURI */
2019  Q_QuotedURI jjtn000 = new Q_QuotedURI(JJTQUOTEDURI);
2020  boolean jjtc000 = true;
2021  jjtree.openNodeScope(jjtn000);Token tt = null ;
2022  int state = 0 ;
2023    try {
2024      jj_consume_token(LT);
2025    state = token_source.curLexState ;
2026    token_source.SwitchTo(READ_URI) ;
2027      tt = jj_consume_token(URI);
2028    jjtn000.set(tt.image) ;
2029    token_source.SwitchTo(state) ;
2030      jj_consume_token(GT);
2031    } finally {
2032    if (jjtc000) {
2033      jjtree.closeNodeScope(jjtn000, true);
2034    }
2035    }
2036  }
2037
2038// Need to generalise this to include leading digits
2039
// That is, the second part of an NCName expressions
2040
final public void Identifier() throws ParseException {
2041 /*@bgen(jjtree) Identifier */
2042  Q_Identifier jjtn000 = new Q_Identifier(JJTIDENTIFIER);
2043  boolean jjtc000 = true;
2044  jjtree.openNodeScope(jjtn000);
2045    try {
2046      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
2047      case NCName:
2048        jj_consume_token(NCName);
2049        break;
2050      case SELECT:
2051        jj_consume_token(SELECT);
2052        break;
2053      case SOURCE:
2054        jj_consume_token(SOURCE);
2055        break;
2056      case FROM:
2057        jj_consume_token(FROM);
2058        break;
2059      case WHERE:
2060        jj_consume_token(WHERE);
2061        break;
2062      case SUCHTHAT:
2063        jj_consume_token(SUCHTHAT);
2064        break;
2065      case PREFIXES:
2066        jj_consume_token(PREFIXES);
2067        break;
2068      case FOR:
2069        jj_consume_token(FOR);
2070        break;
2071      case STR_EQ:
2072        jj_consume_token(STR_EQ);
2073        break;
2074      case STR_NE:
2075        jj_consume_token(STR_NE);
2076        break;
2077      default:
2078        jj_la1[43] = jj_gen;
2079        jj_consume_token(-1);
2080        throw new ParseException();
2081      }
2082    jjtree.closeNodeScope(jjtn000, true);
2083    jjtc000 = false;
2084    jjtn000.set(token.image) ;
2085    } finally {
2086     if (jjtc000) {
2087       jjtree.closeNodeScope(jjtn000, true);
2088     }
2089    }
2090  }
2091
2092  final private boolean jj_2_1(int xla) {
2093    jj_la = xla; jj_lastpos = jj_scanpos = token;
2094    boolean retval = !jj_3_1();
2095    jj_save(0, xla);
2096    return retval;
2097  }
2098
2099  final private boolean jj_2_2(int xla) {
2100    jj_la = xla; jj_lastpos = jj_scanpos = token;
2101    boolean retval = !jj_3_2();
2102    jj_save(1, xla);
2103    return retval;
2104  }
2105
2106  final private boolean jj_3R_20() {
2107    if (jj_scan_token(FROM)) return true;
2108    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2109    return false;
2110  }
2111
2112  final private boolean jj_3R_17() {
2113    if (jj_scan_token(NCName)) return true;
2114    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2115    return false;
2116  }
2117
2118  final private boolean jj_3R_16() {
2119    Token xsp;
2120    xsp = jj_scanpos;
2121    if (jj_3R_17()) {
2122    jj_scanpos = xsp;
2123    if (jj_3R_18()) {
2124    jj_scanpos = xsp;
2125    if (jj_3R_19()) {
2126    jj_scanpos = xsp;
2127    if (jj_3R_20()) {
2128    jj_scanpos = xsp;
2129    if (jj_3R_21()) {
2130    jj_scanpos = xsp;
2131    if (jj_3R_22()) {
2132    jj_scanpos = xsp;
2133    if (jj_3R_23()) {
2134    jj_scanpos = xsp;
2135    if (jj_3R_24()) {
2136    jj_scanpos = xsp;
2137    if (jj_3R_25()) {
2138    jj_scanpos = xsp;
2139    if (jj_3R_26()) return true;
2140    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2141    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2142    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2143    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2144    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2145    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2146    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2147    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2148    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2149    } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2150    return false;
2151  }
2152
2153  final private boolean jj_3R_23() {
2154    if (jj_scan_token(PREFIXES)) return true;
2155    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2156    return false;
2157  }
2158
2159  final private boolean jj_3_2() {
2160    if (jj_3R_16()) return true;
2161    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2162    return false;
2163  }
2164
2165  final private boolean jj_3R_26() {
2166    if (jj_scan_token(STR_NE)) return true;
2167    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2168    return false;
2169  }
2170
2171  final private boolean jj_3_1() {
2172    if (jj_scan_token(SELECT)) return true;
2173    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2174    if (jj_3R_15()) return true;
2175    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2176    return false;
2177  }
2178
2179  final private boolean jj_3R_19() {
2180    if (jj_scan_token(SOURCE)) return true;
2181    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2182    return false;
2183  }
2184
2185  final private boolean jj_3R_21() {
2186    if (jj_scan_token(WHERE)) return true;
2187    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2188    return false;
2189  }
2190
2191  final private boolean jj_3R_24() {
2192    if (jj_scan_token(FOR)) return true;
2193    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2194    return false;
2195  }
2196
2197  final private boolean jj_3R_25() {
2198    if (jj_scan_token(STR_EQ)) return true;
2199    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2200    return false;
2201  }
2202
2203  final private boolean jj_3R_22() {
2204    if (jj_scan_token(SUCHTHAT)) return true;
2205    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2206    return false;
2207  }
2208
2209  final private boolean jj_3R_18() {
2210    if (jj_scan_token(SELECT)) return true;
2211    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2212    return false;
2213  }
2214
2215  final private boolean jj_3R_15() {
2216    if (jj_scan_token(HOOK)) return true;
2217    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
2218    return false;
2219  }
2220
2221  public RDQLParserTokenManager token_source;
2222  JavaCharStream jj_input_stream;
2223  public Token token, jj_nt;
2224  private int jj_ntk;
2225  private Token jj_scanpos, jj_lastpos;
2226  private int jj_la;
2227  public boolean lookingAhead = false;
2228  private boolean jj_semLA;
2229  private int jj_gen;
2230  final private int[] jj_la1 = new int[44];
2231  final private int[] jj_la1_0 = {0x0,0x30000000,0x80000000,0x0,0x0,0x8000000,0x30000000,0x0,0x0,0x80000000,0x80000000,0xf8000000,0xf8690000,0xf8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf8690000,0x0,0xf8690000,0xf8690000,0xf8690000,0x90000,0x600000,0x0,0x0,0x600000,0xf8000000,0xf8000000,};
2232  final private int[] jj_la1_1 = {0x10000,0x0,0x0,0x1,0x810000,0x0,0x0,0x110000,0x10200,0x10000,0x10000,0x90010f,0x90016f,0x1010f,0x20000000,0x40000000,0x1c,0x1c,0x0,0x0,0x0,0x6000000,0x6000000,0x18180000,0x18180000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xf0036f,0x600000,0xf0036f,0x90036f,0x10016f,0x0,0x0,0x0,0x0,0x0,0x10010f,0x10f,};
2233  final private int[] jj_la1_2 = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3000,0x3000,0x40,0x80,0x20,0x0,0x0,0x0,0x0,0xe00,0xe00,0x6,0x6,0x118,0x118,0x6,0x6,0x0,0x0,0x0,0x0,0x0,0x0,0x8000,0x4000,0x0,0x0,0x0,};
2234  final private JJCalls[] jj_2_rtns = new JJCalls[2];
2235  private boolean jj_rescan = false;
2236  private int jj_gc = 0;
2237
2238  public RDQLParser(java.io.InputStream JavaDoc stream) {
2239    jj_input_stream = new JavaCharStream(stream, 1, 1);
2240    token_source = new RDQLParserTokenManager(jj_input_stream);
2241    token = new Token();
2242    jj_ntk = -1;
2243    jj_gen = 0;
2244    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2245    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2246  }
2247
2248  public void ReInit(java.io.InputStream JavaDoc stream) {
2249    jj_input_stream.ReInit(stream, 1, 1);
2250    token_source.ReInit(jj_input_stream);
2251    token = new Token();
2252    jj_ntk = -1;
2253    jjtree.reset();
2254    jj_gen = 0;
2255    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2256    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2257  }
2258
2259  public RDQLParser(java.io.Reader JavaDoc stream) {
2260    jj_input_stream = new JavaCharStream(stream, 1, 1);
2261    token_source = new RDQLParserTokenManager(jj_input_stream);
2262    token = new Token();
2263    jj_ntk = -1;
2264    jj_gen = 0;
2265    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2266    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2267  }
2268
2269  public void ReInit(java.io.Reader JavaDoc stream) {
2270    jj_input_stream.ReInit(stream, 1, 1);
2271    token_source.ReInit(jj_input_stream);
2272    token = new Token();
2273    jj_ntk = -1;
2274    jjtree.reset();
2275    jj_gen = 0;
2276    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2277    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2278  }
2279
2280  public RDQLParser(RDQLParserTokenManager tm) {
2281    token_source = tm;
2282    token = new Token();
2283    jj_ntk = -1;
2284    jj_gen = 0;
2285    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2286    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2287  }
2288
2289  public void ReInit(RDQLParserTokenManager tm) {
2290    token_source = tm;
2291    token = new Token();
2292    jj_ntk = -1;
2293    jjtree.reset();
2294    jj_gen = 0;
2295    for (int i = 0; i < 44; i++) jj_la1[i] = -1;
2296    for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
2297  }
2298
2299  final private Token jj_consume_token(int kind) throws ParseException {
2300    Token oldToken;
2301    if ((oldToken = token).next != null) token = token.next;
2302    else token = token.next = token_source.getNextToken();
2303    jj_ntk = -1;
2304    if (token.kind == kind) {
2305      jj_gen++;
2306      if (++jj_gc > 100) {
2307        jj_gc = 0;
2308        for (int i = 0; i < jj_2_rtns.length; i++) {
2309          JJCalls c = jj_2_rtns[i];
2310          while (c != null) {
2311            if (c.gen < jj_gen) c.first = null;
2312            c = c.next;
2313          }
2314        }
2315      }
2316      return token;
2317    }
2318    token = oldToken;
2319    jj_kind = kind;
2320    throw generateParseException();
2321  }
2322
2323  final private boolean jj_scan_token(int kind) {
2324    if (jj_scanpos == jj_lastpos) {
2325      jj_la--;
2326      if (jj_scanpos.next == null) {
2327        jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
2328      } else {
2329        jj_lastpos = jj_scanpos = jj_scanpos.next;
2330      }
2331    } else {
2332      jj_scanpos = jj_scanpos.next;
2333    }
2334    if (jj_rescan) {
2335      int i = 0; Token tok = token;
2336      while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
2337      if (tok != null) jj_add_error_token(kind, i);
2338    }
2339    return (jj_scanpos.kind != kind);
2340  }
2341
2342  final public Token getNextToken() {
2343    if (token.next != null) token = token.next;
2344    else token = token.next = token_source.getNextToken();
2345    jj_ntk = -1;
2346    jj_gen++;
2347    return token;
2348  }
2349
2350  final public Token getToken(int index) {
2351    Token t = lookingAhead ? jj_scanpos : token;
2352    for (int i = 0; i < index; i++) {
2353      if (t.next != null) t = t.next;
2354      else t = t.next = token_source.getNextToken();
2355    }
2356    return t;
2357  }
2358
2359  final private int jj_ntk() {
2360    if ((jj_nt=token.next) == null)
2361      return (jj_ntk = (token.next=token_source.getNextToken()).kind);
2362    else
2363      return (jj_ntk = jj_nt.kind);
2364  }
2365
2366  private java.util.Vector JavaDoc jj_expentries = new java.util.Vector JavaDoc();
2367  private int[] jj_expentry;
2368  private int jj_kind = -1;
2369  private int[] jj_lasttokens = new int[100];
2370  private int jj_endpos;
2371
2372  private void jj_add_error_token(int kind, int pos) {
2373    if (pos >= 100) return;
2374    if (pos == jj_endpos + 1) {
2375      jj_lasttokens[jj_endpos++] = kind;
2376    } else if (jj_endpos != 0) {
2377      jj_expentry = new int[jj_endpos];
2378      for (int i = 0; i < jj_endpos; i++) {
2379        jj_expentry[i] = jj_lasttokens[i];
2380      }
2381      boolean exists = false;
2382      for (java.util.Enumeration JavaDoc en = jj_expentries.elements(); en.hasMoreElements();) {
2383        int[] oldentry = (int[])(en.nextElement());
2384        if (oldentry.length == jj_expentry.length) {
2385          exists = true;
2386          for (int i = 0; i < jj_expentry.length; i++) {
2387            if (oldentry[i] != jj_expentry[i]) {
2388              exists = false;
2389              break;
2390            }
2391          }
2392          if (exists) break;
2393        }
2394      }
2395      if (!exists) jj_expentries.addElement(jj_expentry);
2396      if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
2397    }
2398  }
2399
2400  final public ParseException generateParseException() {
2401    jj_expentries.removeAllElements();
2402    boolean[] la1tokens = new boolean[81];
2403    for (int i = 0; i < 81; i++) {
2404      la1tokens[i] = false;
2405    }
2406    if (jj_kind >= 0) {
2407      la1tokens[jj_kind] = true;
2408      jj_kind = -1;
2409    }
2410    for (int i = 0; i < 44; i++) {
2411      if (jj_la1[i] == jj_gen) {
2412        for (int j = 0; j < 32; j++) {
2413          if ((jj_la1_0[i] & (1<<j)) != 0) {
2414            la1tokens[j] = true;
2415          }
2416          if ((jj_la1_1[i] & (1<<j)) != 0) {
2417            la1tokens[32+j] = true;
2418          }
2419          if ((jj_la1_2[i] & (1<<j)) != 0) {
2420            la1tokens[64+j] = true;
2421          }
2422        }
2423      }
2424    }
2425    for (int i = 0; i < 81; i++) {
2426      if (la1tokens[i]) {
2427        jj_expentry = new int[1];
2428        jj_expentry[0] = i;
2429        jj_expentries.addElement(jj_expentry);
2430      }
2431    }
2432    jj_endpos = 0;
2433    jj_rescan_token();
2434    jj_add_error_token(0, 0);
2435    int[][] exptokseq = new int[jj_expentries.size()][];
2436    for (int i = 0; i < jj_expentries.size(); i++) {
2437      exptokseq[i] = (int[])jj_expentries.elementAt(i);
2438    }
2439    return new ParseException(token, exptokseq, tokenImage);
2440  }
2441
2442  final public void enable_tracing() {
2443  }
2444
2445  final public void disable_tracing() {
2446  }
2447
2448  final private void jj_rescan_token() {
2449    jj_rescan = true;
2450    for (int i = 0; i < 2; i++) {
2451      JJCalls p = jj_2_rtns[i];
2452      do {
2453        if (p.gen > jj_gen) {
2454          jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
2455          switch (i) {
2456            case 0: jj_3_1(); break;
2457            case 1: jj_3_2(); break;
2458          }
2459        }
2460        p = p.next;
2461      } while (p != null);
2462    }
2463    jj_rescan = false;
2464  }
2465
2466  final private void jj_save(int index, int xla) {
2467    JJCalls p = jj_2_rtns[index];
2468    while (p.gen > jj_gen) {
2469      if (p.next == null) { p = p.next = new JJCalls(); break; }
2470      p = p.next;
2471    }
2472    p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
2473  }
2474
2475  static final class JJCalls {
2476    int gen;
2477    Token first;
2478    int arg;
2479    JJCalls next;
2480  }
2481
2482}
2483
Popular Tags