docs: public final EventFilterParser.exists_predicate_return exists_predicate() throws RecognitionException {
          EventFilterParser.exists_predicate_return retval = new EventFilterParser.exists_predicate_return();
          retval.start = input.LT(1);
  
  
          CommonTree root_0 = null;
  
          Token EXISTS78=null;
          Token EXISTS79=null;
          EventFilterParser.path_function_return path_function77 =null;
  
          EventFilterParser.path_function_return path_function80 =null;
  
  
          CommonTree EXISTS78_tree=null;
          CommonTree EXISTS79_tree=null;
          RewriteRuleTokenStream stream_EXISTS=new RewriteRuleTokenStream(adaptor,"token EXISTS");
          RewriteRuleSubtreeStream stream_path_function=new RewriteRuleSubtreeStream(adaptor,"rule path_function");
          try {
              // EventFilter.g:160:2: ( path_function EXISTS -> ^( EXISTS path_function ) | EXISTS path_function -> ^( EXISTS path_function ) )
              int alt11=2;
              int LA11_0 = input.LA(1);
  
              if ( (LA11_0==XPATH_FUN_NAME) ) {
                  alt11=1;
              }
              else if ( (LA11_0==EXISTS) ) {
                  alt11=2;
              }
              else {
                  NoViableAltException nvae =
                      new NoViableAltException("", 11, 0, input);
  
                  throw nvae;
  
              }
              switch (alt11) {
                  case 1 :
                      // EventFilter.g:160:4: path_function EXISTS
                      {
                      pushFollow(FOLLOW_path_function_in_exists_predicate940);
                      path_function77=path_function();
  
                      state._fsp--;
  
                      stream_path_function.add(path_function77.getTree());
  
                      EXISTS78=(Token)match(input,EXISTS,FOLLOW_EXISTS_in_exists_predicate942);
                      stream_EXISTS.add(EXISTS78);
  
  
                      // AST REWRITE
                      // elements: EXISTS, path_function
                      // token labels:
                      // rule labels: retval
                      // token list labels:
                      // rule list labels:
                      // wildcard labels:
                      retval.tree = root_0;
                      RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
  
                      root_0 = (CommonTree)adaptor.nil();
                      // 160:25: -> ^( EXISTS path_function )
                      {
                          // EventFilter.g:160:28: ^( EXISTS path_function )
                          {
                          CommonTree root_1 = (CommonTree)adaptor.nil();
                          root_1 = (CommonTree)adaptor.becomeRoot(
                          new ExistsTreeNode(stream_EXISTS.nextToken())
                          , root_1);
  
                          adaptor.addChild(root_1, stream_path_function.nextTree());
  
                          adaptor.addChild(root_0, root_1);
                          }
  
                      }
  
  
                      retval.tree = root_0;
  
                      }
                      break;
                  case 2 :
                      // EventFilter.g:161:3: EXISTS path_function
                      {
                      EXISTS79=(Token)match(input,EXISTS,FOLLOW_EXISTS_in_exists_predicate959);
                      stream_EXISTS.add(EXISTS79);
  
  
                      pushFollow(FOLLOW_path_function_in_exists_predicate961);
                      path_function80=path_function();
  
                      state._fsp--;
  
                      stream_path_function.add(path_function80.getTree());
  
                      // AST REWRITE
                      // elements: path_function, EXISTS
                      // token labels:
                      // rule labels: retval
                      // token list labels:
                      // rule list labels:
                      // wildcard labels:
                      retval.tree = root_0;
                      RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.tree:null);
  
                      root_0 = (CommonTree)adaptor.nil();
                      // 161:24: -> ^( EXISTS path_function )
                      {
                          // EventFilter.g:161:27: ^( EXISTS path_function )
                          {
                          CommonTree root_1 = (CommonTree)adaptor.nil();
                          root_1 = (CommonTree)adaptor.becomeRoot(
                          new ExistsTreeNode(stream_EXISTS.nextToken())
                          , root_1);
  
                          adaptor.addChild(root_1, stream_path_function.nextTree());
  
                          adaptor.addChild(root_0, root_1);
                          }
  
                      }
  
  
                      retval.tree = root_0;
  
                      }
                      break;
  
              }
              retval.stop = input.LT(-1);
  
  
              retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
              adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
  
          }
          catch (RecognitionException re) {
              reportError(re);
              recover(input,re);
      	retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
  
          }
  
          finally {
          	// do for sure before leaving
          }
          return retval;
      }