Initial import into git.
[galago.git] / java / pig-galago / src / com / yahoo / pig / impl / logicalLayer / parser / QueryParserTokenManager.java
blobf8d8c021fa287be23ef996ddefb66736d70f8b87
1 /* Generated By:JJTree&JavaCC: Do not edit this line. QueryParserTokenManager.java */
2 package com.yahoo.pig.impl.logicalLayer.parser;
3 import java.io.*;
4 import java.util.*;
5 import java.lang.reflect.*;
6 import com.yahoo.pig.impl.logicalLayer.*;
7 import com.yahoo.pig.impl.eval.*;
8 import com.yahoo.pig.impl.eval.func.*;
9 import com.yahoo.pig.impl.eval.groupby.*;
10 import com.yahoo.pig.impl.eval.filter.*;
11 import com.yahoo.pig.impl.eval.window.*;
12 import com.yahoo.pig.impl.eval.sad.*;
13 import com.yahoo.pig.impl.logicalLayer.schema.*;
14 import com.yahoo.pig.*;
15 import com.yahoo.pig.impl.PigContext;
16 import com.yahoo.pig.PigServer.ExecType;
17 import com.yahoo.pig.impl.physicalLayer.IntermedResult;
18 import com.yahoo.pig.impl.io.FileLocalizer;
19 import com.yahoo.pig.builtin.*;
21 public class QueryParserTokenManager implements QueryParserConstants
23 public java.io.PrintStream debugStream = System.out;
24 public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
25 private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
27 switch (pos)
29 case 0:
30 if ((active0 & 0x400L) != 0L)
32 jjmatchedKind = 46;
33 return 41;
35 if ((active0 & 0x20000000000L) != 0L)
37 jjmatchedKind = 46;
38 return 54;
40 if ((active0 & 0x2000000000000000L) != 0L)
41 return 3;
42 if ((active0 & 0x100000000L) != 0L)
44 jjmatchedKind = 46;
45 return 11;
47 if ((active0 & 0x1000000000000000L) != 0L)
48 return 0;
49 if ((active1 & 0x8L) != 0L)
50 return 28;
51 if ((active0 & 0x10000000000000L) != 0L)
52 return 14;
53 if ((active0 & 0x8020000000L) != 0L)
55 jjmatchedKind = 46;
56 return 44;
58 if ((active0 & 0x17ed7fff800L) != 0L)
60 jjmatchedKind = 46;
61 return 55;
63 if ((active0 & 0x4000000000000000L) != 0L)
64 return 56;
65 return -1;
66 case 1:
67 if ((active0 & 0x80c04000L) != 0L)
68 return 55;
69 if ((active0 & 0x3ff773fbc00L) != 0L)
71 if (jjmatchedPos != 1)
73 jjmatchedKind = 46;
74 jjmatchedPos = 1;
76 return 55;
78 return -1;
79 case 2:
80 if ((active0 & 0x140300000L) != 0L)
81 return 55;
82 if ((active0 & 0x3fe370ffc00L) != 0L)
84 jjmatchedKind = 46;
85 jjmatchedPos = 2;
86 return 55;
88 return -1;
89 case 3:
90 if ((active0 & 0x20000000400L) != 0L)
91 return 55;
92 if ((active0 & 0x1fe370ff800L) != 0L)
94 jjmatchedKind = 46;
95 jjmatchedPos = 3;
96 return 55;
98 return -1;
99 case 4:
100 if ((active0 & 0x20270c4000L) != 0L)
101 return 55;
102 if ((active0 & 0x1de1003b800L) != 0L)
104 jjmatchedKind = 46;
105 jjmatchedPos = 4;
106 return 55;
108 return -1;
109 case 5:
110 if ((active0 & 0x4400000800L) != 0L)
111 return 55;
112 if ((active0 & 0x19a1003b000L) != 0L)
114 jjmatchedKind = 46;
115 jjmatchedPos = 5;
116 return 55;
118 return -1;
119 case 6:
120 if ((active0 & 0x1180002b000L) != 0L)
121 return 55;
122 if ((active0 & 0x8210010000L) != 0L)
124 jjmatchedKind = 46;
125 jjmatchedPos = 6;
126 return 55;
128 return -1;
129 case 7:
130 if ((active0 & 0x8010010000L) != 0L)
131 return 55;
132 if ((active0 & 0x200000000L) != 0L)
134 jjmatchedKind = 46;
135 jjmatchedPos = 7;
136 return 55;
138 return -1;
139 case 8:
140 if ((active0 & 0x200000000L) != 0L)
142 jjmatchedKind = 46;
143 jjmatchedPos = 8;
144 return 55;
146 return -1;
147 case 9:
148 if ((active0 & 0x200000000L) != 0L)
150 jjmatchedKind = 46;
151 jjmatchedPos = 9;
152 return 55;
154 return -1;
155 case 10:
156 if ((active0 & 0x200000000L) != 0L)
158 jjmatchedKind = 46;
159 jjmatchedPos = 10;
160 return 55;
162 return -1;
163 default :
164 return -1;
167 private final int jjStartNfa_0(int pos, long active0, long active1)
169 return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);
171 private final int jjStopAtPos(int pos, int kind)
173 jjmatchedKind = kind;
174 jjmatchedPos = pos;
175 return pos + 1;
177 private final int jjStartNfaWithStates_0(int pos, int kind, int state)
179 jjmatchedKind = kind;
180 jjmatchedPos = pos;
181 try { curChar = input_stream.readChar(); }
182 catch(java.io.IOException e) { return pos + 1; }
183 return jjMoveNfa_0(state, pos + 1);
185 private final int jjMoveStringLiteralDfa0_0()
187 switch(curChar)
189 case 36:
190 return jjStartNfaWithStates_0(0, 67, 28);
191 case 40:
192 return jjStopAtPos(0, 54);
193 case 41:
194 return jjStopAtPos(0, 55);
195 case 42:
196 return jjStopAtPos(0, 27);
197 case 43:
198 return jjStopAtPos(0, 59);
199 case 44:
200 return jjStopAtPos(0, 56);
201 case 45:
202 return jjStartNfaWithStates_0(0, 60, 0);
203 case 46:
204 return jjStartNfaWithStates_0(0, 62, 56);
205 case 47:
206 return jjStartNfaWithStates_0(0, 61, 3);
207 case 58:
208 return jjStopAtPos(0, 64);
209 case 59:
210 return jjStopAtPos(0, 53);
211 case 61:
212 return jjStartNfaWithStates_0(0, 52, 14);
213 case 63:
214 return jjStopAtPos(0, 63);
215 case 91:
216 return jjStopAtPos(0, 65);
217 case 93:
218 return jjStopAtPos(0, 66);
219 case 65:
220 case 97:
221 return jjMoveStringLiteralDfa1_0(0x40708000L);
222 case 66:
223 case 98:
224 return jjMoveStringLiteralDfa1_0(0x800000L);
225 case 67:
226 case 99:
227 return jjMoveStringLiteralDfa1_0(0x200060000L);
228 case 68:
229 case 100:
230 return jjMoveStringLiteralDfa1_0(0x10000L);
231 case 69:
232 case 101:
233 return jjMoveStringLiteralDfa1_0(0x20000000000L);
234 case 70:
235 case 102:
236 return jjMoveStringLiteralDfa1_0(0x10000001800L);
237 case 71:
238 case 103:
239 return jjMoveStringLiteralDfa1_0(0x8020000000L);
240 case 72:
241 case 104:
242 return jjMoveStringLiteralDfa1_0(0x2000000000L);
243 case 73:
244 case 105:
245 return jjMoveStringLiteralDfa1_0(0x2000000L);
246 case 76:
247 case 108:
248 return jjMoveStringLiteralDfa1_0(0x400L);
249 case 77:
250 case 109:
251 return jjMoveStringLiteralDfa1_0(0x1000002000L);
252 case 78:
253 case 110:
254 return jjMoveStringLiteralDfa1_0(0x100000000L);
255 case 79:
256 case 111:
257 return jjMoveStringLiteralDfa1_0(0x84004000L);
258 case 80:
259 case 112:
260 return jjMoveStringLiteralDfa1_0(0x10000000L);
261 case 83:
262 case 115:
263 return jjMoveStringLiteralDfa1_0(0x800000000L);
264 case 84:
265 case 116:
266 return jjMoveStringLiteralDfa1_0(0x4000000000L);
267 case 85:
268 case 117:
269 return jjMoveStringLiteralDfa1_0(0x1080000L);
270 case 87:
271 case 119:
272 return jjMoveStringLiteralDfa1_0(0x400000000L);
273 case 123:
274 return jjStopAtPos(0, 57);
275 case 125:
276 return jjStopAtPos(0, 58);
277 default :
278 return jjMoveNfa_0(2, 0);
281 private final int jjMoveStringLiteralDfa1_0(long active0)
283 try { curChar = input_stream.readChar(); }
284 catch(java.io.IOException e) {
285 jjStopStringLiteralDfa_0(0, active0, 0L);
286 return 1;
288 switch(curChar)
290 case 65:
291 case 97:
292 return jjMoveStringLiteralDfa2_0(active0, 0x10002000L);
293 case 69:
294 case 101:
295 return jjMoveStringLiteralDfa2_0(active0, 0x8800000000L);
296 case 73:
297 case 105:
298 return jjMoveStringLiteralDfa2_0(active0, 0x1400010800L);
299 case 76:
300 case 108:
301 return jjMoveStringLiteralDfa2_0(active0, 0x10000100000L);
302 case 78:
303 case 110:
304 return jjMoveStringLiteralDfa2_0(active0, 0x42280000L);
305 case 79:
306 case 111:
307 return jjMoveStringLiteralDfa2_0(active0, 0x2300021400L);
308 case 82:
309 case 114:
310 if ((active0 & 0x80000000L) != 0L)
312 jjmatchedKind = 31;
313 jjmatchedPos = 1;
315 return jjMoveStringLiteralDfa2_0(active0, 0x2004c000L);
316 case 83:
317 case 115:
318 if ((active0 & 0x400000L) != 0L)
319 return jjStartNfaWithStates_0(1, 22, 55);
320 return jjMoveStringLiteralDfa2_0(active0, 0x1000000L);
321 case 85:
322 case 117:
323 return jjMoveStringLiteralDfa2_0(active0, 0x4004000000L);
324 case 86:
325 case 118:
326 return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L);
327 case 89:
328 case 121:
329 if ((active0 & 0x800000L) != 0L)
330 return jjStartNfaWithStates_0(1, 23, 55);
331 break;
332 default :
333 break;
335 return jjStartNfa_0(0, active0, 0L);
337 private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
339 if (((active0 &= old0)) == 0L)
340 return jjStartNfa_0(0, old0, 0L);
341 try { curChar = input_stream.readChar(); }
342 catch(java.io.IOException e) {
343 jjStopStringLiteralDfa_0(1, active0, 0L);
344 return 2;
346 switch(curChar)
348 case 65:
349 case 97:
350 return jjMoveStringLiteralDfa3_0(active0, 0x30000000400L);
351 case 67:
352 case 99:
353 return jjMoveStringLiteralDfa3_0(active0, 0x800000000L);
354 case 68:
355 case 100:
356 if ((active0 & 0x40000000L) != 0L)
357 return jjStartNfaWithStates_0(2, 30, 55);
358 return jjMoveStringLiteralDfa3_0(active0, 0x4000L);
359 case 71:
360 case 103:
361 return jjMoveStringLiteralDfa3_0(active0, 0x20000L);
362 case 73:
363 case 105:
364 return jjMoveStringLiteralDfa3_0(active0, 0x1080000L);
365 case 76:
366 case 108:
367 if ((active0 & 0x100000L) != 0L)
368 return jjStartNfaWithStates_0(2, 20, 55);
369 return jjMoveStringLiteralDfa3_0(active0, 0x800L);
370 case 78:
371 case 110:
372 return jjMoveStringLiteralDfa3_0(active0, 0x9602000000L);
373 case 79:
374 case 111:
375 return jjMoveStringLiteralDfa3_0(active0, 0x20040000L);
376 case 80:
377 case 112:
378 return jjMoveStringLiteralDfa3_0(active0, 0x4000000000L);
379 case 82:
380 case 114:
381 return jjMoveStringLiteralDfa3_0(active0, 0x10009000L);
382 case 83:
383 case 115:
384 return jjMoveStringLiteralDfa3_0(active0, 0x10000L);
385 case 84:
386 case 116:
387 if ((active0 & 0x100000000L) != 0L)
388 return jjStartNfaWithStates_0(2, 32, 55);
389 return jjMoveStringLiteralDfa3_0(active0, 0x4002000L);
390 case 85:
391 case 117:
392 return jjMoveStringLiteralDfa3_0(active0, 0x2000000000L);
393 case 89:
394 case 121:
395 if ((active0 & 0x200000L) != 0L)
396 return jjStartNfaWithStates_0(2, 21, 55);
397 break;
398 default :
399 break;
401 return jjStartNfa_0(1, active0, 0L);
403 private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
405 if (((active0 &= old0)) == 0L)
406 return jjStartNfa_0(1, old0, 0L);
407 try { curChar = input_stream.readChar(); }
408 catch(java.io.IOException e) {
409 jjStopStringLiteralDfa_0(2, active0, 0L);
410 return 3;
412 switch(curChar)
414 case 65:
415 case 97:
416 return jjMoveStringLiteralDfa4_0(active0, 0x10008000L);
417 case 67:
418 case 99:
419 return jjMoveStringLiteralDfa4_0(active0, 0x2000L);
420 case 68:
421 case 100:
422 if ((active0 & 0x400L) != 0L)
423 return jjStartNfaWithStates_0(3, 10, 55);
424 return jjMoveStringLiteralDfa4_0(active0, 0x400000000L);
425 case 69:
426 case 101:
427 return jjMoveStringLiteralDfa4_0(active0, 0x8006005000L);
428 case 76:
429 case 108:
430 if ((active0 & 0x20000000000L) != 0L)
431 return jjStartNfaWithStates_0(3, 41, 55);
432 return jjMoveStringLiteralDfa4_0(active0, 0x4000000000L);
433 case 78:
434 case 110:
435 return jjMoveStringLiteralDfa4_0(active0, 0x1000000L);
436 case 79:
437 case 111:
438 return jjMoveStringLiteralDfa4_0(active0, 0x800080000L);
439 case 82:
440 case 114:
441 return jjMoveStringLiteralDfa4_0(active0, 0x2000020000L);
442 case 83:
443 case 115:
444 return jjMoveStringLiteralDfa4_0(active0, 0x40000L);
445 case 84:
446 case 116:
447 return jjMoveStringLiteralDfa4_0(active0, 0x10200010800L);
448 case 85:
449 case 117:
450 return jjMoveStringLiteralDfa4_0(active0, 0x1020000000L);
451 default :
452 break;
454 return jjStartNfa_0(2, active0, 0L);
456 private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
458 if (((active0 &= old0)) == 0L)
459 return jjStartNfa_0(2, old0, 0L);
460 try { curChar = input_stream.readChar(); }
461 catch(java.io.IOException e) {
462 jjStopStringLiteralDfa_0(3, active0, 0L);
463 return 4;
465 switch(curChar)
467 case 65:
468 case 97:
469 return jjMoveStringLiteralDfa5_0(active0, 0x1000L);
470 case 69:
471 case 101:
472 return jjMoveStringLiteralDfa5_0(active0, 0x4000000800L);
473 case 71:
474 case 103:
475 if ((active0 & 0x1000000L) != 0L)
476 return jjStartNfaWithStates_0(4, 24, 55);
477 break;
478 case 72:
479 case 104:
480 return jjMoveStringLiteralDfa5_0(active0, 0x2000L);
481 case 73:
482 case 105:
483 return jjMoveStringLiteralDfa5_0(active0, 0x200010000L);
484 case 76:
485 case 108:
486 return jjMoveStringLiteralDfa5_0(active0, 0x10000000L);
487 case 78:
488 case 110:
489 if ((active0 & 0x80000L) != 0L)
490 return jjStartNfaWithStates_0(4, 19, 55);
491 return jjMoveStringLiteralDfa5_0(active0, 0x800008000L);
492 case 79:
493 case 111:
494 return jjMoveStringLiteralDfa5_0(active0, 0x400020000L);
495 case 80:
496 case 112:
497 if ((active0 & 0x20000000L) != 0L)
498 return jjStartNfaWithStates_0(4, 29, 55);
499 break;
500 case 82:
501 case 114:
502 if ((active0 & 0x4000L) != 0L)
503 return jjStartNfaWithStates_0(4, 14, 55);
504 else if ((active0 & 0x2000000L) != 0L)
505 return jjStartNfaWithStates_0(4, 25, 55);
506 else if ((active0 & 0x4000000L) != 0L)
507 return jjStartNfaWithStates_0(4, 26, 55);
508 return jjMoveStringLiteralDfa5_0(active0, 0x8000000000L);
509 case 83:
510 case 115:
511 if ((active0 & 0x40000L) != 0L)
512 return jjStartNfaWithStates_0(4, 18, 55);
513 else if ((active0 & 0x2000000000L) != 0L)
514 return jjStartNfaWithStates_0(4, 37, 55);
515 break;
516 case 84:
517 case 116:
518 return jjMoveStringLiteralDfa5_0(active0, 0x11000000000L);
519 default :
520 break;
522 return jjStartNfa_0(3, active0, 0L);
524 private final int jjMoveStringLiteralDfa5_0(long old0, long active0)
526 if (((active0 &= old0)) == 0L)
527 return jjStartNfa_0(3, old0, 0L);
528 try { curChar = input_stream.readChar(); }
529 catch(java.io.IOException e) {
530 jjStopStringLiteralDfa_0(4, active0, 0L);
531 return 5;
533 switch(curChar)
535 case 65:
536 case 97:
537 return jjMoveStringLiteralDfa6_0(active0, 0x8000000000L);
538 case 67:
539 case 99:
540 return jjMoveStringLiteralDfa6_0(active0, 0x1000L);
541 case 68:
542 case 100:
543 return jjMoveStringLiteralDfa6_0(active0, 0x800000000L);
544 case 69:
545 case 101:
546 return jjMoveStringLiteralDfa6_0(active0, 0x11000002000L);
547 case 71:
548 case 103:
549 return jjMoveStringLiteralDfa6_0(active0, 0x8000L);
550 case 76:
551 case 108:
552 return jjMoveStringLiteralDfa6_0(active0, 0x10000000L);
553 case 78:
554 case 110:
555 return jjMoveStringLiteralDfa6_0(active0, 0x200010000L);
556 case 82:
557 case 114:
558 if ((active0 & 0x800L) != 0L)
559 return jjStartNfaWithStates_0(5, 11, 55);
560 break;
561 case 83:
562 case 115:
563 if ((active0 & 0x4000000000L) != 0L)
564 return jjStartNfaWithStates_0(5, 38, 55);
565 break;
566 case 85:
567 case 117:
568 return jjMoveStringLiteralDfa6_0(active0, 0x20000L);
569 case 87:
570 case 119:
571 if ((active0 & 0x400000000L) != 0L)
572 return jjStartNfaWithStates_0(5, 34, 55);
573 break;
574 default :
575 break;
577 return jjStartNfa_0(4, active0, 0L);
579 private final int jjMoveStringLiteralDfa6_0(long old0, long active0)
581 if (((active0 &= old0)) == 0L)
582 return jjStartNfa_0(4, old0, 0L);
583 try { curChar = input_stream.readChar(); }
584 catch(java.io.IOException e) {
585 jjStopStringLiteralDfa_0(5, active0, 0L);
586 return 6;
588 switch(curChar)
590 case 67:
591 case 99:
592 return jjMoveStringLiteralDfa7_0(active0, 0x10000L);
593 case 69:
594 case 101:
595 if ((active0 & 0x8000L) != 0L)
596 return jjStartNfaWithStates_0(6, 15, 55);
597 return jjMoveStringLiteralDfa7_0(active0, 0x10000000L);
598 case 72:
599 case 104:
600 if ((active0 & 0x1000L) != 0L)
601 return jjStartNfaWithStates_0(6, 12, 55);
602 break;
603 case 78:
604 case 110:
605 if ((active0 & 0x10000000000L) != 0L)
606 return jjStartNfaWithStates_0(6, 40, 55);
607 break;
608 case 80:
609 case 112:
610 if ((active0 & 0x20000L) != 0L)
611 return jjStartNfaWithStates_0(6, 17, 55);
612 break;
613 case 83:
614 case 115:
615 if ((active0 & 0x2000L) != 0L)
616 return jjStartNfaWithStates_0(6, 13, 55);
617 else if ((active0 & 0x800000000L) != 0L)
618 return jjStartNfaWithStates_0(6, 35, 55);
619 else if ((active0 & 0x1000000000L) != 0L)
620 return jjStartNfaWithStates_0(6, 36, 55);
621 break;
622 case 84:
623 case 116:
624 return jjMoveStringLiteralDfa7_0(active0, 0x8000000000L);
625 case 85:
626 case 117:
627 return jjMoveStringLiteralDfa7_0(active0, 0x200000000L);
628 default :
629 break;
631 return jjStartNfa_0(5, active0, 0L);
633 private final int jjMoveStringLiteralDfa7_0(long old0, long active0)
635 if (((active0 &= old0)) == 0L)
636 return jjStartNfa_0(5, old0, 0L);
637 try { curChar = input_stream.readChar(); }
638 catch(java.io.IOException e) {
639 jjStopStringLiteralDfa_0(6, active0, 0L);
640 return 7;
642 switch(curChar)
644 case 69:
645 case 101:
646 if ((active0 & 0x8000000000L) != 0L)
647 return jjStartNfaWithStates_0(7, 39, 55);
648 break;
649 case 76:
650 case 108:
651 if ((active0 & 0x10000000L) != 0L)
652 return jjStartNfaWithStates_0(7, 28, 55);
653 break;
654 case 79:
655 case 111:
656 return jjMoveStringLiteralDfa8_0(active0, 0x200000000L);
657 case 84:
658 case 116:
659 if ((active0 & 0x10000L) != 0L)
660 return jjStartNfaWithStates_0(7, 16, 55);
661 break;
662 default :
663 break;
665 return jjStartNfa_0(6, active0, 0L);
667 private final int jjMoveStringLiteralDfa8_0(long old0, long active0)
669 if (((active0 &= old0)) == 0L)
670 return jjStartNfa_0(6, old0, 0L);
671 try { curChar = input_stream.readChar(); }
672 catch(java.io.IOException e) {
673 jjStopStringLiteralDfa_0(7, active0, 0L);
674 return 8;
676 switch(curChar)
678 case 85:
679 case 117:
680 return jjMoveStringLiteralDfa9_0(active0, 0x200000000L);
681 default :
682 break;
684 return jjStartNfa_0(7, active0, 0L);
686 private final int jjMoveStringLiteralDfa9_0(long old0, long active0)
688 if (((active0 &= old0)) == 0L)
689 return jjStartNfa_0(7, old0, 0L);
690 try { curChar = input_stream.readChar(); }
691 catch(java.io.IOException e) {
692 jjStopStringLiteralDfa_0(8, active0, 0L);
693 return 9;
695 switch(curChar)
697 case 83:
698 case 115:
699 return jjMoveStringLiteralDfa10_0(active0, 0x200000000L);
700 default :
701 break;
703 return jjStartNfa_0(8, active0, 0L);
705 private final int jjMoveStringLiteralDfa10_0(long old0, long active0)
707 if (((active0 &= old0)) == 0L)
708 return jjStartNfa_0(8, old0, 0L);
709 try { curChar = input_stream.readChar(); }
710 catch(java.io.IOException e) {
711 jjStopStringLiteralDfa_0(9, active0, 0L);
712 return 10;
714 switch(curChar)
716 case 76:
717 case 108:
718 return jjMoveStringLiteralDfa11_0(active0, 0x200000000L);
719 default :
720 break;
722 return jjStartNfa_0(9, active0, 0L);
724 private final int jjMoveStringLiteralDfa11_0(long old0, long active0)
726 if (((active0 &= old0)) == 0L)
727 return jjStartNfa_0(9, old0, 0L);
728 try { curChar = input_stream.readChar(); }
729 catch(java.io.IOException e) {
730 jjStopStringLiteralDfa_0(10, active0, 0L);
731 return 11;
733 switch(curChar)
735 case 89:
736 case 121:
737 if ((active0 & 0x200000000L) != 0L)
738 return jjStartNfaWithStates_0(11, 33, 55);
739 break;
740 default :
741 break;
743 return jjStartNfa_0(10, active0, 0L);
745 private final void jjCheckNAdd(int state)
747 if (jjrounds[state] != jjround)
749 jjstateSet[jjnewStateCnt++] = state;
750 jjrounds[state] = jjround;
753 private final void jjAddStates(int start, int end)
755 do {
756 jjstateSet[jjnewStateCnt++] = jjnextStates[start];
757 } while (start++ != end);
759 private final void jjCheckNAddTwoStates(int state1, int state2)
761 jjCheckNAdd(state1);
762 jjCheckNAdd(state2);
764 private final void jjCheckNAddStates(int start, int end)
766 do {
767 jjCheckNAdd(jjnextStates[start]);
768 } while (start++ != end);
770 private final void jjCheckNAddStates(int start)
772 jjCheckNAdd(jjnextStates[start]);
773 jjCheckNAdd(jjnextStates[start + 1]);
775 static final long[] jjbitVec0 = {
776 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
778 private final int jjMoveNfa_0(int startState, int curPos)
780 int[] nextStates;
781 int startsAt = 0;
782 jjnewStateCnt = 54;
783 int i = 1;
784 jjstateSet[0] = startState;
785 int j, kind = 0x7fffffff;
786 for (;;)
788 if (++jjround == 0x7fffffff)
789 ReInitRounds();
790 if (curChar < 64)
792 long l = 1L << curChar;
793 MatchLoop: do
795 switch(jjstateSet[--i])
797 case 11:
798 if ((0x3ff000000000000L & l) != 0L)
800 if (kind > 46)
801 kind = 46;
802 jjCheckNAddTwoStates(21, 23);
804 else if (curChar == 58)
805 jjstateSet[jjnewStateCnt++] = 22;
806 break;
807 case 54:
808 if ((0x3ff000000000000L & l) != 0L)
810 if (kind > 46)
811 kind = 46;
812 jjCheckNAddTwoStates(21, 23);
814 else if (curChar == 58)
815 jjstateSet[jjnewStateCnt++] = 22;
816 break;
817 case 41:
818 if ((0x3ff000000000000L & l) != 0L)
820 if (kind > 46)
821 kind = 46;
822 jjCheckNAddTwoStates(21, 23);
824 else if (curChar == 58)
825 jjstateSet[jjnewStateCnt++] = 22;
826 break;
827 case 44:
828 if ((0x3ff000000000000L & l) != 0L)
830 if (kind > 46)
831 kind = 46;
832 jjCheckNAddTwoStates(21, 23);
834 else if (curChar == 58)
835 jjstateSet[jjnewStateCnt++] = 22;
836 break;
837 case 55:
838 if ((0x3ff000000000000L & l) != 0L)
840 if (kind > 46)
841 kind = 46;
842 jjCheckNAddTwoStates(21, 23);
844 else if (curChar == 58)
845 jjstateSet[jjnewStateCnt++] = 22;
846 break;
847 case 56:
848 if ((0x3ff000000000000L & l) != 0L)
850 if (kind > 47)
851 kind = 47;
852 jjCheckNAdd(38);
854 if ((0x3ff000000000000L & l) != 0L)
856 if (kind > 47)
857 kind = 47;
858 jjCheckNAddTwoStates(30, 31);
860 break;
861 case 2:
862 if ((0x3ff000000000000L & l) != 0L)
864 if (kind > 47)
865 kind = 47;
866 jjCheckNAddStates(0, 6);
868 else if ((0x5000000000000000L & l) != 0L)
870 if (kind > 9)
871 kind = 9;
873 else if (curChar == 46)
874 jjCheckNAddTwoStates(30, 38);
875 else if (curChar == 36)
876 jjCheckNAdd(28);
877 else if (curChar == 39)
878 jjCheckNAddTwoStates(25, 26);
879 else if (curChar == 61)
880 jjCheckNAdd(14);
881 else if (curChar == 33)
882 jjCheckNAdd(14);
883 else if (curChar == 47)
884 jjstateSet[jjnewStateCnt++] = 3;
885 else if (curChar == 45)
886 jjstateSet[jjnewStateCnt++] = 0;
887 if (curChar == 60)
888 jjCheckNAdd(14);
889 else if (curChar == 62)
890 jjCheckNAdd(14);
891 break;
892 case 0:
893 if (curChar != 45)
894 break;
895 if (kind > 5)
896 kind = 5;
897 jjCheckNAdd(1);
898 break;
899 case 1:
900 if ((0xffffffffffffdbffL & l) == 0L)
901 break;
902 if (kind > 5)
903 kind = 5;
904 jjCheckNAdd(1);
905 break;
906 case 3:
907 if (curChar == 42)
908 jjCheckNAddTwoStates(4, 5);
909 break;
910 case 4:
911 if ((0xfffffbffffffffffL & l) != 0L)
912 jjCheckNAddTwoStates(4, 5);
913 break;
914 case 5:
915 if (curChar == 42)
916 jjCheckNAddStates(7, 9);
917 break;
918 case 6:
919 if ((0xffff7bffffffffffL & l) != 0L)
920 jjCheckNAddTwoStates(7, 5);
921 break;
922 case 7:
923 if ((0xfffffbffffffffffL & l) != 0L)
924 jjCheckNAddTwoStates(7, 5);
925 break;
926 case 8:
927 if (curChar == 47 && kind > 6)
928 kind = 6;
929 break;
930 case 9:
931 if (curChar == 47)
932 jjstateSet[jjnewStateCnt++] = 3;
933 break;
934 case 14:
935 if (curChar == 61 && kind > 9)
936 kind = 9;
937 break;
938 case 15:
939 if (curChar == 33)
940 jjCheckNAdd(14);
941 break;
942 case 16:
943 if (curChar == 62)
944 jjCheckNAdd(14);
945 break;
946 case 17:
947 if ((0x5000000000000000L & l) != 0L && kind > 9)
948 kind = 9;
949 break;
950 case 18:
951 if (curChar == 60)
952 jjCheckNAdd(14);
953 break;
954 case 19:
955 if (curChar == 61)
956 jjCheckNAdd(14);
957 break;
958 case 21:
959 if ((0x3ff000000000000L & l) == 0L)
960 break;
961 if (kind > 46)
962 kind = 46;
963 jjCheckNAddTwoStates(21, 23);
964 break;
965 case 22:
966 if (curChar != 58)
967 break;
968 if (kind > 46)
969 kind = 46;
970 jjCheckNAddTwoStates(21, 23);
971 break;
972 case 23:
973 if (curChar == 58)
974 jjstateSet[jjnewStateCnt++] = 22;
975 break;
976 case 24:
977 if (curChar == 39)
978 jjCheckNAddTwoStates(25, 26);
979 break;
980 case 25:
981 if ((0xffffff7fffffffffL & l) != 0L)
982 jjCheckNAddTwoStates(25, 26);
983 break;
984 case 26:
985 if (curChar == 39 && kind > 50)
986 kind = 50;
987 break;
988 case 27:
989 if (curChar == 36)
990 jjCheckNAdd(28);
991 break;
992 case 28:
993 if ((0x3ff000000000000L & l) == 0L)
994 break;
995 if (kind > 51)
996 kind = 51;
997 jjCheckNAdd(28);
998 break;
999 case 29:
1000 if (curChar == 46)
1001 jjCheckNAddTwoStates(30, 38);
1002 break;
1003 case 30:
1004 if ((0x3ff000000000000L & l) == 0L)
1005 break;
1006 if (kind > 47)
1007 kind = 47;
1008 jjCheckNAddTwoStates(30, 31);
1009 break;
1010 case 32:
1011 if ((0x280000000000L & l) != 0L)
1012 jjCheckNAddTwoStates(33, 36);
1013 break;
1014 case 33:
1015 if ((0x3ff000000000000L & l) == 0L)
1016 break;
1017 if (kind > 47)
1018 kind = 47;
1019 jjCheckNAddTwoStates(33, 34);
1020 break;
1021 case 34:
1022 if (curChar == 46)
1023 jjCheckNAdd(35);
1024 break;
1025 case 35:
1026 if ((0x3ff000000000000L & l) == 0L)
1027 break;
1028 if (kind > 47)
1029 kind = 47;
1030 jjCheckNAdd(35);
1031 break;
1032 case 36:
1033 if (curChar == 46)
1034 jjCheckNAdd(37);
1035 break;
1036 case 37:
1037 if ((0x3ff000000000000L & l) == 0L)
1038 break;
1039 if (kind > 47)
1040 kind = 47;
1041 jjCheckNAdd(37);
1042 break;
1043 case 38:
1044 if ((0x3ff000000000000L & l) == 0L)
1045 break;
1046 if (kind > 47)
1047 kind = 47;
1048 jjCheckNAdd(38);
1049 break;
1050 case 45:
1051 if ((0x3ff000000000000L & l) == 0L)
1052 break;
1053 if (kind > 47)
1054 kind = 47;
1055 jjCheckNAddStates(0, 6);
1056 break;
1057 case 46:
1058 if ((0x3ff000000000000L & l) == 0L)
1059 break;
1060 if (kind > 47)
1061 kind = 47;
1062 jjCheckNAdd(46);
1063 break;
1064 case 47:
1065 if ((0x3ff000000000000L & l) == 0L)
1066 break;
1067 if (kind > 47)
1068 kind = 47;
1069 jjCheckNAddStates(10, 12);
1070 break;
1071 case 48:
1072 if (curChar == 46)
1073 jjCheckNAdd(49);
1074 break;
1075 case 49:
1076 if ((0x3ff000000000000L & l) == 0L)
1077 break;
1078 if (kind > 47)
1079 kind = 47;
1080 jjCheckNAddTwoStates(49, 31);
1081 break;
1082 case 50:
1083 if ((0x3ff000000000000L & l) == 0L)
1084 break;
1085 if (kind > 47)
1086 kind = 47;
1087 jjCheckNAddTwoStates(50, 51);
1088 break;
1089 case 51:
1090 if (curChar == 46)
1091 jjCheckNAdd(52);
1092 break;
1093 case 52:
1094 if ((0x3ff000000000000L & l) == 0L)
1095 break;
1096 if (kind > 47)
1097 kind = 47;
1098 jjCheckNAdd(52);
1099 break;
1100 case 53:
1101 if ((0x3ff000000000000L & l) == 0L)
1102 break;
1103 if (kind > 49)
1104 kind = 49;
1105 jjCheckNAdd(53);
1106 break;
1107 default : break;
1109 } while(i != startsAt);
1111 else if (curChar < 128)
1113 long l = 1L << (curChar & 077);
1114 MatchLoop: do
1116 switch(jjstateSet[--i])
1118 case 11:
1119 if ((0x7fffffe87fffffeL & l) != 0L)
1121 if (kind > 46)
1122 kind = 46;
1123 jjCheckNAddTwoStates(21, 23);
1125 if ((0x7fffffe07fffffeL & l) != 0L)
1127 if (kind > 46)
1128 kind = 46;
1129 jjCheckNAddStates(13, 15);
1131 if ((0x2000000020L & l) != 0L)
1132 jjCheckNAdd(10);
1133 break;
1134 case 54:
1135 if ((0x7fffffe87fffffeL & l) != 0L)
1137 if (kind > 46)
1138 kind = 46;
1139 jjCheckNAddTwoStates(21, 23);
1141 if ((0x7fffffe07fffffeL & l) != 0L)
1143 if (kind > 46)
1144 kind = 46;
1145 jjCheckNAddStates(13, 15);
1147 if ((0x2000000020000L & l) != 0L)
1149 if (kind > 9)
1150 kind = 9;
1152 break;
1153 case 41:
1154 if ((0x7fffffe87fffffeL & l) != 0L)
1156 if (kind > 46)
1157 kind = 46;
1158 jjCheckNAddTwoStates(21, 23);
1160 if ((0x7fffffe07fffffeL & l) != 0L)
1162 if (kind > 46)
1163 kind = 46;
1164 jjCheckNAddStates(13, 15);
1166 if ((0x10000000100000L & l) != 0L)
1168 if (kind > 9)
1169 kind = 9;
1171 if ((0x10000000100000L & l) != 0L)
1172 jjCheckNAdd(40);
1173 break;
1174 case 44:
1175 if ((0x7fffffe87fffffeL & l) != 0L)
1177 if (kind > 46)
1178 kind = 46;
1179 jjCheckNAddTwoStates(21, 23);
1181 if ((0x7fffffe07fffffeL & l) != 0L)
1183 if (kind > 46)
1184 kind = 46;
1185 jjCheckNAddStates(13, 15);
1187 if ((0x10000000100000L & l) != 0L)
1189 if (kind > 9)
1190 kind = 9;
1192 if ((0x10000000100000L & l) != 0L)
1193 jjCheckNAdd(40);
1194 break;
1195 case 55:
1196 if ((0x7fffffe87fffffeL & l) != 0L)
1198 if (kind > 46)
1199 kind = 46;
1200 jjCheckNAddTwoStates(21, 23);
1202 if ((0x7fffffe07fffffeL & l) != 0L)
1204 if (kind > 46)
1205 kind = 46;
1206 jjCheckNAddStates(13, 15);
1208 break;
1209 case 2:
1210 if ((0x7fffffe07fffffeL & l) != 0L)
1212 if (kind > 46)
1213 kind = 46;
1214 jjCheckNAddStates(13, 15);
1216 if ((0x8000000080L & l) != 0L)
1217 jjCheckNAddTwoStates(44, 42);
1218 else if ((0x100000001000L & l) != 0L)
1219 jjCheckNAddTwoStates(41, 42);
1220 else if ((0x2000000020L & l) != 0L)
1221 jjCheckNAdd(10);
1222 else if ((0x400000004000L & l) != 0L)
1223 jjstateSet[jjnewStateCnt++] = 11;
1224 break;
1225 case 1:
1226 if (kind > 5)
1227 kind = 5;
1228 jjstateSet[jjnewStateCnt++] = 1;
1229 break;
1230 case 4:
1231 jjCheckNAddTwoStates(4, 5);
1232 break;
1233 case 6:
1234 case 7:
1235 jjCheckNAddTwoStates(7, 5);
1236 break;
1237 case 10:
1238 if ((0x2000000020000L & l) != 0L && kind > 9)
1239 kind = 9;
1240 break;
1241 case 12:
1242 if ((0x400000004000L & l) != 0L)
1243 jjstateSet[jjnewStateCnt++] = 11;
1244 break;
1245 case 13:
1246 if ((0x2000000020L & l) != 0L)
1247 jjCheckNAdd(10);
1248 break;
1249 case 20:
1250 if ((0x7fffffe07fffffeL & l) == 0L)
1251 break;
1252 if (kind > 46)
1253 kind = 46;
1254 jjCheckNAddStates(13, 15);
1255 break;
1256 case 21:
1257 if ((0x7fffffe87fffffeL & l) == 0L)
1258 break;
1259 if (kind > 46)
1260 kind = 46;
1261 jjCheckNAddTwoStates(21, 23);
1262 break;
1263 case 25:
1264 jjAddStates(16, 17);
1265 break;
1266 case 31:
1267 if ((0x2000000020L & l) != 0L)
1268 jjAddStates(18, 20);
1269 break;
1270 case 39:
1271 if ((0x100000001000L & l) != 0L)
1272 jjCheckNAddTwoStates(41, 42);
1273 break;
1274 case 40:
1275 if ((0x2000000020L & l) != 0L && kind > 9)
1276 kind = 9;
1277 break;
1278 case 42:
1279 if ((0x10000000100000L & l) != 0L && kind > 9)
1280 kind = 9;
1281 break;
1282 case 43:
1283 if ((0x8000000080L & l) != 0L)
1284 jjCheckNAddTwoStates(44, 42);
1285 break;
1286 default : break;
1288 } while(i != startsAt);
1290 else
1292 int i2 = (curChar & 0xff) >> 6;
1293 long l2 = 1L << (curChar & 077);
1294 MatchLoop: do
1296 switch(jjstateSet[--i])
1298 case 1:
1299 if ((jjbitVec0[i2] & l2) == 0L)
1300 break;
1301 if (kind > 5)
1302 kind = 5;
1303 jjstateSet[jjnewStateCnt++] = 1;
1304 break;
1305 case 4:
1306 if ((jjbitVec0[i2] & l2) != 0L)
1307 jjCheckNAddTwoStates(4, 5);
1308 break;
1309 case 6:
1310 case 7:
1311 if ((jjbitVec0[i2] & l2) != 0L)
1312 jjCheckNAddTwoStates(7, 5);
1313 break;
1314 case 25:
1315 if ((jjbitVec0[i2] & l2) != 0L)
1316 jjAddStates(16, 17);
1317 break;
1318 default : break;
1320 } while(i != startsAt);
1322 if (kind != 0x7fffffff)
1324 jjmatchedKind = kind;
1325 jjmatchedPos = curPos;
1326 kind = 0x7fffffff;
1328 ++curPos;
1329 if ((i = jjnewStateCnt) == (startsAt = 54 - (jjnewStateCnt = startsAt)))
1330 return curPos;
1331 try { curChar = input_stream.readChar(); }
1332 catch(java.io.IOException e) { return curPos; }
1335 static final int[] jjnextStates = {
1336 46, 47, 48, 31, 50, 51, 53, 5, 6, 8, 47, 48, 31, 20, 21, 23,
1337 25, 26, 32, 33, 36,
1339 public static final String[] jjstrLiteralImages = {
1340 "", null, null, null, null, null, null, null, null, null, null, null, null,
1341 null, null, null, null, null, null, null, null, null, null, null, null, null, null,
1342 "\52", null, null, null, null, null, null, null, null, null, null, null, null, null,
1343 null, null, null, null, null, null, null, null, null, null, null, "\75", "\73",
1344 "\50", "\51", "\54", "\173", "\175", "\53", "\55", "\57", "\56", "\77", "\72",
1345 "\133", "\135", "\44", };
1346 public static final String[] lexStateNames = {
1347 "DEFAULT",
1349 static final long[] jjtoToken = {
1350 0xfffec3fffffffe01L, 0xfL,
1352 static final long[] jjtoSkip = {
1353 0x7eL, 0x0L,
1355 protected SimpleCharStream input_stream;
1356 private final int[] jjrounds = new int[54];
1357 private final int[] jjstateSet = new int[108];
1358 protected char curChar;
1359 public QueryParserTokenManager(SimpleCharStream stream){
1360 if (SimpleCharStream.staticFlag)
1361 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
1362 input_stream = stream;
1364 public QueryParserTokenManager(SimpleCharStream stream, int lexState){
1365 this(stream);
1366 SwitchTo(lexState);
1368 public void ReInit(SimpleCharStream stream)
1370 jjmatchedPos = jjnewStateCnt = 0;
1371 curLexState = defaultLexState;
1372 input_stream = stream;
1373 ReInitRounds();
1375 private final void ReInitRounds()
1377 int i;
1378 jjround = 0x80000001;
1379 for (i = 54; i-- > 0;)
1380 jjrounds[i] = 0x80000000;
1382 public void ReInit(SimpleCharStream stream, int lexState)
1384 ReInit(stream);
1385 SwitchTo(lexState);
1387 public void SwitchTo(int lexState)
1389 if (lexState >= 1 || lexState < 0)
1390 throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
1391 else
1392 curLexState = lexState;
1395 protected Token jjFillToken()
1397 Token t = Token.newToken(jjmatchedKind);
1398 t.kind = jjmatchedKind;
1399 String im = jjstrLiteralImages[jjmatchedKind];
1400 t.image = (im == null) ? input_stream.GetImage() : im;
1401 t.beginLine = input_stream.getBeginLine();
1402 t.beginColumn = input_stream.getBeginColumn();
1403 t.endLine = input_stream.getEndLine();
1404 t.endColumn = input_stream.getEndColumn();
1405 return t;
1408 int curLexState = 0;
1409 int defaultLexState = 0;
1410 int jjnewStateCnt;
1411 int jjround;
1412 int jjmatchedPos;
1413 int jjmatchedKind;
1415 public Token getNextToken()
1417 int kind;
1418 Token specialToken = null;
1419 Token matchedToken;
1420 int curPos = 0;
1422 EOFLoop :
1423 for (;;)
1425 try
1427 curChar = input_stream.BeginToken();
1429 catch(java.io.IOException e)
1431 jjmatchedKind = 0;
1432 matchedToken = jjFillToken();
1433 return matchedToken;
1436 try { input_stream.backup(0);
1437 while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
1438 curChar = input_stream.BeginToken();
1440 catch (java.io.IOException e1) { continue EOFLoop; }
1441 jjmatchedKind = 0x7fffffff;
1442 jjmatchedPos = 0;
1443 curPos = jjMoveStringLiteralDfa0_0();
1444 if (jjmatchedKind != 0x7fffffff)
1446 if (jjmatchedPos + 1 < curPos)
1447 input_stream.backup(curPos - jjmatchedPos - 1);
1448 if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
1450 matchedToken = jjFillToken();
1451 return matchedToken;
1453 else
1455 continue EOFLoop;
1458 int error_line = input_stream.getEndLine();
1459 int error_column = input_stream.getEndColumn();
1460 String error_after = null;
1461 boolean EOFSeen = false;
1462 try { input_stream.readChar(); input_stream.backup(1); }
1463 catch (java.io.IOException e1) {
1464 EOFSeen = true;
1465 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1466 if (curChar == '\n' || curChar == '\r') {
1467 error_line++;
1468 error_column = 0;
1470 else
1471 error_column++;
1473 if (!EOFSeen) {
1474 input_stream.backup(1);
1475 error_after = curPos <= 1 ? "" : input_stream.GetImage();
1477 throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);