docs: public final EventFilterParser.filter_return filter() throws RecognitionException {
          EventFilterParser.filter_return retval = new EventFilterParser.filter_return();
          retval.start = input.LT(1);
  
  
          CommonTree root_0 = null;
  
          Token OR1=null;
          Token EOF2=null;
          EventFilterParser.boolean_expr_return a =null;
  
          EventFilterParser.boolean_expr_return b =null;
  
  
          CommonTree OR1_tree=null;
          CommonTree EOF2_tree=null;
          RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");
          RewriteRuleTokenStream stream_OR=new RewriteRuleTokenStream(adaptor,"token OR");
          RewriteRuleSubtreeStream stream_boolean_expr=new RewriteRuleSubtreeStream(adaptor,"rule boolean_expr");
          try {
              // EventFilter.g:103:2: ( (a= boolean_expr -> $a) ( OR b= boolean_expr -> ^( OR $filter $b) )* ( EOF )? )
              // EventFilter.g:103:4: (a= boolean_expr -> $a) ( OR b= boolean_expr -> ^( OR $filter $b) )* ( EOF )?
              {
              // EventFilter.g:103:4: (a= boolean_expr -> $a)
              // EventFilter.g:103:5: a= boolean_expr
              {
              pushFollow(FOLLOW_boolean_expr_in_filter323);
              a=boolean_expr();
  
              state._fsp--;
  
              stream_boolean_expr.add(a.getTree());
  
              // AST REWRITE
              // elements: a
              // token labels:
              // rule labels: retval, a
              // 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);
              RewriteRuleSubtreeStream stream_a=new RewriteRuleSubtreeStream(adaptor,"rule a",a!=null?a.tree:null);
  
              root_0 = (CommonTree)adaptor.nil();
              // 103:19: -> $a
              {
                  adaptor.addChild(root_0, stream_a.nextTree());
  
              }
  
  
              retval.tree = root_0;
  
              }
  
  
              // EventFilter.g:103:25: ( OR b= boolean_expr -> ^( OR $filter $b) )*
              loop1:
              do {
                  int alt1=2;
                  int LA1_0 = input.LA(1);
  
                  if ( (LA1_0==OR) ) {
                      alt1=1;
                  }
  
  
                  switch (alt1) {
              	case 1 :
              	    // EventFilter.g:103:26: OR b= boolean_expr
              	    {
              	    OR1=(Token)match(input,OR,FOLLOW_OR_in_filter330);
              	    stream_OR.add(OR1);
  
  
              	    pushFollow(FOLLOW_boolean_expr_in_filter334);
              	    b=boolean_expr();
  
              	    state._fsp--;
  
              	    stream_boolean_expr.add(b.getTree());
  
              	    // AST REWRITE
              	    // elements: OR, filter, b
              	    // token labels:
              	    // rule labels: retval, b
              	    // 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);
              	    RewriteRuleSubtreeStream stream_b=new RewriteRuleSubtreeStream(adaptor,"rule b",b!=null?b.tree:null);
  
              	    root_0 = (CommonTree)adaptor.nil();
              	    // 103:44: -> ^( OR $filter $b)
              	    {
              	        // EventFilter.g:103:47: ^( OR $filter $b)
              	        {
              	        CommonTree root_1 = (CommonTree)adaptor.nil();
              	        root_1 = (CommonTree)adaptor.becomeRoot(
              	        new OrTreeNode(stream_OR.nextToken())
              	        , root_1);
  
              	        adaptor.addChild(root_1, stream_retval.nextTree());
  
              	        adaptor.addChild(root_1, stream_b.nextTree());
  
              	        adaptor.addChild(root_0, root_1);
              	        }
  
              	    }
  
  
              	    retval.tree = root_0;
  
              	    }
              	    break;
  
              	default :
              	    break loop1;
                  }
              } while (true);
  
  
              // EventFilter.g:103:79: ( EOF )?
              int alt2=2;
              int LA2_0 = input.LA(1);
  
              if ( (LA2_0==EOF) ) {
                  alt2=1;
              }
              switch (alt2) {
                  case 1 :
                      // EventFilter.g:103:79: EOF
                      {
                      EOF2=(Token)match(input,EOF,FOLLOW_EOF_in_filter354);
                      stream_EOF.add(EOF2);
  
  
                      }
                      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;
      }