public final void block() throws RecognitionException {
        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:5: ( ^( BLOCK ( optionsSpec )? ( alternative rewrite )+ EOB ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:9: ^( BLOCK ( optionsSpec )? ( alternative rewrite )+ EOB )
            {
            match(input,BLOCK,FOLLOW_BLOCK_in_block484); 

            match(input, Token.DOWN, null); 
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:18: ( optionsSpec )?
            int alt22=2;
            int LA22_0 = input.LA(1);

            if ( (LA22_0==OPTIONS) ) {
                alt22=1;
            }
            switch (alt22) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:18: optionsSpec
                    {
                    pushFollow(FOLLOW_optionsSpec_in_block486);
                    optionsSpec();

                    state._fsp--;


                    }
                    break;

            }

            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:31: ( alternative rewrite )+
            int cnt23=0;
            loop23:
            do {
                int alt23=2;
                int LA23_0 = input.LA(1);

                if ( (LA23_0==ALT) ) {
                    alt23=1;
                }


                switch (alt23) {
            	case 1 :
            	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3Tree.g:114:32: alternative rewrite
            	    {
            	    pushFollow(FOLLOW_alternative_in_block490);
            	    alternative();

            	    state._fsp--;

            	    pushFollow(FOLLOW_rewrite_in_block492);
            	    rewrite();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    if ( cnt23 >= 1 ) break loop23;
                        EarlyExitException eee =
                            new EarlyExitException(23, input);
                        throw eee;
                }
                cnt23++;
            } while (true);

            match(input,EOB,FOLLOW_EOB_in_block496); 

            match(input, Token.UP, null); 

            }

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