3 package com
.google
.appengine
.api
.search
.query
;
5 import org
.antlr
.runtime
.*;
7 public class QueryLexer
extends Lexer
{
8 public static final int FUNCTION
=7;
9 public static final int LT
=17;
10 public static final int GEO_POINT_FN
=29;
11 public static final int FIX
=30;
12 public static final int ESC
=34;
13 public static final int OCTAL_ESC
=36;
14 public static final int FUZZY
=8;
15 public static final int NOT
=27;
16 public static final int DISTANCE_FN
=28;
17 public static final int AND
=25;
18 public static final int ESCAPED_CHAR
=40;
19 public static final int EOF
=-1;
20 public static final int LPAREN
=23;
21 public static final int HAS
=22;
22 public static final int CHAR_SEQ
=37;
23 public static final int QUOTE
=33;
24 public static final int RPAREN
=24;
25 public static final int START_CHAR
=41;
26 public static final int ARGS
=4;
27 public static final int DIGIT
=38;
28 public static final int EQ
=21;
29 public static final int NE
=20;
30 public static final int T__43
=43;
31 public static final int GE
=18;
32 public static final int T__44
=44;
33 public static final int T__45
=45;
34 public static final int CONJUNCTION
=5;
35 public static final int UNICODE_ESC
=35;
36 public static final int HEX_DIGIT
=42;
37 public static final int LITERAL
=10;
38 public static final int VALUE
=14;
39 public static final int TEXT
=32;
40 public static final int REWRITE
=31;
41 public static final int SEQUENCE
=13;
42 public static final int DISJUNCTION
=6;
43 public static final int WS
=15;
44 public static final int NEGATION
=11;
45 public static final int OR
=26;
46 public static final int GT
=19;
47 public static final int GLOBAL
=9;
48 public static final int LE
=16;
49 public static final int MID_CHAR
=39;
50 public static final int STRING
=12;
52 public QueryLexer() {;}
53 public QueryLexer(CharStream input
) {
54 this(input
, new RecognizerSharedState());
56 public QueryLexer(CharStream input
, RecognizerSharedState state
) {
60 public String
getGrammarFileName() { return "java/com/google/appengine/api/search/query/Query.g"; }
62 public final void mT__43() throws RecognitionException
{
65 int _channel
= DEFAULT_TOKEN_CHANNEL
;
72 state
.channel
= _channel
;
78 public final void mT__44() throws RecognitionException
{
81 int _channel
= DEFAULT_TOKEN_CHANNEL
;
88 state
.channel
= _channel
;
94 public final void mT__45() throws RecognitionException
{
97 int _channel
= DEFAULT_TOKEN_CHANNEL
;
104 state
.channel
= _channel
;
110 public final void mHAS() throws RecognitionException
{
113 int _channel
= DEFAULT_TOKEN_CHANNEL
;
120 state
.channel
= _channel
;
126 public final void mOR() throws RecognitionException
{
129 int _channel
= DEFAULT_TOKEN_CHANNEL
;
136 state
.channel
= _channel
;
142 public final void mAND() throws RecognitionException
{
145 int _channel
= DEFAULT_TOKEN_CHANNEL
;
152 state
.channel
= _channel
;
158 public final void mNOT() throws RecognitionException
{
161 int _channel
= DEFAULT_TOKEN_CHANNEL
;
168 state
.channel
= _channel
;
174 public final void mREWRITE() throws RecognitionException
{
177 int _channel
= DEFAULT_TOKEN_CHANNEL
;
184 state
.channel
= _channel
;
190 public final void mFIX() throws RecognitionException
{
193 int _channel
= DEFAULT_TOKEN_CHANNEL
;
200 state
.channel
= _channel
;
206 public final void mDISTANCE_FN() throws RecognitionException
{
208 int _type
= DISTANCE_FN
;
209 int _channel
= DEFAULT_TOKEN_CHANNEL
;
216 state
.channel
= _channel
;
222 public final void mGEO_POINT_FN() throws RecognitionException
{
224 int _type
= GEO_POINT_FN
;
225 int _channel
= DEFAULT_TOKEN_CHANNEL
;
232 state
.channel
= _channel
;
238 public final void mESC() throws RecognitionException
{
241 int _channel
= DEFAULT_TOKEN_CHANNEL
;
243 int LA1_0
= input
.LA(1);
245 if ( (LA1_0
=='\\') ) {
246 switch ( input
.LA(2) ) {
271 NoViableAltException nvae
=
272 new NoViableAltException("", 1, 1, input
);
279 NoViableAltException nvae
=
280 new NoViableAltException("", 1, 0, input
);
288 if ( input
.LA(1)=='\"'||input
.LA(1)=='\\' ) {
293 MismatchedSetException mse
= new MismatchedSetException(null,input
);
314 state
.channel
= _channel
;
320 public final void mWS() throws RecognitionException
{
323 int _channel
= DEFAULT_TOKEN_CHANNEL
;
325 if ( (input
.LA(1)>='\t' && input
.LA(1)<='\n')||(input
.LA(1)>='\f' && input
.LA(1)<='\r')||input
.LA(1)==' ' ) {
330 MismatchedSetException mse
= new MismatchedSetException(null,input
);
337 state
.channel
= _channel
;
343 public final void mLPAREN() throws RecognitionException
{
346 int _channel
= DEFAULT_TOKEN_CHANNEL
;
353 state
.channel
= _channel
;
359 public final void mRPAREN() throws RecognitionException
{
362 int _channel
= DEFAULT_TOKEN_CHANNEL
;
369 state
.channel
= _channel
;
375 public final void mLT() throws RecognitionException
{
378 int _channel
= DEFAULT_TOKEN_CHANNEL
;
385 state
.channel
= _channel
;
391 public final void mGT() throws RecognitionException
{
394 int _channel
= DEFAULT_TOKEN_CHANNEL
;
401 state
.channel
= _channel
;
407 public final void mGE() throws RecognitionException
{
410 int _channel
= DEFAULT_TOKEN_CHANNEL
;
417 state
.channel
= _channel
;
423 public final void mLE() throws RecognitionException
{
426 int _channel
= DEFAULT_TOKEN_CHANNEL
;
433 state
.channel
= _channel
;
439 public final void mNE() throws RecognitionException
{
442 int _channel
= DEFAULT_TOKEN_CHANNEL
;
449 state
.channel
= _channel
;
455 public final void mEQ() throws RecognitionException
{
458 int _channel
= DEFAULT_TOKEN_CHANNEL
;
465 state
.channel
= _channel
;
471 public final void mQUOTE() throws RecognitionException
{
474 int _channel
= DEFAULT_TOKEN_CHANNEL
;
481 state
.channel
= _channel
;
487 public final void mTEXT() throws RecognitionException
{
490 int _channel
= DEFAULT_TOKEN_CHANNEL
;
492 int LA4_0
= input
.LA(1);
494 if ( (LA4_0
=='!'||(LA4_0
>='#' && LA4_0
<='\'')||LA4_0
=='*'||(LA4_0
>='.' && LA4_0
<='/')||LA4_0
==';'||(LA4_0
>='?' && LA4_0
<='}')||(LA4_0
>='\u00A1' && LA4_0
<='\uFFEE')) ) {
497 else if ( (LA4_0
=='-'||(LA4_0
>='0' && LA4_0
<='9')) ) {
501 NoViableAltException nvae
=
502 new NoViableAltException("", 4, 0, input
);
516 int LA2_0
= input
.LA(1);
518 if ( (LA2_0
=='-') ) {
535 int LA3_0
= input
.LA(1);
537 if ( (LA3_0
=='!'||(LA3_0
>='#' && LA3_0
<='\'')||(LA3_0
>='*' && LA3_0
<='+')||(LA3_0
>='-' && LA3_0
<='9')||LA3_0
==';'||(LA3_0
>='?' && LA3_0
<='[')||(LA3_0
>=']' && LA3_0
<='}')||(LA3_0
>='\u00A1' && LA3_0
<='\uFFEE')) ) {
540 else if ( (LA3_0
=='\\') ) {
541 switch ( input
.LA(2) ) {
613 state
.channel
= _channel
;
619 public final void mCHAR_SEQ() throws RecognitionException
{
623 int LA5_0
= input
.LA(1);
625 if ( (LA5_0
=='!'||(LA5_0
>='#' && LA5_0
<='\'')||LA5_0
=='*'||(LA5_0
>='.' && LA5_0
<='/')||LA5_0
==';'||(LA5_0
>='?' && LA5_0
<='[')||(LA5_0
>=']' && LA5_0
<='}')||(LA5_0
>='\u00A1' && LA5_0
<='\uFFEE')) ) {
628 else if ( (LA5_0
=='\\') ) {
629 switch ( input
.LA(2) ) {
661 NoViableAltException nvae
=
662 new NoViableAltException("", 5, 2, input
);
669 NoViableAltException nvae
=
670 new NoViableAltException("", 5, 0, input
);
705 int LA6_0
= input
.LA(1);
707 if ( (LA6_0
=='!'||(LA6_0
>='#' && LA6_0
<='\'')||(LA6_0
>='*' && LA6_0
<='+')||(LA6_0
>='-' && LA6_0
<='9')||LA6_0
==';'||(LA6_0
>='?' && LA6_0
<='[')||(LA6_0
>=']' && LA6_0
<='}')||(LA6_0
>='\u00A1' && LA6_0
<='\uFFEE')) ) {
710 else if ( (LA6_0
=='\\') ) {
711 switch ( input
.LA(2) ) {
785 public final void mUNICODE_ESC() throws RecognitionException
{
802 public final void mOCTAL_ESC() throws RecognitionException
{
805 int LA7_0
= input
.LA(1);
807 if ( (LA7_0
=='\\') ) {
808 int LA7_1
= input
.LA(2);
810 if ( ((LA7_1
>='0' && LA7_1
<='3')) ) {
811 int LA7_2
= input
.LA(3);
813 if ( ((LA7_2
>='0' && LA7_2
<='7')) ) {
814 int LA7_4
= input
.LA(4);
816 if ( ((LA7_4
>='0' && LA7_4
<='7')) ) {
825 else if ( ((LA7_1
>='4' && LA7_1
<='7')) ) {
826 int LA7_3
= input
.LA(3);
828 if ( ((LA7_3
>='0' && LA7_3
<='7')) ) {
835 NoViableAltException nvae
=
836 new NoViableAltException("", 7, 1, input
);
842 NoViableAltException nvae
=
843 new NoViableAltException("", 7, 0, input
);
900 public final void mDIGIT() throws RecognitionException
{
912 public final void mHEX_DIGIT() throws RecognitionException
{
915 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') ) {
920 MismatchedSetException mse
= new MismatchedSetException(null,input
);
931 public final void mSTART_CHAR() throws RecognitionException
{
934 if ( input
.LA(1)=='!'||(input
.LA(1)>='#' && input
.LA(1)<='\'')||input
.LA(1)=='*'||(input
.LA(1)>='.' && input
.LA(1)<='/')||input
.LA(1)==';'||(input
.LA(1)>='?' && input
.LA(1)<='[')||(input
.LA(1)>=']' && input
.LA(1)<='}')||(input
.LA(1)>='\u00A1' && input
.LA(1)<='\uFFEE') ) {
939 MismatchedSetException mse
= new MismatchedSetException(null,input
);
950 public final void mMID_CHAR() throws RecognitionException
{
953 if ( input
.LA(1)=='!'||(input
.LA(1)>='#' && input
.LA(1)<='\'')||(input
.LA(1)>='*' && input
.LA(1)<='+')||(input
.LA(1)>='-' && input
.LA(1)<='9')||input
.LA(1)==';'||(input
.LA(1)>='?' && input
.LA(1)<='[')||(input
.LA(1)>=']' && input
.LA(1)<='}')||(input
.LA(1)>='\u00A1' && input
.LA(1)<='\uFFEE') ) {
958 MismatchedSetException mse
= new MismatchedSetException(null,input
);
969 public final void mESCAPED_CHAR() throws RecognitionException
{
972 alt8
= dfa8
.predict(input
);
1035 public void mTokens() throws RecognitionException
{
1037 alt9
= dfa9
.predict(input
);
1182 protected DFA8 dfa8
= new DFA8(this);
1183 protected DFA9 dfa9
= new DFA9(this);
1184 static final String DFA8_eotS
=
1186 static final String DFA8_eofS
=
1188 static final String DFA8_minS
=
1189 "\1\134\1\42\11\uffff";
1190 static final String DFA8_maxS
=
1191 "\1\134\1\176\11\uffff";
1192 static final String DFA8_acceptS
=
1193 "\2\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11";
1194 static final String DFA8_specialS
=
1196 static final String
[] DFA8_transitionS
= {
1198 "\1\11\10\uffff\1\7\1\2\15\uffff\1\3\1\uffff\1\5\1\4\1\6\35"+
1199 "\uffff\1\12\41\uffff\1\10",
1211 static final short[] DFA8_eot
= DFA
.unpackEncodedString(DFA8_eotS
);
1212 static final short[] DFA8_eof
= DFA
.unpackEncodedString(DFA8_eofS
);
1213 static final char[] DFA8_min
= DFA
.unpackEncodedStringToUnsignedChars(DFA8_minS
);
1214 static final char[] DFA8_max
= DFA
.unpackEncodedStringToUnsignedChars(DFA8_maxS
);
1215 static final short[] DFA8_accept
= DFA
.unpackEncodedString(DFA8_acceptS
);
1216 static final short[] DFA8_special
= DFA
.unpackEncodedString(DFA8_specialS
);
1217 static final short[][] DFA8_transition
;
1220 int numStates
= DFA8_transitionS
.length
;
1221 DFA8_transition
= new short[numStates
][];
1222 for (int i
=0; i
<numStates
; i
++) {
1223 DFA8_transition
[i
] = DFA
.unpackEncodedString(DFA8_transitionS
[i
]);
1227 class DFA8
extends DFA
{
1229 public DFA8(BaseRecognizer recognizer
) {
1230 this.recognizer
= recognizer
;
1231 this.decisionNumber
= 8;
1232 this.eot
= DFA8_eot
;
1233 this.eof
= DFA8_eof
;
1234 this.min
= DFA8_min
;
1235 this.max
= DFA8_max
;
1236 this.accept
= DFA8_accept
;
1237 this.special
= DFA8_special
;
1238 this.transition
= DFA8_transition
;
1240 public String
getDescription() {
1241 return "323:10: fragment ESCAPED_CHAR : ( '\\\\,' | '\\\\:' | '\\\\=' | '\\\\<' | '\\\\>' | '\\\\+' | '\\\\~' | '\\\\\"' | '\\\\\\\\' );";
1244 static final String DFA9_eotS
=
1245 "\1\uffff\1\25\1\uffff\1\31\1\uffff\3\24\2\uffff\2\24\3\uffff\1\42"+
1246 "\1\44\1\24\4\uffff\1\46\1\uffff\1\46\1\uffff\2\46\1\52\4\24\7\uffff"+
1247 "\2\46\1\uffff\1\61\1\62\2\24\1\uffff\1\46\2\uffff\2\24\1\uffff\2"+
1248 "\24\1\46\4\24\1\77\1\100\2\uffff";
1249 static final String DFA9_eofS
=
1251 static final String DFA9_minS
=
1252 "\1\11\1\60\1\uffff\1\42\1\uffff\1\122\1\116\1\117\2\uffff\1\151"+
1253 "\1\145\3\uffff\3\75\4\uffff\1\41\1\60\1\41\1\uffff\3\41\1\104\1"+
1254 "\124\1\163\1\157\6\uffff\1\60\2\41\1\uffff\2\41\1\164\1\160\1\60"+
1255 "\1\41\2\uffff\1\141\1\157\1\60\1\156\1\151\1\41\1\143\1\156\1\145"+
1256 "\1\164\2\41\2\uffff";
1257 static final String DFA9_maxS
=
1258 "\1\uffee\1\71\1\uffff\1\176\1\uffff\1\122\1\116\1\117\2\uffff\1"+
1259 "\151\1\145\3\uffff\3\75\4\uffff\1\uffee\1\146\1\uffee\1\uffff\3"+
1260 "\uffee\1\104\1\124\1\163\1\157\6\uffff\1\146\2\uffee\1\uffff\2\uffee"+
1261 "\1\164\1\160\1\146\1\uffee\2\uffff\1\141\1\157\1\146\1\156\1\151"+
1262 "\1\uffee\1\143\1\156\1\145\1\164\2\uffee\2\uffff";
1263 static final String DFA9_acceptS
=
1264 "\2\uffff\1\2\1\uffff\1\4\3\uffff\1\10\1\11\2\uffff\1\15\1\16\1\17"+
1265 "\3\uffff\1\25\1\26\1\27\1\1\3\uffff\1\3\7\uffff\1\23\1\20\1\22\1"+
1266 "\21\1\24\1\14\3\uffff\1\5\6\uffff\1\6\1\7\14\uffff\1\12\1\13";
1267 static final String DFA9_specialS
=
1269 static final String
[] DFA9_transitionS
= {
1270 "\2\14\1\uffff\2\14\22\uffff\1\14\1\21\1\23\5\24\1\15\1\16\1"+
1271 "\24\1\11\1\2\1\1\14\24\1\4\1\24\1\17\1\22\1\20\2\24\1\6\14\24"+
1272 "\1\7\1\5\14\24\1\3\7\24\1\12\2\24\1\13\26\24\1\10\42\uffff\uff4e"+
1276 "\1\26\10\uffff\2\24\3\uffff\4\32\4\33\2\uffff\1\24\1\uffff"+
1277 "\3\24\35\uffff\1\30\30\uffff\1\27\10\uffff\1\24",
1296 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1297 "\3\uffff\77\24\43\uffff\uff4e\24",
1298 "\12\47\7\uffff\6\47\32\uffff\6\47",
1299 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1300 "\3\uffff\77\24\43\uffff\uff4e\24",
1302 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\3\24\10\50\2\24\1\uffff"+
1303 "\1\24\3\uffff\77\24\43\uffff\uff4e\24",
1304 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\3\24\10\51\2\24\1\uffff"+
1305 "\1\24\3\uffff\77\24\43\uffff\uff4e\24",
1306 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1307 "\3\uffff\77\24\43\uffff\uff4e\24",
1318 "\12\57\7\uffff\6\57\32\uffff\6\57",
1319 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\3\24\10\60\2\24\1\uffff"+
1320 "\1\24\3\uffff\77\24\43\uffff\uff4e\24",
1321 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1322 "\3\uffff\77\24\43\uffff\uff4e\24",
1324 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1325 "\3\uffff\77\24\43\uffff\uff4e\24",
1326 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1327 "\3\uffff\77\24\43\uffff\uff4e\24",
1330 "\12\65\7\uffff\6\65\32\uffff\6\65",
1331 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1332 "\3\uffff\77\24\43\uffff\uff4e\24",
1337 "\12\70\7\uffff\6\70\32\uffff\6\70",
1340 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1341 "\3\uffff\77\24\43\uffff\uff4e\24",
1346 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1347 "\3\uffff\77\24\43\uffff\uff4e\24",
1348 "\1\24\1\uffff\5\24\2\uffff\2\24\1\uffff\15\24\1\uffff\1\24"+
1349 "\3\uffff\77\24\43\uffff\uff4e\24",
1354 static final short[] DFA9_eot
= DFA
.unpackEncodedString(DFA9_eotS
);
1355 static final short[] DFA9_eof
= DFA
.unpackEncodedString(DFA9_eofS
);
1356 static final char[] DFA9_min
= DFA
.unpackEncodedStringToUnsignedChars(DFA9_minS
);
1357 static final char[] DFA9_max
= DFA
.unpackEncodedStringToUnsignedChars(DFA9_maxS
);
1358 static final short[] DFA9_accept
= DFA
.unpackEncodedString(DFA9_acceptS
);
1359 static final short[] DFA9_special
= DFA
.unpackEncodedString(DFA9_specialS
);
1360 static final short[][] DFA9_transition
;
1363 int numStates
= DFA9_transitionS
.length
;
1364 DFA9_transition
= new short[numStates
][];
1365 for (int i
=0; i
<numStates
; i
++) {
1366 DFA9_transition
[i
] = DFA
.unpackEncodedString(DFA9_transitionS
[i
]);
1370 class DFA9
extends DFA
{
1372 public DFA9(BaseRecognizer recognizer
) {
1373 this.recognizer
= recognizer
;
1374 this.decisionNumber
= 9;
1375 this.eot
= DFA9_eot
;
1376 this.eof
= DFA9_eof
;
1377 this.min
= DFA9_min
;
1378 this.max
= DFA9_max
;
1379 this.accept
= DFA9_accept
;
1380 this.special
= DFA9_special
;
1381 this.transition
= DFA9_transition
;
1383 public String
getDescription() {
1384 return "1:1: Tokens : ( T__43 | T__44 | T__45 | HAS | OR | AND | NOT | REWRITE | FIX | DISTANCE_FN | GEO_POINT_FN | ESC | WS | LPAREN | RPAREN | LT | GT | GE | LE | NE | EQ | QUOTE | TEXT );";