Revision created by MOE tool push_codebase.
[gae.git] / java / src / main / com / google / appengine / api / search / query / ExpressionLexer.java
blob25a2221a1688591da3de88033c5e5dc847c522a4
3 package com.google.appengine.api.search.query;
5 import org.antlr.runtime.*;
7 public class ExpressionLexer extends Lexer {
8 public static final int DOLLAR=54;
9 public static final int EXPONENT=49;
10 public static final int LT=11;
11 public static final int LSQUARE=23;
12 public static final int ASCII_LETTER=52;
13 public static final int LOG=40;
14 public static final int SNIPPET=44;
15 public static final int OCTAL_ESC=57;
16 public static final int MAX=41;
17 public static final int COUNT=38;
18 public static final int FLOAT=34;
19 public static final int NAME_START=50;
20 public static final int HTML=28;
21 public static final int NOT=10;
22 public static final int ATOM=29;
23 public static final int AND=7;
24 public static final int EOF=-1;
25 public static final int LPAREN=21;
26 public static final int INDEX=5;
27 public static final int QUOTE=47;
28 public static final int RPAREN=22;
29 public static final int DISTANCE=39;
30 public static final int T__58=58;
31 public static final int NAME=26;
32 public static final int ESC_SEQ=48;
33 public static final int POW=43;
34 public static final int COMMA=36;
35 public static final int PLUS=17;
36 public static final int GEO=32;
37 public static final int DIGIT=46;
38 public static final int EQ=15;
39 public static final int NE=16;
40 public static final int GE=14;
41 public static final int XOR=9;
42 public static final int SWITCH=45;
43 public static final int UNICODE_ESC=56;
44 public static final int NUMBER=31;
45 public static final int HEX_DIGIT=55;
46 public static final int UNDERSCORE=53;
47 public static final int INT=24;
48 public static final int MIN=42;
49 public static final int TEXT=27;
50 public static final int RSQUARE=25;
51 public static final int MINUS=18;
52 public static final int GEOPOINT=33;
53 public static final int PHRASE=35;
54 public static final int ABS=37;
55 public static final int WS=51;
56 public static final int NEG=4;
57 public static final int OR=8;
58 public static final int GT=13;
59 public static final int DIV=20;
60 public static final int DATE=30;
61 public static final int TIMES=19;
62 public static final int COND=6;
63 public static final int LE=12;
65 public ExpressionLexer() {;}
66 public ExpressionLexer(CharStream input) {
67 this(input, new RecognizerSharedState());
69 public ExpressionLexer(CharStream input, RecognizerSharedState state) {
70 super(input,state);
73 public String getGrammarFileName() { return ""; }
75 public final void mT__58() throws RecognitionException {
76 try {
77 int _type = T__58;
78 int _channel = DEFAULT_TOKEN_CHANNEL;
80 match('.');
84 state.type = _type;
85 state.channel = _channel;
87 finally {
91 public final void mABS() throws RecognitionException {
92 try {
93 int _type = ABS;
94 int _channel = DEFAULT_TOKEN_CHANNEL;
96 match("abs");
100 state.type = _type;
101 state.channel = _channel;
103 finally {
107 public final void mCOUNT() throws RecognitionException {
108 try {
109 int _type = COUNT;
110 int _channel = DEFAULT_TOKEN_CHANNEL;
112 match("count");
116 state.type = _type;
117 state.channel = _channel;
119 finally {
123 public final void mDISTANCE() throws RecognitionException {
124 try {
125 int _type = DISTANCE;
126 int _channel = DEFAULT_TOKEN_CHANNEL;
128 match("distance");
132 state.type = _type;
133 state.channel = _channel;
135 finally {
139 public final void mGEOPOINT() throws RecognitionException {
140 try {
141 int _type = GEOPOINT;
142 int _channel = DEFAULT_TOKEN_CHANNEL;
144 match("geopoint");
148 state.type = _type;
149 state.channel = _channel;
151 finally {
155 public final void mLOG() throws RecognitionException {
156 try {
157 int _type = LOG;
158 int _channel = DEFAULT_TOKEN_CHANNEL;
160 match("log");
164 state.type = _type;
165 state.channel = _channel;
167 finally {
171 public final void mMAX() throws RecognitionException {
172 try {
173 int _type = MAX;
174 int _channel = DEFAULT_TOKEN_CHANNEL;
176 match("max");
180 state.type = _type;
181 state.channel = _channel;
183 finally {
187 public final void mMIN() throws RecognitionException {
188 try {
189 int _type = MIN;
190 int _channel = DEFAULT_TOKEN_CHANNEL;
192 match("min");
196 state.type = _type;
197 state.channel = _channel;
199 finally {
203 public final void mPOW() throws RecognitionException {
204 try {
205 int _type = POW;
206 int _channel = DEFAULT_TOKEN_CHANNEL;
208 match("pow");
212 state.type = _type;
213 state.channel = _channel;
215 finally {
219 public final void mAND() throws RecognitionException {
220 try {
221 int _type = AND;
222 int _channel = DEFAULT_TOKEN_CHANNEL;
224 match("AND");
228 state.type = _type;
229 state.channel = _channel;
231 finally {
235 public final void mOR() throws RecognitionException {
236 try {
237 int _type = OR;
238 int _channel = DEFAULT_TOKEN_CHANNEL;
240 match("OR");
244 state.type = _type;
245 state.channel = _channel;
247 finally {
251 public final void mXOR() throws RecognitionException {
252 try {
253 int _type = XOR;
254 int _channel = DEFAULT_TOKEN_CHANNEL;
256 match("XOR");
260 state.type = _type;
261 state.channel = _channel;
263 finally {
267 public final void mNOT() throws RecognitionException {
268 try {
269 int _type = NOT;
270 int _channel = DEFAULT_TOKEN_CHANNEL;
272 match("NOT");
276 state.type = _type;
277 state.channel = _channel;
279 finally {
283 public final void mSNIPPET() throws RecognitionException {
284 try {
285 int _type = SNIPPET;
286 int _channel = DEFAULT_TOKEN_CHANNEL;
288 match("snippet");
292 state.type = _type;
293 state.channel = _channel;
295 finally {
299 public final void mSWITCH() throws RecognitionException {
300 try {
301 int _type = SWITCH;
302 int _channel = DEFAULT_TOKEN_CHANNEL;
304 match("switch");
308 state.type = _type;
309 state.channel = _channel;
311 finally {
315 public final void mTEXT() throws RecognitionException {
316 try {
317 int _type = TEXT;
318 int _channel = DEFAULT_TOKEN_CHANNEL;
320 match("text");
324 state.type = _type;
325 state.channel = _channel;
327 finally {
331 public final void mHTML() throws RecognitionException {
332 try {
333 int _type = HTML;
334 int _channel = DEFAULT_TOKEN_CHANNEL;
336 match("html");
340 state.type = _type;
341 state.channel = _channel;
343 finally {
347 public final void mATOM() throws RecognitionException {
348 try {
349 int _type = ATOM;
350 int _channel = DEFAULT_TOKEN_CHANNEL;
352 match("atom");
356 state.type = _type;
357 state.channel = _channel;
359 finally {
363 public final void mDATE() throws RecognitionException {
364 try {
365 int _type = DATE;
366 int _channel = DEFAULT_TOKEN_CHANNEL;
368 match("date");
372 state.type = _type;
373 state.channel = _channel;
375 finally {
379 public final void mNUMBER() throws RecognitionException {
380 try {
381 int _type = NUMBER;
382 int _channel = DEFAULT_TOKEN_CHANNEL;
384 match("number");
388 state.type = _type;
389 state.channel = _channel;
391 finally {
395 public final void mGEO() throws RecognitionException {
396 try {
397 int _type = GEO;
398 int _channel = DEFAULT_TOKEN_CHANNEL;
400 match("geo");
404 state.type = _type;
405 state.channel = _channel;
407 finally {
411 public final void mINT() throws RecognitionException {
412 try {
413 int _type = INT;
414 int _channel = DEFAULT_TOKEN_CHANNEL;
416 int cnt1=0;
417 loop1:
418 do {
419 int alt1=2;
420 int LA1_0 = input.LA(1);
422 if ( ((LA1_0>='0' && LA1_0<='9')) ) {
423 alt1=1;
426 switch (alt1) {
427 case 1 :
429 mDIGIT();
432 break;
434 default :
435 if ( cnt1 >= 1 ) break loop1;
436 EarlyExitException eee =
437 new EarlyExitException(1, input);
438 throw eee;
440 cnt1++;
441 } while (true);
445 state.type = _type;
446 state.channel = _channel;
448 finally {
452 public final void mPHRASE() throws RecognitionException {
453 try {
454 int _type = PHRASE;
455 int _channel = DEFAULT_TOKEN_CHANNEL;
457 mQUOTE();
458 loop2:
459 do {
460 int alt2=3;
461 int LA2_0 = input.LA(1);
463 if ( (LA2_0=='\\') ) {
464 alt2=1;
466 else if ( ((LA2_0>='\u0000' && LA2_0<='!')||(LA2_0>='#' && LA2_0<='[')||(LA2_0>=']' && LA2_0<='\uFFFF')) ) {
467 alt2=2;
470 switch (alt2) {
471 case 1 :
473 mESC_SEQ();
476 break;
477 case 2 :
479 if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
480 input.consume();
483 else {
484 MismatchedSetException mse = new MismatchedSetException(null,input);
485 recover(mse);
486 throw mse;}
489 break;
491 default :
492 break loop2;
494 } while (true);
496 mQUOTE();
500 state.type = _type;
501 state.channel = _channel;
503 finally {
507 public final void mFLOAT() throws RecognitionException {
508 try {
509 int _type = FLOAT;
510 int _channel = DEFAULT_TOKEN_CHANNEL;
511 int alt9=3;
512 alt9 = dfa9.predict(input);
513 switch (alt9) {
514 case 1 :
516 int cnt3=0;
517 loop3:
518 do {
519 int alt3=2;
520 int LA3_0 = input.LA(1);
522 if ( ((LA3_0>='0' && LA3_0<='9')) ) {
523 alt3=1;
526 switch (alt3) {
527 case 1 :
529 mDIGIT();
532 break;
534 default :
535 if ( cnt3 >= 1 ) break loop3;
536 EarlyExitException eee =
537 new EarlyExitException(3, input);
538 throw eee;
540 cnt3++;
541 } while (true);
543 match('.');
544 loop4:
545 do {
546 int alt4=2;
547 int LA4_0 = input.LA(1);
549 if ( ((LA4_0>='0' && LA4_0<='9')) ) {
550 alt4=1;
553 switch (alt4) {
554 case 1 :
556 mDIGIT();
559 break;
561 default :
562 break loop4;
564 } while (true);
566 int alt5=2;
567 int LA5_0 = input.LA(1);
569 if ( (LA5_0=='E'||LA5_0=='e') ) {
570 alt5=1;
572 switch (alt5) {
573 case 1 :
575 mEXPONENT();
578 break;
583 break;
584 case 2 :
586 match('.');
587 int cnt6=0;
588 loop6:
589 do {
590 int alt6=2;
591 int LA6_0 = input.LA(1);
593 if ( ((LA6_0>='0' && LA6_0<='9')) ) {
594 alt6=1;
597 switch (alt6) {
598 case 1 :
600 mDIGIT();
603 break;
605 default :
606 if ( cnt6 >= 1 ) break loop6;
607 EarlyExitException eee =
608 new EarlyExitException(6, input);
609 throw eee;
611 cnt6++;
612 } while (true);
614 int alt7=2;
615 int LA7_0 = input.LA(1);
617 if ( (LA7_0=='E'||LA7_0=='e') ) {
618 alt7=1;
620 switch (alt7) {
621 case 1 :
623 mEXPONENT();
626 break;
631 break;
632 case 3 :
634 int cnt8=0;
635 loop8:
636 do {
637 int alt8=2;
638 int LA8_0 = input.LA(1);
640 if ( ((LA8_0>='0' && LA8_0<='9')) ) {
641 alt8=1;
644 switch (alt8) {
645 case 1 :
647 mDIGIT();
650 break;
652 default :
653 if ( cnt8 >= 1 ) break loop8;
654 EarlyExitException eee =
655 new EarlyExitException(8, input);
656 throw eee;
658 cnt8++;
659 } while (true);
661 mEXPONENT();
664 break;
667 state.type = _type;
668 state.channel = _channel;
670 finally {
674 public final void mNAME() throws RecognitionException {
675 try {
676 int _type = NAME;
677 int _channel = DEFAULT_TOKEN_CHANNEL;
679 mNAME_START();
680 loop10:
681 do {
682 int alt10=2;
683 int LA10_0 = input.LA(1);
685 if ( (LA10_0=='$'||(LA10_0>='0' && LA10_0<='9')||(LA10_0>='A' && LA10_0<='Z')||LA10_0=='_'||(LA10_0>='a' && LA10_0<='z')) ) {
686 alt10=1;
689 switch (alt10) {
690 case 1 :
692 if ( input.LA(1)=='$'||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
693 input.consume();
696 else {
697 MismatchedSetException mse = new MismatchedSetException(null,input);
698 recover(mse);
699 throw mse;}
702 break;
704 default :
705 break loop10;
707 } while (true);
711 state.type = _type;
712 state.channel = _channel;
714 finally {
718 public final void mLPAREN() throws RecognitionException {
719 try {
720 int _type = LPAREN;
721 int _channel = DEFAULT_TOKEN_CHANNEL;
723 match('(');
727 state.type = _type;
728 state.channel = _channel;
730 finally {
734 public final void mRPAREN() throws RecognitionException {
735 try {
736 int _type = RPAREN;
737 int _channel = DEFAULT_TOKEN_CHANNEL;
739 match(')');
743 state.type = _type;
744 state.channel = _channel;
746 finally {
750 public final void mLSQUARE() throws RecognitionException {
751 try {
752 int _type = LSQUARE;
753 int _channel = DEFAULT_TOKEN_CHANNEL;
755 match('[');
759 state.type = _type;
760 state.channel = _channel;
762 finally {
766 public final void mRSQUARE() throws RecognitionException {
767 try {
768 int _type = RSQUARE;
769 int _channel = DEFAULT_TOKEN_CHANNEL;
771 match(']');
775 state.type = _type;
776 state.channel = _channel;
778 finally {
782 public final void mPLUS() throws RecognitionException {
783 try {
784 int _type = PLUS;
785 int _channel = DEFAULT_TOKEN_CHANNEL;
787 match('+');
791 state.type = _type;
792 state.channel = _channel;
794 finally {
798 public final void mMINUS() throws RecognitionException {
799 try {
800 int _type = MINUS;
801 int _channel = DEFAULT_TOKEN_CHANNEL;
803 match('-');
807 state.type = _type;
808 state.channel = _channel;
810 finally {
814 public final void mTIMES() throws RecognitionException {
815 try {
816 int _type = TIMES;
817 int _channel = DEFAULT_TOKEN_CHANNEL;
819 match('*');
823 state.type = _type;
824 state.channel = _channel;
826 finally {
830 public final void mDIV() throws RecognitionException {
831 try {
832 int _type = DIV;
833 int _channel = DEFAULT_TOKEN_CHANNEL;
835 match('/');
839 state.type = _type;
840 state.channel = _channel;
842 finally {
846 public final void mLT() throws RecognitionException {
847 try {
848 int _type = LT;
849 int _channel = DEFAULT_TOKEN_CHANNEL;
851 match('<');
855 state.type = _type;
856 state.channel = _channel;
858 finally {
862 public final void mLE() throws RecognitionException {
863 try {
864 int _type = LE;
865 int _channel = DEFAULT_TOKEN_CHANNEL;
867 match("<=");
871 state.type = _type;
872 state.channel = _channel;
874 finally {
878 public final void mGT() throws RecognitionException {
879 try {
880 int _type = GT;
881 int _channel = DEFAULT_TOKEN_CHANNEL;
883 match('>');
887 state.type = _type;
888 state.channel = _channel;
890 finally {
894 public final void mGE() throws RecognitionException {
895 try {
896 int _type = GE;
897 int _channel = DEFAULT_TOKEN_CHANNEL;
899 match(">=");
903 state.type = _type;
904 state.channel = _channel;
906 finally {
910 public final void mEQ() throws RecognitionException {
911 try {
912 int _type = EQ;
913 int _channel = DEFAULT_TOKEN_CHANNEL;
915 match('=');
919 state.type = _type;
920 state.channel = _channel;
922 finally {
926 public final void mNE() throws RecognitionException {
927 try {
928 int _type = NE;
929 int _channel = DEFAULT_TOKEN_CHANNEL;
931 match("!=");
935 state.type = _type;
936 state.channel = _channel;
938 finally {
942 public final void mCOND() throws RecognitionException {
943 try {
944 int _type = COND;
945 int _channel = DEFAULT_TOKEN_CHANNEL;
947 match('?');
951 state.type = _type;
952 state.channel = _channel;
954 finally {
958 public final void mQUOTE() throws RecognitionException {
959 try {
960 int _type = QUOTE;
961 int _channel = DEFAULT_TOKEN_CHANNEL;
963 match('\"');
967 state.type = _type;
968 state.channel = _channel;
970 finally {
974 public final void mCOMMA() throws RecognitionException {
975 try {
976 int _type = COMMA;
977 int _channel = DEFAULT_TOKEN_CHANNEL;
979 match(',');
983 state.type = _type;
984 state.channel = _channel;
986 finally {
990 public final void mWS() throws RecognitionException {
991 try {
992 int _type = WS;
993 int _channel = DEFAULT_TOKEN_CHANNEL;
995 int cnt11=0;
996 loop11:
997 do {
998 int alt11=2;
999 int LA11_0 = input.LA(1);
1001 if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) {
1002 alt11=1;
1005 switch (alt11) {
1006 case 1 :
1008 if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) {
1009 input.consume();
1012 else {
1013 MismatchedSetException mse = new MismatchedSetException(null,input);
1014 recover(mse);
1015 throw mse;}
1018 break;
1020 default :
1021 if ( cnt11 >= 1 ) break loop11;
1022 EarlyExitException eee =
1023 new EarlyExitException(11, input);
1024 throw eee;
1026 cnt11++;
1027 } while (true);
1029 _channel = HIDDEN;
1033 state.type = _type;
1034 state.channel = _channel;
1036 finally {
1040 public final void mEXPONENT() throws RecognitionException {
1041 try {
1043 if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
1044 input.consume();
1047 else {
1048 MismatchedSetException mse = new MismatchedSetException(null,input);
1049 recover(mse);
1050 throw mse;}
1052 int alt12=2;
1053 int LA12_0 = input.LA(1);
1055 if ( (LA12_0=='+'||LA12_0=='-') ) {
1056 alt12=1;
1058 switch (alt12) {
1059 case 1 :
1061 if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
1062 input.consume();
1065 else {
1066 MismatchedSetException mse = new MismatchedSetException(null,input);
1067 recover(mse);
1068 throw mse;}
1071 break;
1075 int cnt13=0;
1076 loop13:
1077 do {
1078 int alt13=2;
1079 int LA13_0 = input.LA(1);
1081 if ( ((LA13_0>='0' && LA13_0<='9')) ) {
1082 alt13=1;
1085 switch (alt13) {
1086 case 1 :
1088 mDIGIT();
1091 break;
1093 default :
1094 if ( cnt13 >= 1 ) break loop13;
1095 EarlyExitException eee =
1096 new EarlyExitException(13, input);
1097 throw eee;
1099 cnt13++;
1100 } while (true);
1105 finally {
1109 public final void mNAME_START() throws RecognitionException {
1110 try {
1112 if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
1113 input.consume();
1116 else {
1117 MismatchedSetException mse = new MismatchedSetException(null,input);
1118 recover(mse);
1119 throw mse;}
1124 finally {
1128 public final void mASCII_LETTER() throws RecognitionException {
1129 try {
1131 if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
1132 input.consume();
1135 else {
1136 MismatchedSetException mse = new MismatchedSetException(null,input);
1137 recover(mse);
1138 throw mse;}
1143 finally {
1147 public final void mDIGIT() throws RecognitionException {
1148 try {
1150 matchRange('0','9');
1155 finally {
1159 public final void mDOLLAR() throws RecognitionException {
1160 try {
1162 match('$');
1167 finally {
1171 public final void mUNDERSCORE() throws RecognitionException {
1172 try {
1174 match('_');
1179 finally {
1183 public final void mHEX_DIGIT() throws RecognitionException {
1184 try {
1186 if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
1187 input.consume();
1190 else {
1191 MismatchedSetException mse = new MismatchedSetException(null,input);
1192 recover(mse);
1193 throw mse;}
1198 finally {
1202 public final void mESC_SEQ() throws RecognitionException {
1203 try {
1204 int alt14=3;
1205 int LA14_0 = input.LA(1);
1207 if ( (LA14_0=='\\') ) {
1208 switch ( input.LA(2) ) {
1209 case '\"':
1210 case '\'':
1211 case '\\':
1212 case 'b':
1213 case 'f':
1214 case 'n':
1215 case 'r':
1216 case 't':
1218 alt14=1;
1220 break;
1221 case 'u':
1223 alt14=2;
1225 break;
1226 case '0':
1227 case '1':
1228 case '2':
1229 case '3':
1230 case '4':
1231 case '5':
1232 case '6':
1233 case '7':
1235 alt14=3;
1237 break;
1238 default:
1239 NoViableAltException nvae =
1240 new NoViableAltException("", 14, 1, input);
1242 throw nvae;
1246 else {
1247 NoViableAltException nvae =
1248 new NoViableAltException("", 14, 0, input);
1250 throw nvae;
1252 switch (alt14) {
1253 case 1 :
1255 match('\\');
1256 if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
1257 input.consume();
1260 else {
1261 MismatchedSetException mse = new MismatchedSetException(null,input);
1262 recover(mse);
1263 throw mse;}
1266 break;
1267 case 2 :
1269 mUNICODE_ESC();
1272 break;
1273 case 3 :
1275 mOCTAL_ESC();
1278 break;
1282 finally {
1286 public final void mOCTAL_ESC() throws RecognitionException {
1287 try {
1288 int alt15=3;
1289 int LA15_0 = input.LA(1);
1291 if ( (LA15_0=='\\') ) {
1292 int LA15_1 = input.LA(2);
1294 if ( ((LA15_1>='0' && LA15_1<='3')) ) {
1295 int LA15_2 = input.LA(3);
1297 if ( ((LA15_2>='0' && LA15_2<='7')) ) {
1298 int LA15_4 = input.LA(4);
1300 if ( ((LA15_4>='0' && LA15_4<='7')) ) {
1301 alt15=1;
1303 else {
1304 alt15=2;}
1306 else {
1307 alt15=3;}
1309 else if ( ((LA15_1>='4' && LA15_1<='7')) ) {
1310 int LA15_3 = input.LA(3);
1312 if ( ((LA15_3>='0' && LA15_3<='7')) ) {
1313 alt15=2;
1315 else {
1316 alt15=3;}
1318 else {
1319 NoViableAltException nvae =
1320 new NoViableAltException("", 15, 1, input);
1322 throw nvae;
1325 else {
1326 NoViableAltException nvae =
1327 new NoViableAltException("", 15, 0, input);
1329 throw nvae;
1331 switch (alt15) {
1332 case 1 :
1334 match('\\');
1336 matchRange('0','3');
1341 matchRange('0','7');
1346 matchRange('0','7');
1351 break;
1352 case 2 :
1354 match('\\');
1356 matchRange('0','7');
1361 matchRange('0','7');
1366 break;
1367 case 3 :
1369 match('\\');
1371 matchRange('0','7');
1376 break;
1380 finally {
1384 public final void mUNICODE_ESC() throws RecognitionException {
1385 try {
1387 match('\\');
1388 match('u');
1389 mHEX_DIGIT();
1390 mHEX_DIGIT();
1391 mHEX_DIGIT();
1392 mHEX_DIGIT();
1397 finally {
1401 public void mTokens() throws RecognitionException {
1402 int alt16=43;
1403 alt16 = dfa16.predict(input);
1404 switch (alt16) {
1405 case 1 :
1407 mT__58();
1410 break;
1411 case 2 :
1413 mABS();
1416 break;
1417 case 3 :
1419 mCOUNT();
1422 break;
1423 case 4 :
1425 mDISTANCE();
1428 break;
1429 case 5 :
1431 mGEOPOINT();
1434 break;
1435 case 6 :
1437 mLOG();
1440 break;
1441 case 7 :
1443 mMAX();
1446 break;
1447 case 8 :
1449 mMIN();
1452 break;
1453 case 9 :
1455 mPOW();
1458 break;
1459 case 10 :
1461 mAND();
1464 break;
1465 case 11 :
1467 mOR();
1470 break;
1471 case 12 :
1473 mXOR();
1476 break;
1477 case 13 :
1479 mNOT();
1482 break;
1483 case 14 :
1485 mSNIPPET();
1488 break;
1489 case 15 :
1491 mSWITCH();
1494 break;
1495 case 16 :
1497 mTEXT();
1500 break;
1501 case 17 :
1503 mHTML();
1506 break;
1507 case 18 :
1509 mATOM();
1512 break;
1513 case 19 :
1515 mDATE();
1518 break;
1519 case 20 :
1521 mNUMBER();
1524 break;
1525 case 21 :
1527 mGEO();
1530 break;
1531 case 22 :
1533 mINT();
1536 break;
1537 case 23 :
1539 mPHRASE();
1542 break;
1543 case 24 :
1545 mFLOAT();
1548 break;
1549 case 25 :
1551 mNAME();
1554 break;
1555 case 26 :
1557 mLPAREN();
1560 break;
1561 case 27 :
1563 mRPAREN();
1566 break;
1567 case 28 :
1569 mLSQUARE();
1572 break;
1573 case 29 :
1575 mRSQUARE();
1578 break;
1579 case 30 :
1581 mPLUS();
1584 break;
1585 case 31 :
1587 mMINUS();
1590 break;
1591 case 32 :
1593 mTIMES();
1596 break;
1597 case 33 :
1599 mDIV();
1602 break;
1603 case 34 :
1605 mLT();
1608 break;
1609 case 35 :
1611 mLE();
1614 break;
1615 case 36 :
1617 mGT();
1620 break;
1621 case 37 :
1623 mGE();
1626 break;
1627 case 38 :
1629 mEQ();
1632 break;
1633 case 39 :
1635 mNE();
1638 break;
1639 case 40 :
1641 mCOND();
1644 break;
1645 case 41 :
1647 mQUOTE();
1650 break;
1651 case 42 :
1653 mCOMMA();
1656 break;
1657 case 43 :
1659 mWS();
1662 break;
1668 protected DFA9 dfa9 = new DFA9(this);
1669 protected DFA16 dfa16 = new DFA16(this);
1670 static final String DFA9_eotS =
1671 "\5\uffff";
1672 static final String DFA9_eofS =
1673 "\5\uffff";
1674 static final String DFA9_minS =
1675 "\2\56\3\uffff";
1676 static final String DFA9_maxS =
1677 "\1\71\1\145\3\uffff";
1678 static final String DFA9_acceptS =
1679 "\2\uffff\1\2\1\1\1\3";
1680 static final String DFA9_specialS =
1681 "\5\uffff}>";
1682 static final String[] DFA9_transitionS = {
1683 "\1\2\1\uffff\12\1",
1684 "\1\3\1\uffff\12\1\13\uffff\1\4\37\uffff\1\4",
1690 static final short[] DFA9_eot = DFA.unpackEncodedString(DFA9_eotS);
1691 static final short[] DFA9_eof = DFA.unpackEncodedString(DFA9_eofS);
1692 static final char[] DFA9_min = DFA.unpackEncodedStringToUnsignedChars(DFA9_minS);
1693 static final char[] DFA9_max = DFA.unpackEncodedStringToUnsignedChars(DFA9_maxS);
1694 static final short[] DFA9_accept = DFA.unpackEncodedString(DFA9_acceptS);
1695 static final short[] DFA9_special = DFA.unpackEncodedString(DFA9_specialS);
1696 static final short[][] DFA9_transition;
1698 static {
1699 int numStates = DFA9_transitionS.length;
1700 DFA9_transition = new short[numStates][];
1701 for (int i=0; i<numStates; i++) {
1702 DFA9_transition[i] = DFA.unpackEncodedString(DFA9_transitionS[i]);
1706 class DFA9 extends DFA {
1708 public DFA9(BaseRecognizer recognizer) {
1709 this.recognizer = recognizer;
1710 this.decisionNumber = 9;
1711 this.eot = DFA9_eot;
1712 this.eof = DFA9_eof;
1713 this.min = DFA9_min;
1714 this.max = DFA9_max;
1715 this.accept = DFA9_accept;
1716 this.special = DFA9_special;
1717 this.transition = DFA9_transition;
1719 public String getDescription() {
1720 return "261:1: FLOAT : ( ( DIGIT )+ '.' ( DIGIT )* ( EXPONENT )? | '.' ( DIGIT )+ ( EXPONENT )? | ( DIGIT )+ EXPONENT );";
1723 static final String DFA16_eotS =
1724 "\1\uffff\1\43\17\23\1\70\1\71\11\uffff\1\74\1\76\7\uffff\13\23\1"+
1725 "\112\7\23\7\uffff\1\122\4\23\1\130\1\131\1\132\1\133\1\134\1\135"+
1726 "\1\uffff\1\136\1\137\5\23\1\uffff\1\145\2\23\1\150\1\23\10\uffff"+
1727 "\2\23\1\154\1\155\1\23\1\uffff\1\157\1\23\1\uffff\3\23\2\uffff\1"+
1728 "\23\1\uffff\3\23\1\170\1\171\2\23\1\174\2\uffff\1\175\1\176\3\uffff";
1729 static final String DFA16_eofS =
1730 "\177\uffff";
1731 static final String DFA16_minS =
1732 "\1\11\1\60\1\142\1\157\1\141\1\145\1\157\1\141\1\157\1\116\1\122"+
1733 "\2\117\1\156\1\145\1\164\1\165\1\56\1\0\11\uffff\2\75\7\uffff\1"+
1734 "\163\1\157\1\165\1\163\1\164\1\157\1\147\1\170\1\156\1\167\1\104"+
1735 "\1\44\1\122\1\124\2\151\1\170\2\155\7\uffff\1\44\1\155\1\156\1\164"+
1736 "\1\145\6\44\1\uffff\2\44\1\160\2\164\1\154\1\142\1\uffff\1\44\1"+
1737 "\164\1\141\1\44\1\157\10\uffff\1\160\1\143\2\44\1\145\1\uffff\1"+
1738 "\44\1\156\1\uffff\1\151\1\145\1\150\2\uffff\1\162\1\uffff\1\143"+
1739 "\1\156\1\164\2\44\1\145\1\164\1\44\2\uffff\2\44\3\uffff";
1740 static final String DFA16_maxS =
1741 "\1\172\1\71\1\164\1\157\1\151\1\145\1\157\1\151\1\157\1\116\1\122"+
1742 "\2\117\1\167\1\145\1\164\1\165\1\145\1\uffff\11\uffff\2\75\7\uffff"+
1743 "\1\163\1\157\1\165\1\163\1\164\1\157\1\147\1\170\1\156\1\167\1\104"+
1744 "\1\172\1\122\1\124\2\151\1\170\2\155\7\uffff\1\172\1\155\1\156\1"+
1745 "\164\1\145\6\172\1\uffff\2\172\1\160\2\164\1\154\1\142\1\uffff\1"+
1746 "\172\1\164\1\141\1\172\1\157\10\uffff\1\160\1\143\2\172\1\145\1"+
1747 "\uffff\1\172\1\156\1\uffff\1\151\1\145\1\150\2\uffff\1\162\1\uffff"+
1748 "\1\143\1\156\1\164\2\172\1\145\1\164\1\172\2\uffff\2\172\3\uffff";
1749 static final String DFA16_acceptS =
1750 "\23\uffff\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40\1\41\2\uffff\1"+
1751 "\46\1\47\1\50\1\52\1\53\1\1\1\30\23\uffff\1\26\1\51\1\27\1\43\1"+
1752 "\42\1\45\1\44\13\uffff\1\13\7\uffff\1\2\5\uffff\1\25\1\6\1\7\1\10"+
1753 "\1\11\1\12\1\14\1\15\5\uffff\1\22\2\uffff\1\23\3\uffff\1\20\1\21"+
1754 "\1\uffff\1\3\10\uffff\1\17\1\24\2\uffff\1\16\1\4\1\5";
1755 static final String DFA16_specialS =
1756 "\22\uffff\1\0\154\uffff}>";
1757 static final String[] DFA16_transitionS = {
1758 "\2\42\2\uffff\1\42\22\uffff\1\42\1\37\1\22\1\uffff\1\23\3\uffff"+
1759 "\1\24\1\25\1\32\1\30\1\41\1\31\1\1\1\33\12\21\2\uffff\1\34\1"+
1760 "\36\1\35\1\40\1\uffff\1\11\14\23\1\14\1\12\10\23\1\13\2\23\1"+
1761 "\26\1\uffff\1\27\1\uffff\1\23\1\uffff\1\2\1\23\1\3\1\4\2\23"+
1762 "\1\5\1\17\3\23\1\6\1\7\1\20\1\23\1\10\2\23\1\15\1\16\6\23",
1763 "\12\44",
1764 "\1\45\21\uffff\1\46",
1765 "\1\47",
1766 "\1\51\7\uffff\1\50",
1767 "\1\52",
1768 "\1\53",
1769 "\1\54\7\uffff\1\55",
1770 "\1\56",
1771 "\1\57",
1772 "\1\60",
1773 "\1\61",
1774 "\1\62",
1775 "\1\63\10\uffff\1\64",
1776 "\1\65",
1777 "\1\66",
1778 "\1\67",
1779 "\1\44\1\uffff\12\21\13\uffff\1\44\37\uffff\1\44",
1780 "\0\72",
1790 "\1\73",
1791 "\1\75",
1799 "\1\77",
1800 "\1\100",
1801 "\1\101",
1802 "\1\102",
1803 "\1\103",
1804 "\1\104",
1805 "\1\105",
1806 "\1\106",
1807 "\1\107",
1808 "\1\110",
1809 "\1\111",
1810 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1811 "\23",
1812 "\1\113",
1813 "\1\114",
1814 "\1\115",
1815 "\1\116",
1816 "\1\117",
1817 "\1\120",
1818 "\1\121",
1826 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1827 "\23",
1828 "\1\123",
1829 "\1\124",
1830 "\1\125",
1831 "\1\126",
1832 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\17"+
1833 "\23\1\127\12\23",
1834 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1835 "\23",
1836 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1837 "\23",
1838 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1839 "\23",
1840 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1841 "\23",
1842 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1843 "\23",
1845 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1846 "\23",
1847 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1848 "\23",
1849 "\1\140",
1850 "\1\141",
1851 "\1\142",
1852 "\1\143",
1853 "\1\144",
1855 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1856 "\23",
1857 "\1\146",
1858 "\1\147",
1859 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1860 "\23",
1861 "\1\151",
1870 "\1\152",
1871 "\1\153",
1872 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1873 "\23",
1874 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1875 "\23",
1876 "\1\156",
1878 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1879 "\23",
1880 "\1\160",
1882 "\1\161",
1883 "\1\162",
1884 "\1\163",
1887 "\1\164",
1889 "\1\165",
1890 "\1\166",
1891 "\1\167",
1892 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1893 "\23",
1894 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1895 "\23",
1896 "\1\172",
1897 "\1\173",
1898 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1899 "\23",
1902 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1903 "\23",
1904 "\1\23\13\uffff\12\23\7\uffff\32\23\4\uffff\1\23\1\uffff\32"+
1905 "\23",
1911 static final short[] DFA16_eot = DFA.unpackEncodedString(DFA16_eotS);
1912 static final short[] DFA16_eof = DFA.unpackEncodedString(DFA16_eofS);
1913 static final char[] DFA16_min = DFA.unpackEncodedStringToUnsignedChars(DFA16_minS);
1914 static final char[] DFA16_max = DFA.unpackEncodedStringToUnsignedChars(DFA16_maxS);
1915 static final short[] DFA16_accept = DFA.unpackEncodedString(DFA16_acceptS);
1916 static final short[] DFA16_special = DFA.unpackEncodedString(DFA16_specialS);
1917 static final short[][] DFA16_transition;
1919 static {
1920 int numStates = DFA16_transitionS.length;
1921 DFA16_transition = new short[numStates][];
1922 for (int i=0; i<numStates; i++) {
1923 DFA16_transition[i] = DFA.unpackEncodedString(DFA16_transitionS[i]);
1927 class DFA16 extends DFA {
1929 public DFA16(BaseRecognizer recognizer) {
1930 this.recognizer = recognizer;
1931 this.decisionNumber = 16;
1932 this.eot = DFA16_eot;
1933 this.eof = DFA16_eof;
1934 this.min = DFA16_min;
1935 this.max = DFA16_max;
1936 this.accept = DFA16_accept;
1937 this.special = DFA16_special;
1938 this.transition = DFA16_transition;
1940 public String getDescription() {
1941 return "1:1: Tokens : ( T__58 | ABS | COUNT | DISTANCE | GEOPOINT | LOG | MAX | MIN | POW | AND | OR | XOR | NOT | SNIPPET | SWITCH | TEXT | HTML | ATOM | DATE | NUMBER | GEO | INT | PHRASE | FLOAT | NAME | LPAREN | RPAREN | LSQUARE | RSQUARE | PLUS | MINUS | TIMES | DIV | LT | LE | GT | GE | EQ | NE | COND | QUOTE | COMMA | WS );";
1943 public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
1944 IntStream input = _input;
1945 int _s = s;
1946 switch ( s ) {
1947 case 0 :
1948 int LA16_18 = input.LA(1);
1950 s = -1;
1951 if ( ((LA16_18>='\u0000' && LA16_18<='\uFFFF')) ) {s = 58;}
1953 else s = 57;
1955 if ( s>=0 ) return s;
1956 break;
1958 NoViableAltException nvae =
1959 new NoViableAltException(getDescription(), 16, _s, input);
1960 error(nvae);
1961 throw nvae;