App Engine Java SDK version 1.9.25
[gae.git] / java / src / main / com / google / appengine / api / search / query / ExpressionParser.java
blob1bcb22ee5902ec5ac1194881df2ba7b7ed3aeed8
3 package com.google.appengine.api.search.query;
5 import org.antlr.runtime.*;
7 import org.antlr.runtime.tree.*;
9 public class ExpressionParser extends Parser {
10 public static final String[] tokenNames = new String[] {
11 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "NEG", "INDEX", "COND", "AND", "OR", "XOR", "NOT", "LT", "LE", "GT", "GE", "EQ", "NE", "PLUS", "MINUS", "TIMES", "DIV", "LPAREN", "RPAREN", "LSQUARE", "INT", "RSQUARE", "NAME", "TEXT", "HTML", "ATOM", "DATE", "NUMBER", "GEO", "GEOPOINT", "FLOAT", "PHRASE", "COMMA", "ABS", "COUNT", "DISTANCE", "LOG", "MAX", "MIN", "POW", "SNIPPET", "SWITCH", "DIGIT", "QUOTE", "ESC_SEQ", "EXPONENT", "NAME_START", "WS", "ASCII_LETTER", "UNDERSCORE", "DOLLAR", "HEX_DIGIT", "UNICODE_ESC", "OCTAL_ESC", "'.'"
13 public static final int UNDERSCORE=53;
14 public static final int GEOPOINT=33;
15 public static final int UNICODE_ESC=56;
16 public static final int LT=11;
17 public static final int TEXT=27;
18 public static final int HTML=28;
19 public static final int MINUS=18;
20 public static final int RSQUARE=25;
21 public static final int SNIPPET=44;
22 public static final int PHRASE=35;
23 public static final int T__58=58;
24 public static final int INDEX=5;
25 public static final int OCTAL_ESC=57;
26 public static final int NUMBER=31;
27 public static final int DISTANCE=39;
28 public static final int LOG=40;
29 public static final int LPAREN=21;
30 public static final int RPAREN=22;
31 public static final int EQ=15;
32 public static final int NAME=26;
33 public static final int GEO=32;
34 public static final int DATE=30;
35 public static final int NOT=10;
36 public static final int MIN=42;
37 public static final int ASCII_LETTER=52;
38 public static final int AND=7;
39 public static final int NE=16;
40 public static final int POW=43;
41 public static final int XOR=9;
42 public static final int COUNT=38;
43 public static final int SWITCH=45;
44 public static final int DOLLAR=54;
45 public static final int COND=6;
46 public static final int PLUS=17;
47 public static final int QUOTE=47;
48 public static final int FLOAT=34;
49 public static final int MAX=41;
50 public static final int INT=24;
51 public static final int ATOM=29;
52 public static final int NAME_START=50;
53 public static final int ABS=37;
54 public static final int HEX_DIGIT=55;
55 public static final int ESC_SEQ=48;
56 public static final int WS=51;
57 public static final int EOF=-1;
58 public static final int GE=14;
59 public static final int COMMA=36;
60 public static final int OR=8;
61 public static final int TIMES=19;
62 public static final int GT=13;
63 public static final int DIGIT=46;
64 public static final int DIV=20;
65 public static final int NEG=4;
66 public static final int LSQUARE=23;
67 public static final int LE=12;
68 public static final int EXPONENT=49;
70 public ExpressionParser(TokenStream input) {
71 this(input, new RecognizerSharedState());
73 public ExpressionParser(TokenStream input, RecognizerSharedState state) {
74 super(input, state);
78 protected TreeAdaptor adaptor = new CommonTreeAdaptor();
80 public void setTreeAdaptor(TreeAdaptor adaptor) {
81 this.adaptor = adaptor;
83 public TreeAdaptor getTreeAdaptor() {
84 return adaptor;
87 public String[] getTokenNames() { return ExpressionParser.tokenNames; }
88 public String getGrammarFileName() { return ""; }
90 @Override
91 public Object recoverFromMismatchedSet(IntStream input,
92 RecognitionException e, BitSet follow) throws RecognitionException {
93 throw e;
96 @Override
97 protected Object recoverFromMismatchedToken(
98 IntStream input, int ttype, BitSet follow) throws RecognitionException {
99 throw new MismatchedTokenException(ttype, input);
102 public static class expression_return extends ParserRuleReturnScope {
103 CommonTree tree;
104 public Object getTree() { return tree; }
107 public final ExpressionParser.expression_return expression() throws RecognitionException {
108 ExpressionParser.expression_return retval = new ExpressionParser.expression_return();
109 retval.start = input.LT(1);
111 CommonTree root_0 = null;
113 Token EOF2=null;
114 ExpressionParser.conjunction_return conjunction1 = null;
116 CommonTree EOF2_tree=null;
118 try {
120 root_0 = (CommonTree)adaptor.nil();
122 pushFollow(FOLLOW_conjunction_in_expression84);
123 conjunction1=conjunction();
125 state._fsp--;
127 adaptor.addChild(root_0, conjunction1.getTree());
128 EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_expression86);
129 EOF2_tree = (CommonTree)adaptor.create(EOF2);
130 adaptor.addChild(root_0, EOF2_tree);
134 retval.stop = input.LT(-1);
136 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
137 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
141 catch (RecognitionException e) {
142 reportError(e);
143 throw e;
145 finally {
147 return retval;
150 public static class condExpr_return extends ParserRuleReturnScope {
151 CommonTree tree;
152 public Object getTree() { return tree; }
155 public final ExpressionParser.condExpr_return condExpr() throws RecognitionException {
156 ExpressionParser.condExpr_return retval = new ExpressionParser.condExpr_return();
157 retval.start = input.LT(1);
159 CommonTree root_0 = null;
161 Token COND4=null;
162 ExpressionParser.conjunction_return conjunction3 = null;
164 ExpressionParser.addExpr_return addExpr5 = null;
166 CommonTree COND4_tree=null;
168 try {
170 root_0 = (CommonTree)adaptor.nil();
172 pushFollow(FOLLOW_conjunction_in_condExpr99);
173 conjunction3=conjunction();
175 state._fsp--;
177 adaptor.addChild(root_0, conjunction3.getTree());
178 int alt1=2;
179 int LA1_0 = input.LA(1);
181 if ( (LA1_0==COND) ) {
182 alt1=1;
184 switch (alt1) {
185 case 1 :
187 COND4=(Token)match(input,COND,FOLLOW_COND_in_condExpr102);
188 COND4_tree = (CommonTree)adaptor.create(COND4);
189 root_0 = (CommonTree)adaptor.becomeRoot(COND4_tree, root_0);
191 pushFollow(FOLLOW_addExpr_in_condExpr105);
192 addExpr5=addExpr();
194 state._fsp--;
196 adaptor.addChild(root_0, addExpr5.getTree());
199 break;
205 retval.stop = input.LT(-1);
207 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
208 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
212 catch (RecognitionException e) {
213 reportError(e);
214 throw e;
216 finally {
218 return retval;
221 public static class conjunction_return extends ParserRuleReturnScope {
222 CommonTree tree;
223 public Object getTree() { return tree; }
226 public final ExpressionParser.conjunction_return conjunction() throws RecognitionException {
227 ExpressionParser.conjunction_return retval = new ExpressionParser.conjunction_return();
228 retval.start = input.LT(1);
230 CommonTree root_0 = null;
232 Token AND7=null;
233 ExpressionParser.disjunction_return disjunction6 = null;
235 ExpressionParser.disjunction_return disjunction8 = null;
237 CommonTree AND7_tree=null;
239 try {
241 root_0 = (CommonTree)adaptor.nil();
243 pushFollow(FOLLOW_disjunction_in_conjunction120);
244 disjunction6=disjunction();
246 state._fsp--;
248 adaptor.addChild(root_0, disjunction6.getTree());
249 loop2:
250 do {
251 int alt2=2;
252 int LA2_0 = input.LA(1);
254 if ( (LA2_0==AND) ) {
255 alt2=1;
258 switch (alt2) {
259 case 1 :
261 AND7=(Token)match(input,AND,FOLLOW_AND_in_conjunction123);
262 AND7_tree = (CommonTree)adaptor.create(AND7);
263 root_0 = (CommonTree)adaptor.becomeRoot(AND7_tree, root_0);
265 pushFollow(FOLLOW_disjunction_in_conjunction126);
266 disjunction8=disjunction();
268 state._fsp--;
270 adaptor.addChild(root_0, disjunction8.getTree());
273 break;
275 default :
276 break loop2;
278 } while (true);
282 retval.stop = input.LT(-1);
284 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
285 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
289 catch (RecognitionException e) {
290 reportError(e);
291 throw e;
293 finally {
295 return retval;
298 public static class disjunction_return extends ParserRuleReturnScope {
299 CommonTree tree;
300 public Object getTree() { return tree; }
303 public final ExpressionParser.disjunction_return disjunction() throws RecognitionException {
304 ExpressionParser.disjunction_return retval = new ExpressionParser.disjunction_return();
305 retval.start = input.LT(1);
307 CommonTree root_0 = null;
309 Token set10=null;
310 ExpressionParser.negation_return negation9 = null;
312 ExpressionParser.negation_return negation11 = null;
314 CommonTree set10_tree=null;
316 try {
318 root_0 = (CommonTree)adaptor.nil();
320 pushFollow(FOLLOW_negation_in_disjunction141);
321 negation9=negation();
323 state._fsp--;
325 adaptor.addChild(root_0, negation9.getTree());
326 loop3:
327 do {
328 int alt3=2;
329 int LA3_0 = input.LA(1);
331 if ( ((LA3_0>=OR && LA3_0<=XOR)) ) {
332 alt3=1;
335 switch (alt3) {
336 case 1 :
338 set10=(Token)input.LT(1);
339 set10=(Token)input.LT(1);
340 if ( (input.LA(1)>=OR && input.LA(1)<=XOR) ) {
341 input.consume();
342 root_0 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(set10), root_0);
343 state.errorRecovery=false;
345 else {
346 MismatchedSetException mse = new MismatchedSetException(null,input);
347 throw mse;
350 pushFollow(FOLLOW_negation_in_disjunction153);
351 negation11=negation();
353 state._fsp--;
355 adaptor.addChild(root_0, negation11.getTree());
358 break;
360 default :
361 break loop3;
363 } while (true);
367 retval.stop = input.LT(-1);
369 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
370 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
374 catch (RecognitionException e) {
375 reportError(e);
376 throw e;
378 finally {
380 return retval;
383 public static class negation_return extends ParserRuleReturnScope {
384 CommonTree tree;
385 public Object getTree() { return tree; }
388 public final ExpressionParser.negation_return negation() throws RecognitionException {
389 ExpressionParser.negation_return retval = new ExpressionParser.negation_return();
390 retval.start = input.LT(1);
392 CommonTree root_0 = null;
394 Token NOT13=null;
395 ExpressionParser.cmpExpr_return cmpExpr12 = null;
397 ExpressionParser.cmpExpr_return cmpExpr14 = null;
399 CommonTree NOT13_tree=null;
401 try {
402 int alt4=2;
403 int LA4_0 = input.LA(1);
405 if ( (LA4_0==MINUS||LA4_0==LPAREN||LA4_0==INT||(LA4_0>=NAME && LA4_0<=PHRASE)||(LA4_0>=ABS && LA4_0<=SWITCH)) ) {
406 alt4=1;
408 else if ( (LA4_0==NOT) ) {
409 alt4=2;
411 else {
412 NoViableAltException nvae =
413 new NoViableAltException("", 4, 0, input);
415 throw nvae;
417 switch (alt4) {
418 case 1 :
420 root_0 = (CommonTree)adaptor.nil();
422 pushFollow(FOLLOW_cmpExpr_in_negation168);
423 cmpExpr12=cmpExpr();
425 state._fsp--;
427 adaptor.addChild(root_0, cmpExpr12.getTree());
430 break;
431 case 2 :
433 root_0 = (CommonTree)adaptor.nil();
435 NOT13=(Token)match(input,NOT,FOLLOW_NOT_in_negation174);
436 NOT13_tree = (CommonTree)adaptor.create(NOT13);
437 root_0 = (CommonTree)adaptor.becomeRoot(NOT13_tree, root_0);
439 pushFollow(FOLLOW_cmpExpr_in_negation177);
440 cmpExpr14=cmpExpr();
442 state._fsp--;
444 adaptor.addChild(root_0, cmpExpr14.getTree());
447 break;
450 retval.stop = input.LT(-1);
452 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
453 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
457 catch (RecognitionException e) {
458 reportError(e);
459 throw e;
461 finally {
463 return retval;
466 public static class cmpExpr_return extends ParserRuleReturnScope {
467 CommonTree tree;
468 public Object getTree() { return tree; }
471 public final ExpressionParser.cmpExpr_return cmpExpr() throws RecognitionException {
472 ExpressionParser.cmpExpr_return retval = new ExpressionParser.cmpExpr_return();
473 retval.start = input.LT(1);
475 CommonTree root_0 = null;
477 ExpressionParser.addExpr_return addExpr15 = null;
479 ExpressionParser.cmpOp_return cmpOp16 = null;
481 ExpressionParser.addExpr_return addExpr17 = null;
483 try {
485 root_0 = (CommonTree)adaptor.nil();
487 pushFollow(FOLLOW_addExpr_in_cmpExpr190);
488 addExpr15=addExpr();
490 state._fsp--;
492 adaptor.addChild(root_0, addExpr15.getTree());
493 int alt5=2;
494 int LA5_0 = input.LA(1);
496 if ( ((LA5_0>=LT && LA5_0<=NE)) ) {
497 alt5=1;
499 switch (alt5) {
500 case 1 :
502 pushFollow(FOLLOW_cmpOp_in_cmpExpr193);
503 cmpOp16=cmpOp();
505 state._fsp--;
507 root_0 = (CommonTree)adaptor.becomeRoot(cmpOp16.getTree(), root_0);
508 pushFollow(FOLLOW_addExpr_in_cmpExpr196);
509 addExpr17=addExpr();
511 state._fsp--;
513 adaptor.addChild(root_0, addExpr17.getTree());
516 break;
522 retval.stop = input.LT(-1);
524 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
525 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
529 catch (RecognitionException e) {
530 reportError(e);
531 throw e;
533 finally {
535 return retval;
538 public static class cmpOp_return extends ParserRuleReturnScope {
539 CommonTree tree;
540 public Object getTree() { return tree; }
543 public final ExpressionParser.cmpOp_return cmpOp() throws RecognitionException {
544 ExpressionParser.cmpOp_return retval = new ExpressionParser.cmpOp_return();
545 retval.start = input.LT(1);
547 CommonTree root_0 = null;
549 Token set18=null;
551 CommonTree set18_tree=null;
553 try {
555 root_0 = (CommonTree)adaptor.nil();
557 set18=(Token)input.LT(1);
558 if ( (input.LA(1)>=LT && input.LA(1)<=NE) ) {
559 input.consume();
560 adaptor.addChild(root_0, (CommonTree)adaptor.create(set18));
561 state.errorRecovery=false;
563 else {
564 MismatchedSetException mse = new MismatchedSetException(null,input);
565 throw mse;
570 retval.stop = input.LT(-1);
572 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
573 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
577 catch (RecognitionException e) {
578 reportError(e);
579 throw e;
581 finally {
583 return retval;
586 public static class addExpr_return extends ParserRuleReturnScope {
587 CommonTree tree;
588 public Object getTree() { return tree; }
591 public final ExpressionParser.addExpr_return addExpr() throws RecognitionException {
592 ExpressionParser.addExpr_return retval = new ExpressionParser.addExpr_return();
593 retval.start = input.LT(1);
595 CommonTree root_0 = null;
597 ExpressionParser.multExpr_return multExpr19 = null;
599 ExpressionParser.addOp_return addOp20 = null;
601 ExpressionParser.multExpr_return multExpr21 = null;
603 try {
605 root_0 = (CommonTree)adaptor.nil();
607 pushFollow(FOLLOW_multExpr_in_addExpr254);
608 multExpr19=multExpr();
610 state._fsp--;
612 adaptor.addChild(root_0, multExpr19.getTree());
613 loop6:
614 do {
615 int alt6=2;
616 int LA6_0 = input.LA(1);
618 if ( ((LA6_0>=PLUS && LA6_0<=MINUS)) ) {
619 alt6=1;
622 switch (alt6) {
623 case 1 :
625 pushFollow(FOLLOW_addOp_in_addExpr257);
626 addOp20=addOp();
628 state._fsp--;
630 root_0 = (CommonTree)adaptor.becomeRoot(addOp20.getTree(), root_0);
631 pushFollow(FOLLOW_multExpr_in_addExpr260);
632 multExpr21=multExpr();
634 state._fsp--;
636 adaptor.addChild(root_0, multExpr21.getTree());
639 break;
641 default :
642 break loop6;
644 } while (true);
648 retval.stop = input.LT(-1);
650 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
651 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
655 catch (RecognitionException e) {
656 reportError(e);
657 throw e;
659 finally {
661 return retval;
664 public static class addOp_return extends ParserRuleReturnScope {
665 CommonTree tree;
666 public Object getTree() { return tree; }
669 public final ExpressionParser.addOp_return addOp() throws RecognitionException {
670 ExpressionParser.addOp_return retval = new ExpressionParser.addOp_return();
671 retval.start = input.LT(1);
673 CommonTree root_0 = null;
675 Token set22=null;
677 CommonTree set22_tree=null;
679 try {
681 root_0 = (CommonTree)adaptor.nil();
683 set22=(Token)input.LT(1);
684 if ( (input.LA(1)>=PLUS && input.LA(1)<=MINUS) ) {
685 input.consume();
686 adaptor.addChild(root_0, (CommonTree)adaptor.create(set22));
687 state.errorRecovery=false;
689 else {
690 MismatchedSetException mse = new MismatchedSetException(null,input);
691 throw mse;
696 retval.stop = input.LT(-1);
698 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
699 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
703 catch (RecognitionException e) {
704 reportError(e);
705 throw e;
707 finally {
709 return retval;
712 public static class multExpr_return extends ParserRuleReturnScope {
713 CommonTree tree;
714 public Object getTree() { return tree; }
717 public final ExpressionParser.multExpr_return multExpr() throws RecognitionException {
718 ExpressionParser.multExpr_return retval = new ExpressionParser.multExpr_return();
719 retval.start = input.LT(1);
721 CommonTree root_0 = null;
723 ExpressionParser.unary_return unary23 = null;
725 ExpressionParser.multOp_return multOp24 = null;
727 ExpressionParser.unary_return unary25 = null;
729 try {
731 root_0 = (CommonTree)adaptor.nil();
733 pushFollow(FOLLOW_unary_in_multExpr294);
734 unary23=unary();
736 state._fsp--;
738 adaptor.addChild(root_0, unary23.getTree());
739 loop7:
740 do {
741 int alt7=2;
742 int LA7_0 = input.LA(1);
744 if ( ((LA7_0>=TIMES && LA7_0<=DIV)) ) {
745 alt7=1;
748 switch (alt7) {
749 case 1 :
751 pushFollow(FOLLOW_multOp_in_multExpr297);
752 multOp24=multOp();
754 state._fsp--;
756 root_0 = (CommonTree)adaptor.becomeRoot(multOp24.getTree(), root_0);
757 pushFollow(FOLLOW_unary_in_multExpr300);
758 unary25=unary();
760 state._fsp--;
762 adaptor.addChild(root_0, unary25.getTree());
765 break;
767 default :
768 break loop7;
770 } while (true);
774 retval.stop = input.LT(-1);
776 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
777 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
781 catch (RecognitionException e) {
782 reportError(e);
783 throw e;
785 finally {
787 return retval;
790 public static class multOp_return extends ParserRuleReturnScope {
791 CommonTree tree;
792 public Object getTree() { return tree; }
795 public final ExpressionParser.multOp_return multOp() throws RecognitionException {
796 ExpressionParser.multOp_return retval = new ExpressionParser.multOp_return();
797 retval.start = input.LT(1);
799 CommonTree root_0 = null;
801 Token set26=null;
803 CommonTree set26_tree=null;
805 try {
807 root_0 = (CommonTree)adaptor.nil();
809 set26=(Token)input.LT(1);
810 if ( (input.LA(1)>=TIMES && input.LA(1)<=DIV) ) {
811 input.consume();
812 adaptor.addChild(root_0, (CommonTree)adaptor.create(set26));
813 state.errorRecovery=false;
815 else {
816 MismatchedSetException mse = new MismatchedSetException(null,input);
817 throw mse;
822 retval.stop = input.LT(-1);
824 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
825 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
829 catch (RecognitionException e) {
830 reportError(e);
831 throw e;
833 finally {
835 return retval;
838 public static class unary_return extends ParserRuleReturnScope {
839 CommonTree tree;
840 public Object getTree() { return tree; }
843 public final ExpressionParser.unary_return unary() throws RecognitionException {
844 ExpressionParser.unary_return retval = new ExpressionParser.unary_return();
845 retval.start = input.LT(1);
847 CommonTree root_0 = null;
849 Token MINUS27=null;
850 ExpressionParser.atom_return atom28 = null;
852 ExpressionParser.atom_return atom29 = null;
854 CommonTree MINUS27_tree=null;
855 RewriteRuleTokenStream stream_MINUS=new RewriteRuleTokenStream(adaptor,"token MINUS");
856 RewriteRuleSubtreeStream stream_atom=new RewriteRuleSubtreeStream(adaptor,"rule atom");
857 try {
858 int alt8=2;
859 int LA8_0 = input.LA(1);
861 if ( (LA8_0==MINUS) ) {
862 alt8=1;
864 else if ( (LA8_0==LPAREN||LA8_0==INT||(LA8_0>=NAME && LA8_0<=PHRASE)||(LA8_0>=ABS && LA8_0<=SWITCH)) ) {
865 alt8=2;
867 else {
868 NoViableAltException nvae =
869 new NoViableAltException("", 8, 0, input);
871 throw nvae;
873 switch (alt8) {
874 case 1 :
876 MINUS27=(Token)match(input,MINUS,FOLLOW_MINUS_in_unary334);
877 stream_MINUS.add(MINUS27);
879 pushFollow(FOLLOW_atom_in_unary336);
880 atom28=atom();
882 state._fsp--;
884 stream_atom.add(atom28.getTree());
886 retval.tree = root_0;
887 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
889 root_0 = (CommonTree)adaptor.nil();
892 CommonTree root_1 = (CommonTree)adaptor.nil();
893 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(NEG, "-"), root_1);
895 adaptor.addChild(root_1, stream_atom.nextTree());
897 adaptor.addChild(root_0, root_1);
902 retval.tree = root_0;
904 break;
905 case 2 :
907 root_0 = (CommonTree)adaptor.nil();
909 pushFollow(FOLLOW_atom_in_unary351);
910 atom29=atom();
912 state._fsp--;
914 adaptor.addChild(root_0, atom29.getTree());
917 break;
920 retval.stop = input.LT(-1);
922 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
923 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
927 catch (RecognitionException e) {
928 reportError(e);
929 throw e;
931 finally {
933 return retval;
936 public static class atom_return extends ParserRuleReturnScope {
937 CommonTree tree;
938 public Object getTree() { return tree; }
941 public final ExpressionParser.atom_return atom() throws RecognitionException {
942 ExpressionParser.atom_return retval = new ExpressionParser.atom_return();
943 retval.start = input.LT(1);
945 CommonTree root_0 = null;
947 Token LPAREN34=null;
948 Token RPAREN36=null;
949 ExpressionParser.var_return var30 = null;
951 ExpressionParser.num_return num31 = null;
953 ExpressionParser.str_return str32 = null;
955 ExpressionParser.fn_return fn33 = null;
957 ExpressionParser.conjunction_return conjunction35 = null;
959 CommonTree LPAREN34_tree=null;
960 CommonTree RPAREN36_tree=null;
961 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
962 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
963 RewriteRuleSubtreeStream stream_conjunction=new RewriteRuleSubtreeStream(adaptor,"rule conjunction");
964 try {
965 int alt9=5;
966 alt9 = dfa9.predict(input);
967 switch (alt9) {
968 case 1 :
970 root_0 = (CommonTree)adaptor.nil();
972 pushFollow(FOLLOW_var_in_atom364);
973 var30=var();
975 state._fsp--;
977 adaptor.addChild(root_0, var30.getTree());
980 break;
981 case 2 :
983 root_0 = (CommonTree)adaptor.nil();
985 pushFollow(FOLLOW_num_in_atom370);
986 num31=num();
988 state._fsp--;
990 adaptor.addChild(root_0, num31.getTree());
993 break;
994 case 3 :
996 root_0 = (CommonTree)adaptor.nil();
998 pushFollow(FOLLOW_str_in_atom376);
999 str32=str();
1001 state._fsp--;
1003 adaptor.addChild(root_0, str32.getTree());
1006 break;
1007 case 4 :
1009 root_0 = (CommonTree)adaptor.nil();
1011 pushFollow(FOLLOW_fn_in_atom382);
1012 fn33=fn();
1014 state._fsp--;
1016 adaptor.addChild(root_0, fn33.getTree());
1019 break;
1020 case 5 :
1022 LPAREN34=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_atom388);
1023 stream_LPAREN.add(LPAREN34);
1025 pushFollow(FOLLOW_conjunction_in_atom390);
1026 conjunction35=conjunction();
1028 state._fsp--;
1030 stream_conjunction.add(conjunction35.getTree());
1031 RPAREN36=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_atom392);
1032 stream_RPAREN.add(RPAREN36);
1034 retval.tree = root_0;
1035 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1037 root_0 = (CommonTree)adaptor.nil();
1039 adaptor.addChild(root_0, stream_conjunction.nextTree());
1043 retval.tree = root_0;
1045 break;
1048 retval.stop = input.LT(-1);
1050 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1051 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1055 catch (RecognitionException e) {
1056 reportError(e);
1057 throw e;
1059 finally {
1061 return retval;
1064 public static class var_return extends ParserRuleReturnScope {
1065 CommonTree tree;
1066 public Object getTree() { return tree; }
1069 public final ExpressionParser.var_return var() throws RecognitionException {
1070 ExpressionParser.var_return retval = new ExpressionParser.var_return();
1071 retval.start = input.LT(1);
1073 CommonTree root_0 = null;
1075 ExpressionParser.name_return name37 = null;
1077 ExpressionParser.name_return name38 = null;
1079 ExpressionParser.index_return index39 = null;
1081 RewriteRuleSubtreeStream stream_name=new RewriteRuleSubtreeStream(adaptor,"rule name");
1082 RewriteRuleSubtreeStream stream_index=new RewriteRuleSubtreeStream(adaptor,"rule index");
1083 try {
1084 int alt10=2;
1085 alt10 = dfa10.predict(input);
1086 switch (alt10) {
1087 case 1 :
1089 root_0 = (CommonTree)adaptor.nil();
1091 pushFollow(FOLLOW_name_in_var409);
1092 name37=name();
1094 state._fsp--;
1096 adaptor.addChild(root_0, name37.getTree());
1099 break;
1100 case 2 :
1102 pushFollow(FOLLOW_name_in_var415);
1103 name38=name();
1105 state._fsp--;
1107 stream_name.add(name38.getTree());
1108 pushFollow(FOLLOW_index_in_var417);
1109 index39=index();
1111 state._fsp--;
1113 stream_index.add(index39.getTree());
1115 retval.tree = root_0;
1116 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1118 root_0 = (CommonTree)adaptor.nil();
1121 CommonTree root_1 = (CommonTree)adaptor.nil();
1122 root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(INDEX, (index39!=null?input.toString(index39.start,index39.stop):null)), root_1);
1124 adaptor.addChild(root_1, stream_name.nextTree());
1126 adaptor.addChild(root_0, root_1);
1131 retval.tree = root_0;
1133 break;
1136 retval.stop = input.LT(-1);
1138 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1139 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1143 catch (RecognitionException e) {
1144 reportError(e);
1145 throw e;
1147 finally {
1149 return retval;
1152 public static class index_return extends ParserRuleReturnScope {
1153 CommonTree tree;
1154 public Object getTree() { return tree; }
1157 public final ExpressionParser.index_return index() throws RecognitionException {
1158 ExpressionParser.index_return retval = new ExpressionParser.index_return();
1159 retval.start = input.LT(1);
1161 CommonTree root_0 = null;
1163 Token x=null;
1164 Token LSQUARE40=null;
1165 Token RSQUARE41=null;
1167 CommonTree x_tree=null;
1168 CommonTree LSQUARE40_tree=null;
1169 CommonTree RSQUARE41_tree=null;
1170 RewriteRuleTokenStream stream_LSQUARE=new RewriteRuleTokenStream(adaptor,"token LSQUARE");
1171 RewriteRuleTokenStream stream_RSQUARE=new RewriteRuleTokenStream(adaptor,"token RSQUARE");
1172 RewriteRuleTokenStream stream_INT=new RewriteRuleTokenStream(adaptor,"token INT");
1174 try {
1176 LSQUARE40=(Token)match(input,LSQUARE,FOLLOW_LSQUARE_in_index439);
1177 stream_LSQUARE.add(LSQUARE40);
1179 x=(Token)match(input,INT,FOLLOW_INT_in_index443);
1180 stream_INT.add(x);
1182 RSQUARE41=(Token)match(input,RSQUARE,FOLLOW_RSQUARE_in_index445);
1183 stream_RSQUARE.add(RSQUARE41);
1185 retval.tree = root_0;
1186 RewriteRuleTokenStream stream_x=new RewriteRuleTokenStream(adaptor,"token x",x);
1187 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1189 root_0 = (CommonTree)adaptor.nil();
1191 adaptor.addChild(root_0, stream_x.nextNode());
1195 retval.tree = root_0;
1198 retval.stop = input.LT(-1);
1200 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1201 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1205 catch (RecognitionException e) {
1206 reportError(e);
1207 throw e;
1209 finally {
1211 return retval;
1214 public static class name_return extends ParserRuleReturnScope {
1215 CommonTree tree;
1216 public Object getTree() { return tree; }
1219 public final ExpressionParser.name_return name() throws RecognitionException {
1220 ExpressionParser.name_return retval = new ExpressionParser.name_return();
1221 retval.start = input.LT(1);
1223 CommonTree root_0 = null;
1225 Token t=null;
1226 Token NAME42=null;
1227 Token char_literal43=null;
1228 Token NAME44=null;
1230 CommonTree t_tree=null;
1231 CommonTree NAME42_tree=null;
1232 CommonTree char_literal43_tree=null;
1233 CommonTree NAME44_tree=null;
1234 RewriteRuleTokenStream stream_GEO=new RewriteRuleTokenStream(adaptor,"token GEO");
1235 RewriteRuleTokenStream stream_DATE=new RewriteRuleTokenStream(adaptor,"token DATE");
1236 RewriteRuleTokenStream stream_NUMBER=new RewriteRuleTokenStream(adaptor,"token NUMBER");
1237 RewriteRuleTokenStream stream_GEOPOINT=new RewriteRuleTokenStream(adaptor,"token GEOPOINT");
1238 RewriteRuleTokenStream stream_TEXT=new RewriteRuleTokenStream(adaptor,"token TEXT");
1239 RewriteRuleTokenStream stream_HTML=new RewriteRuleTokenStream(adaptor,"token HTML");
1240 RewriteRuleTokenStream stream_ATOM=new RewriteRuleTokenStream(adaptor,"token ATOM");
1242 try {
1243 int alt12=8;
1244 switch ( input.LA(1) ) {
1245 case NAME:
1247 alt12=1;
1249 break;
1250 case TEXT:
1252 alt12=2;
1254 break;
1255 case HTML:
1257 alt12=3;
1259 break;
1260 case ATOM:
1262 alt12=4;
1264 break;
1265 case DATE:
1267 alt12=5;
1269 break;
1270 case NUMBER:
1272 alt12=6;
1274 break;
1275 case GEO:
1277 alt12=7;
1279 break;
1280 case GEOPOINT:
1282 alt12=8;
1284 break;
1285 default:
1286 NoViableAltException nvae =
1287 new NoViableAltException("", 12, 0, input);
1289 throw nvae;
1292 switch (alt12) {
1293 case 1 :
1295 root_0 = (CommonTree)adaptor.nil();
1297 NAME42=(Token)match(input,NAME,FOLLOW_NAME_in_name463);
1298 NAME42_tree = (CommonTree)adaptor.create(NAME42);
1299 adaptor.addChild(root_0, NAME42_tree);
1301 loop11:
1302 do {
1303 int alt11=2;
1304 int LA11_0 = input.LA(1);
1306 if ( (LA11_0==58) ) {
1307 alt11=1;
1310 switch (alt11) {
1311 case 1 :
1313 char_literal43=(Token)match(input,58,FOLLOW_58_in_name466);
1314 char_literal43_tree = (CommonTree)adaptor.create(char_literal43);
1315 root_0 = (CommonTree)adaptor.becomeRoot(char_literal43_tree, root_0);
1317 NAME44=(Token)match(input,NAME,FOLLOW_NAME_in_name469);
1318 NAME44_tree = (CommonTree)adaptor.create(NAME44);
1319 adaptor.addChild(root_0, NAME44_tree);
1322 break;
1324 default :
1325 break loop11;
1327 } while (true);
1330 break;
1331 case 2 :
1333 t=(Token)match(input,TEXT,FOLLOW_TEXT_in_name485);
1334 stream_TEXT.add(t);
1336 retval.tree = root_0;
1337 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1339 root_0 = (CommonTree)adaptor.nil();
1341 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1345 retval.tree = root_0;
1347 break;
1348 case 3 :
1350 t=(Token)match(input,HTML,FOLLOW_HTML_in_name498);
1351 stream_HTML.add(t);
1353 retval.tree = root_0;
1354 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1356 root_0 = (CommonTree)adaptor.nil();
1358 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1362 retval.tree = root_0;
1364 break;
1365 case 4 :
1367 t=(Token)match(input,ATOM,FOLLOW_ATOM_in_name511);
1368 stream_ATOM.add(t);
1370 retval.tree = root_0;
1371 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1373 root_0 = (CommonTree)adaptor.nil();
1375 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1379 retval.tree = root_0;
1381 break;
1382 case 5 :
1384 t=(Token)match(input,DATE,FOLLOW_DATE_in_name524);
1385 stream_DATE.add(t);
1387 retval.tree = root_0;
1388 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1390 root_0 = (CommonTree)adaptor.nil();
1392 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1396 retval.tree = root_0;
1398 break;
1399 case 6 :
1401 t=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_name537);
1402 stream_NUMBER.add(t);
1404 retval.tree = root_0;
1405 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1407 root_0 = (CommonTree)adaptor.nil();
1409 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1413 retval.tree = root_0;
1415 break;
1416 case 7 :
1418 t=(Token)match(input,GEO,FOLLOW_GEO_in_name550);
1419 stream_GEO.add(t);
1421 retval.tree = root_0;
1422 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1424 root_0 = (CommonTree)adaptor.nil();
1426 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1430 retval.tree = root_0;
1432 break;
1433 case 8 :
1435 t=(Token)match(input,GEOPOINT,FOLLOW_GEOPOINT_in_name563);
1436 stream_GEOPOINT.add(t);
1438 retval.tree = root_0;
1439 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1441 root_0 = (CommonTree)adaptor.nil();
1443 adaptor.addChild(root_0, (CommonTree)adaptor.create(NAME, t));
1447 retval.tree = root_0;
1449 break;
1452 retval.stop = input.LT(-1);
1454 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1455 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1459 catch (RecognitionException e) {
1460 reportError(e);
1461 throw e;
1463 finally {
1465 return retval;
1468 public static class num_return extends ParserRuleReturnScope {
1469 CommonTree tree;
1470 public Object getTree() { return tree; }
1473 public final ExpressionParser.num_return num() throws RecognitionException {
1474 ExpressionParser.num_return retval = new ExpressionParser.num_return();
1475 retval.start = input.LT(1);
1477 CommonTree root_0 = null;
1479 Token set45=null;
1481 CommonTree set45_tree=null;
1483 try {
1485 root_0 = (CommonTree)adaptor.nil();
1487 set45=(Token)input.LT(1);
1488 if ( input.LA(1)==INT||input.LA(1)==FLOAT ) {
1489 input.consume();
1490 adaptor.addChild(root_0, (CommonTree)adaptor.create(set45));
1491 state.errorRecovery=false;
1493 else {
1494 MismatchedSetException mse = new MismatchedSetException(null,input);
1495 throw mse;
1500 retval.stop = input.LT(-1);
1502 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1503 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1507 catch (RecognitionException e) {
1508 reportError(e);
1509 throw e;
1511 finally {
1513 return retval;
1516 public static class str_return extends ParserRuleReturnScope {
1517 CommonTree tree;
1518 public Object getTree() { return tree; }
1521 public final ExpressionParser.str_return str() throws RecognitionException {
1522 ExpressionParser.str_return retval = new ExpressionParser.str_return();
1523 retval.start = input.LT(1);
1525 CommonTree root_0 = null;
1527 Token PHRASE46=null;
1529 CommonTree PHRASE46_tree=null;
1531 try {
1533 root_0 = (CommonTree)adaptor.nil();
1535 PHRASE46=(Token)match(input,PHRASE,FOLLOW_PHRASE_in_str600);
1536 PHRASE46_tree = (CommonTree)adaptor.create(PHRASE46);
1537 adaptor.addChild(root_0, PHRASE46_tree);
1541 retval.stop = input.LT(-1);
1543 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1544 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1548 catch (RecognitionException e) {
1549 reportError(e);
1550 throw e;
1552 finally {
1554 return retval;
1557 public static class fn_return extends ParserRuleReturnScope {
1558 CommonTree tree;
1559 public Object getTree() { return tree; }
1562 public final ExpressionParser.fn_return fn() throws RecognitionException {
1563 ExpressionParser.fn_return retval = new ExpressionParser.fn_return();
1564 retval.start = input.LT(1);
1566 CommonTree root_0 = null;
1568 Token LPAREN48=null;
1569 Token COMMA50=null;
1570 Token RPAREN52=null;
1571 ExpressionParser.fnName_return fnName47 = null;
1573 ExpressionParser.condExpr_return condExpr49 = null;
1575 ExpressionParser.condExpr_return condExpr51 = null;
1577 CommonTree LPAREN48_tree=null;
1578 CommonTree COMMA50_tree=null;
1579 CommonTree RPAREN52_tree=null;
1580 RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
1581 RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
1582 RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
1583 RewriteRuleSubtreeStream stream_fnName=new RewriteRuleSubtreeStream(adaptor,"rule fnName");
1584 RewriteRuleSubtreeStream stream_condExpr=new RewriteRuleSubtreeStream(adaptor,"rule condExpr");
1585 try {
1587 pushFollow(FOLLOW_fnName_in_fn613);
1588 fnName47=fnName();
1590 state._fsp--;
1592 stream_fnName.add(fnName47.getTree());
1593 LPAREN48=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_fn615);
1594 stream_LPAREN.add(LPAREN48);
1596 pushFollow(FOLLOW_condExpr_in_fn617);
1597 condExpr49=condExpr();
1599 state._fsp--;
1601 stream_condExpr.add(condExpr49.getTree());
1602 loop13:
1603 do {
1604 int alt13=2;
1605 int LA13_0 = input.LA(1);
1607 if ( (LA13_0==COMMA) ) {
1608 alt13=1;
1611 switch (alt13) {
1612 case 1 :
1614 COMMA50=(Token)match(input,COMMA,FOLLOW_COMMA_in_fn620);
1615 stream_COMMA.add(COMMA50);
1617 pushFollow(FOLLOW_condExpr_in_fn622);
1618 condExpr51=condExpr();
1620 state._fsp--;
1622 stream_condExpr.add(condExpr51.getTree());
1625 break;
1627 default :
1628 break loop13;
1630 } while (true);
1632 RPAREN52=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_fn626);
1633 stream_RPAREN.add(RPAREN52);
1635 retval.tree = root_0;
1636 RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
1638 root_0 = (CommonTree)adaptor.nil();
1641 CommonTree root_1 = (CommonTree)adaptor.nil();
1642 root_1 = (CommonTree)adaptor.becomeRoot(stream_fnName.nextNode(), root_1);
1644 if ( !(stream_condExpr.hasNext()) ) {
1645 throw new RewriteEarlyExitException();
1647 while ( stream_condExpr.hasNext() ) {
1648 adaptor.addChild(root_1, stream_condExpr.nextTree());
1651 stream_condExpr.reset();
1653 adaptor.addChild(root_0, root_1);
1658 retval.tree = root_0;
1661 retval.stop = input.LT(-1);
1663 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1664 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1668 catch (RecognitionException e) {
1669 reportError(e);
1670 throw e;
1672 finally {
1674 return retval;
1677 public static class fnName_return extends ParserRuleReturnScope {
1678 CommonTree tree;
1679 public Object getTree() { return tree; }
1682 public final ExpressionParser.fnName_return fnName() throws RecognitionException {
1683 ExpressionParser.fnName_return retval = new ExpressionParser.fnName_return();
1684 retval.start = input.LT(1);
1686 CommonTree root_0 = null;
1688 Token set53=null;
1690 CommonTree set53_tree=null;
1692 try {
1694 root_0 = (CommonTree)adaptor.nil();
1696 set53=(Token)input.LT(1);
1697 if ( (input.LA(1)>=TEXT && input.LA(1)<=GEOPOINT)||(input.LA(1)>=ABS && input.LA(1)<=SWITCH) ) {
1698 input.consume();
1699 adaptor.addChild(root_0, (CommonTree)adaptor.create(set53));
1700 state.errorRecovery=false;
1702 else {
1703 MismatchedSetException mse = new MismatchedSetException(null,input);
1704 throw mse;
1709 retval.stop = input.LT(-1);
1711 retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
1712 adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
1716 catch (RecognitionException e) {
1717 reportError(e);
1718 throw e;
1720 finally {
1722 return retval;
1725 protected DFA9 dfa9 = new DFA9(this);
1726 protected DFA10 dfa10 = new DFA10(this);
1727 static final String DFA9_eotS =
1728 "\15\uffff";
1729 static final String DFA9_eofS =
1730 "\2\uffff\7\1\4\uffff";
1731 static final String DFA9_minS =
1732 "\1\25\1\uffff\7\6\4\uffff";
1733 static final String DFA9_maxS =
1734 "\1\55\1\uffff\7\44\4\uffff";
1735 static final String DFA9_acceptS =
1736 "\1\uffff\1\1\7\uffff\1\2\1\3\1\4\1\5";
1737 static final String DFA9_specialS =
1738 "\15\uffff}>";
1739 static final String[] DFA9_transitionS = {
1740 "\1\14\2\uffff\1\11\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10"+
1741 "\1\11\1\12\1\uffff\11\13",
1743 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1744 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1745 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1746 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1747 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1748 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1749 "\4\1\1\uffff\12\1\1\13\2\1\14\uffff\1\1",
1756 static final short[] DFA9_eot = DFA.unpackEncodedString(DFA9_eotS);
1757 static final short[] DFA9_eof = DFA.unpackEncodedString(DFA9_eofS);
1758 static final char[] DFA9_min = DFA.unpackEncodedStringToUnsignedChars(DFA9_minS);
1759 static final char[] DFA9_max = DFA.unpackEncodedStringToUnsignedChars(DFA9_maxS);
1760 static final short[] DFA9_accept = DFA.unpackEncodedString(DFA9_acceptS);
1761 static final short[] DFA9_special = DFA.unpackEncodedString(DFA9_specialS);
1762 static final short[][] DFA9_transition;
1764 static {
1765 int numStates = DFA9_transitionS.length;
1766 DFA9_transition = new short[numStates][];
1767 for (int i=0; i<numStates; i++) {
1768 DFA9_transition[i] = DFA.unpackEncodedString(DFA9_transitionS[i]);
1772 class DFA9 extends DFA {
1774 public DFA9(BaseRecognizer recognizer) {
1775 this.recognizer = recognizer;
1776 this.decisionNumber = 9;
1777 this.eot = DFA9_eot;
1778 this.eof = DFA9_eof;
1779 this.min = DFA9_min;
1780 this.max = DFA9_max;
1781 this.accept = DFA9_accept;
1782 this.special = DFA9_special;
1783 this.transition = DFA9_transition;
1785 public String getDescription() {
1786 return "110:1: atom : ( var | num | str | fn | LPAREN conjunction RPAREN -> conjunction );";
1789 static final String DFA10_eotS =
1790 "\15\uffff";
1791 static final String DFA10_eofS =
1792 "\1\uffff\10\12\3\uffff\1\12";
1793 static final String DFA10_minS =
1794 "\1\32\10\6\1\32\2\uffff\1\6";
1795 static final String DFA10_maxS =
1796 "\1\41\1\72\7\44\1\32\2\uffff\1\72";
1797 static final String DFA10_acceptS =
1798 "\12\uffff\1\1\1\2\1\uffff";
1799 static final String DFA10_specialS =
1800 "\15\uffff}>";
1801 static final String[] DFA10_transitionS = {
1802 "\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10",
1803 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12\25\uffff"+
1804 "\1\11",
1805 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1806 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1807 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1808 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1809 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1810 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1811 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12",
1812 "\1\14",
1815 "\4\12\1\uffff\12\12\1\uffff\1\12\1\13\14\uffff\1\12\25\uffff"+
1816 "\1\11"
1819 static final short[] DFA10_eot = DFA.unpackEncodedString(DFA10_eotS);
1820 static final short[] DFA10_eof = DFA.unpackEncodedString(DFA10_eofS);
1821 static final char[] DFA10_min = DFA.unpackEncodedStringToUnsignedChars(DFA10_minS);
1822 static final char[] DFA10_max = DFA.unpackEncodedStringToUnsignedChars(DFA10_maxS);
1823 static final short[] DFA10_accept = DFA.unpackEncodedString(DFA10_acceptS);
1824 static final short[] DFA10_special = DFA.unpackEncodedString(DFA10_specialS);
1825 static final short[][] DFA10_transition;
1827 static {
1828 int numStates = DFA10_transitionS.length;
1829 DFA10_transition = new short[numStates][];
1830 for (int i=0; i<numStates; i++) {
1831 DFA10_transition[i] = DFA.unpackEncodedString(DFA10_transitionS[i]);
1835 class DFA10 extends DFA {
1837 public DFA10(BaseRecognizer recognizer) {
1838 this.recognizer = recognizer;
1839 this.decisionNumber = 10;
1840 this.eot = DFA10_eot;
1841 this.eof = DFA10_eof;
1842 this.min = DFA10_min;
1843 this.max = DFA10_max;
1844 this.accept = DFA10_accept;
1845 this.special = DFA10_special;
1846 this.transition = DFA10_transition;
1848 public String getDescription() {
1849 return "118:1: var : ( name | name index -> ^( INDEX[$index.text] name ) );";
1853 public static final BitSet FOLLOW_conjunction_in_expression84 = new BitSet(new long[]{0x0000000000000000L});
1854 public static final BitSet FOLLOW_EOF_in_expression86 = new BitSet(new long[]{0x0000000000000002L});
1855 public static final BitSet FOLLOW_conjunction_in_condExpr99 = new BitSet(new long[]{0x0000000000000042L});
1856 public static final BitSet FOLLOW_COND_in_condExpr102 = new BitSet(new long[]{0x00003FEFFD240000L});
1857 public static final BitSet FOLLOW_addExpr_in_condExpr105 = new BitSet(new long[]{0x0000000000000002L});
1858 public static final BitSet FOLLOW_disjunction_in_conjunction120 = new BitSet(new long[]{0x0000000000000082L});
1859 public static final BitSet FOLLOW_AND_in_conjunction123 = new BitSet(new long[]{0x00003FEFFD240400L});
1860 public static final BitSet FOLLOW_disjunction_in_conjunction126 = new BitSet(new long[]{0x0000000000000082L});
1861 public static final BitSet FOLLOW_negation_in_disjunction141 = new BitSet(new long[]{0x0000000000000302L});
1862 public static final BitSet FOLLOW_set_in_disjunction144 = new BitSet(new long[]{0x00003FEFFD240400L});
1863 public static final BitSet FOLLOW_negation_in_disjunction153 = new BitSet(new long[]{0x0000000000000302L});
1864 public static final BitSet FOLLOW_cmpExpr_in_negation168 = new BitSet(new long[]{0x0000000000000002L});
1865 public static final BitSet FOLLOW_NOT_in_negation174 = new BitSet(new long[]{0x00003FEFFD240000L});
1866 public static final BitSet FOLLOW_cmpExpr_in_negation177 = new BitSet(new long[]{0x0000000000000002L});
1867 public static final BitSet FOLLOW_addExpr_in_cmpExpr190 = new BitSet(new long[]{0x000000000001F802L});
1868 public static final BitSet FOLLOW_cmpOp_in_cmpExpr193 = new BitSet(new long[]{0x00003FEFFD240000L});
1869 public static final BitSet FOLLOW_addExpr_in_cmpExpr196 = new BitSet(new long[]{0x0000000000000002L});
1870 public static final BitSet FOLLOW_set_in_cmpOp0 = new BitSet(new long[]{0x0000000000000002L});
1871 public static final BitSet FOLLOW_multExpr_in_addExpr254 = new BitSet(new long[]{0x0000000000060002L});
1872 public static final BitSet FOLLOW_addOp_in_addExpr257 = new BitSet(new long[]{0x00003FEFFD240000L});
1873 public static final BitSet FOLLOW_multExpr_in_addExpr260 = new BitSet(new long[]{0x0000000000060002L});
1874 public static final BitSet FOLLOW_set_in_addOp0 = new BitSet(new long[]{0x0000000000000002L});
1875 public static final BitSet FOLLOW_unary_in_multExpr294 = new BitSet(new long[]{0x0000000000180002L});
1876 public static final BitSet FOLLOW_multOp_in_multExpr297 = new BitSet(new long[]{0x00003FEFFD240000L});
1877 public static final BitSet FOLLOW_unary_in_multExpr300 = new BitSet(new long[]{0x0000000000180002L});
1878 public static final BitSet FOLLOW_set_in_multOp0 = new BitSet(new long[]{0x0000000000000002L});
1879 public static final BitSet FOLLOW_MINUS_in_unary334 = new BitSet(new long[]{0x00003FEFFD240000L});
1880 public static final BitSet FOLLOW_atom_in_unary336 = new BitSet(new long[]{0x0000000000000002L});
1881 public static final BitSet FOLLOW_atom_in_unary351 = new BitSet(new long[]{0x0000000000000002L});
1882 public static final BitSet FOLLOW_var_in_atom364 = new BitSet(new long[]{0x0000000000000002L});
1883 public static final BitSet FOLLOW_num_in_atom370 = new BitSet(new long[]{0x0000000000000002L});
1884 public static final BitSet FOLLOW_str_in_atom376 = new BitSet(new long[]{0x0000000000000002L});
1885 public static final BitSet FOLLOW_fn_in_atom382 = new BitSet(new long[]{0x0000000000000002L});
1886 public static final BitSet FOLLOW_LPAREN_in_atom388 = new BitSet(new long[]{0x00003FEFFD240400L});
1887 public static final BitSet FOLLOW_conjunction_in_atom390 = new BitSet(new long[]{0x0000000000400000L});
1888 public static final BitSet FOLLOW_RPAREN_in_atom392 = new BitSet(new long[]{0x0000000000000002L});
1889 public static final BitSet FOLLOW_name_in_var409 = new BitSet(new long[]{0x0000000000000002L});
1890 public static final BitSet FOLLOW_name_in_var415 = new BitSet(new long[]{0x0000000000800000L});
1891 public static final BitSet FOLLOW_index_in_var417 = new BitSet(new long[]{0x0000000000000002L});
1892 public static final BitSet FOLLOW_LSQUARE_in_index439 = new BitSet(new long[]{0x0000000001000000L});
1893 public static final BitSet FOLLOW_INT_in_index443 = new BitSet(new long[]{0x0000000002000000L});
1894 public static final BitSet FOLLOW_RSQUARE_in_index445 = new BitSet(new long[]{0x0000000000000002L});
1895 public static final BitSet FOLLOW_NAME_in_name463 = new BitSet(new long[]{0x0400000000000002L});
1896 public static final BitSet FOLLOW_58_in_name466 = new BitSet(new long[]{0x0000000004000000L});
1897 public static final BitSet FOLLOW_NAME_in_name469 = new BitSet(new long[]{0x0400000000000002L});
1898 public static final BitSet FOLLOW_TEXT_in_name485 = new BitSet(new long[]{0x0000000000000002L});
1899 public static final BitSet FOLLOW_HTML_in_name498 = new BitSet(new long[]{0x0000000000000002L});
1900 public static final BitSet FOLLOW_ATOM_in_name511 = new BitSet(new long[]{0x0000000000000002L});
1901 public static final BitSet FOLLOW_DATE_in_name524 = new BitSet(new long[]{0x0000000000000002L});
1902 public static final BitSet FOLLOW_NUMBER_in_name537 = new BitSet(new long[]{0x0000000000000002L});
1903 public static final BitSet FOLLOW_GEO_in_name550 = new BitSet(new long[]{0x0000000000000002L});
1904 public static final BitSet FOLLOW_GEOPOINT_in_name563 = new BitSet(new long[]{0x0000000000000002L});
1905 public static final BitSet FOLLOW_set_in_num0 = new BitSet(new long[]{0x0000000000000002L});
1906 public static final BitSet FOLLOW_PHRASE_in_str600 = new BitSet(new long[]{0x0000000000000002L});
1907 public static final BitSet FOLLOW_fnName_in_fn613 = new BitSet(new long[]{0x0000000000200000L});
1908 public static final BitSet FOLLOW_LPAREN_in_fn615 = new BitSet(new long[]{0x00003FEFFD240400L});
1909 public static final BitSet FOLLOW_condExpr_in_fn617 = new BitSet(new long[]{0x0000001000400000L});
1910 public static final BitSet FOLLOW_COMMA_in_fn620 = new BitSet(new long[]{0x00003FEFFD240400L});
1911 public static final BitSet FOLLOW_condExpr_in_fn622 = new BitSet(new long[]{0x0000001000400000L});
1912 public static final BitSet FOLLOW_RPAREN_in_fn626 = new BitSet(new long[]{0x0000000000000002L});
1913 public static final BitSet FOLLOW_set_in_fnName0 = new BitSet(new long[]{0x0000000000000002L});