public final ANTLRv3TreeFilter.altList_return altList() throws RecognitionException {
        ANTLRv3TreeFilter.altList_return retval = new ANTLRv3TreeFilter.altList_return();
        retval.start = input.LT(1);

        ANTLRv3TreeFilter.alternative_return a = null;


        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:164:3: ( ^( BLOCK (a= alternative rewrite )+ EOB ) -> {alts.size() == 1}? {alts.get(0)} -> or(alternative=alts))
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:164:5: ^( BLOCK (a= alternative rewrite )+ EOB )
            {
             List<StringTemplate> alts = new LinkedList<StringTemplate>(); 
            match(input,BLOCK,FOLLOW_BLOCK_in_altList812); 

            match(input, Token.DOWN, null); 
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:167:8: (a= alternative rewrite )+
            int cnt25=0;
            loop25:
            do {
                int alt25=2;
                int LA25_0 = input.LA(1);

                if ( (LA25_0==ALT) ) {
                    alt25=1;
                }


                switch (alt25) {
            	case 1 :
            	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:167:10: a= alternative rewrite
            	    {
            	    pushFollow(FOLLOW_alternative_in_altList825);
            	    a=alternative();

            	    state._fsp--;

            	    pushFollow(FOLLOW_rewrite_in_altList827);
            	    rewrite();

            	    state._fsp--;

            	     if (!(a!=null?a.st:null).toString().equals("epsilon")) {
            	                 alts.add((a!=null?a.st:null));
            	               }
            	             

            	    }
            	    break;

            	default :
            	    if ( cnt25 >= 1 ) break loop25;
                        EarlyExitException eee =
                            new EarlyExitException(25, input);
                        throw eee;
                }
                cnt25++;
            } while (true);

            match(input,EOB,FOLLOW_EOB_in_altList857); 

            match(input, Token.UP, null); 


            // TEMPLATE REWRITE
            // 176:5: -> {alts.size() == 1}? {alts.get(0)}
            if (alts.size() == 1) {
                retval.st = alts.get(0);
            }
            else // 177:5: -> or(alternative=alts)
            {
                retval.st = templateLib.getInstanceOf("or",
              new STAttrMap().put("alternative", alts));
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }