public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "ebnfSuffix"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:401:1: ebnfSuffix : ( OPTIONAL -> {%{\"[>OPTIONAL<]\"}} | CLOSURE -> {%{\"[>CLOSURE<]\"}} | POSITIVE_CLOSURE -> {%{\"[>POSITIVE_CLOSURE<]\"}});
    public final ANTLRv3TreeFilter.ebnfSuffix_return ebnfSuffix() throws RecognitionException {
        ANTLRv3TreeFilter.ebnfSuffix_return retval = new ANTLRv3TreeFilter.ebnfSuffix_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:402:2: ( OPTIONAL -> {%{\"[>OPTIONAL<]\"}} | CLOSURE -> {%{\"[>CLOSURE<]\"}} | POSITIVE_CLOSURE -> {%{\"[>POSITIVE_CLOSURE<]\"}})
            int alt40=3;
            switch ( input.LA(1) ) {
            case OPTIONAL:
                {
                alt40=1;
                }
                break;
            case CLOSURE:
                {
                alt40=2;
                }
                break;
            case POSITIVE_CLOSURE:
                {
                alt40=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 40, 0, input);

                throw nvae;
            }

            switch (alt40) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:402:4: OPTIONAL
                    {
                    match(input,OPTIONAL,FOLLOW_OPTIONAL_in_ebnfSuffix2054); 


                    // TEMPLATE REWRITE
                    // 404:5: -> {%{\"[>OPTIONAL<]\"}}
                    {
                        retval.st = new StringTemplate(templateLib,"[>OPTIONAL<]");
                    }


                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:406:5: CLOSURE
                    {
                    match(input,CLOSURE,FOLLOW_CLOSURE_in_ebnfSuffix2070); 


                    // TEMPLATE REWRITE
                    // 408:5: -> {%{\"[>CLOSURE<]\"}}
                    {
                        retval.st = new StringTemplate(templateLib,"[>CLOSURE<]");
                    }


                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:410:5: POSITIVE_CLOSURE
                    {
                    match(input,POSITIVE_CLOSURE,FOLLOW_POSITIVE_CLOSURE_in_ebnfSuffix2086); 


                    // TEMPLATE REWRITE
                    // 412:5: -> {%{\"[>POSITIVE_CLOSURE<]\"}}
                    {
                        retval.st = new StringTemplate(templateLib,"[>POSITIVE_CLOSURE<]");
                    }


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "ebnfSuffix"

    public static class rewrite_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:417:1: rewrite : ( ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative ) | );
    public final ANTLRv3TreeFilter.rewrite_return rewrite() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_return retval = new ANTLRv3TreeFilter.rewrite_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:418:2: ( ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative ) | )
            int alt42=2;
            int LA42_0 = input.LA(1);

            if ( (LA42_0==REWRITE) ) {
                alt42=1;
            }
            else if ( (LA42_0==ALT||LA42_0==EOB) ) {
                alt42=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 42, 0, input);

                throw nvae;
            }
            switch (alt42) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:418:4: ( ^( '->' SEMPRED rewrite_alternative ) )* ^( '->' rewrite_alternative )
                    {
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:418:4: ( ^( '->' SEMPRED rewrite_alternative ) )*
                    loop41:
                    do {
                        int alt41=2;
                        int LA41_0 = input.LA(1);

                        if ( (LA41_0==REWRITE) ) {
                            int LA41_1 = input.LA(2);

                            if ( (LA41_1==DOWN) ) {
                                int LA41_2 = input.LA(3);

                                if ( (LA41_2==SEMPRED) ) {
                                    alt41=1;
                                }


                            }


                        }


                        switch (alt41) {
                    	case 1 :
                    	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:418:5: ^( '->' SEMPRED rewrite_alternative )
                    	    {
                    	    match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2111); 

                    	    match(input, Token.DOWN, null); 
                    	    match(input,SEMPRED,FOLLOW_SEMPRED_in_rewrite2113); 
                    	    pushFollow(FOLLOW_rewrite_alternative_in_rewrite2115);
                    	    rewrite_alternative();

                    	    state._fsp--;


                    	    match(input, Token.UP, null); 

                    	    }
                    	    break;

                    	default :
                    	    break loop41;
                        }
                    } while (true);

                    match(input,REWRITE,FOLLOW_REWRITE_in_rewrite2121); 

                    match(input, Token.DOWN, null); 
                    pushFollow(FOLLOW_rewrite_alternative_in_rewrite2123);
                    rewrite_alternative();

                    state._fsp--;


                    match(input, Token.UP, null); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:420:2: 
                    {
                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite"

    public static class rewrite_alternative_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_alternative"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:422:1: rewrite_alternative : ( rewrite_template | rewrite_tree_alternative | ^( ALT EPSILON EOA ) );
    public final ANTLRv3TreeFilter.rewrite_alternative_return rewrite_alternative() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_alternative_return retval = new ANTLRv3TreeFilter.rewrite_alternative_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:423:2: ( rewrite_template | rewrite_tree_alternative | ^( ALT EPSILON EOA ) )
            int alt43=3;
            int LA43_0 = input.LA(1);

            if ( (LA43_0==TEMPLATE||LA43_0==ACTION) ) {
                alt43=1;
            }
            else if ( (LA43_0==ALT) ) {
                int LA43_2 = input.LA(2);

                if ( (LA43_2==DOWN) ) {
                    int LA43_3 = input.LA(3);

                    if ( (LA43_3==EPSILON) ) {
                        alt43=3;
                    }
                    else if ( ((LA43_3>=BLOCK && LA43_3<=POSITIVE_CLOSURE)||LA43_3==LABEL||LA43_3==TREE_BEGIN||(LA43_3>=TOKEN_REF && LA43_3<=ACTION)||LA43_3==RULE_REF) ) {
                        alt43=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 43, 3, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 43, 2, input);

                    throw nvae;
                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 43, 0, input);

                throw nvae;
            }
            switch (alt43) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:423:4: rewrite_template
                    {
                    pushFollow(FOLLOW_rewrite_template_in_rewrite_alternative2138);
                    rewrite_template();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:424:4: rewrite_tree_alternative
                    {
                    pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2143);
                    rewrite_tree_alternative();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:425:9: ^( ALT EPSILON EOA )
                    {
                    match(input,ALT,FOLLOW_ALT_in_rewrite_alternative2154); 

                    match(input, Token.DOWN, null); 
                    match(input,EPSILON,FOLLOW_EPSILON_in_rewrite_alternative2156); 
                    match(input,EOA,FOLLOW_EOA_in_rewrite_alternative2158); 

                    match(input, Token.UP, null); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_alternative"

    public static class rewrite_tree_block_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree_block"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:428:1: rewrite_tree_block : ^( BLOCK rewrite_tree_alternative EOB ) ;
    public final ANTLRv3TreeFilter.rewrite_tree_block_return rewrite_tree_block() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_block_return retval = new ANTLRv3TreeFilter.rewrite_tree_block_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:429:5: ( ^( BLOCK rewrite_tree_alternative EOB ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:429:9: ^( BLOCK rewrite_tree_alternative EOB )
            {
            match(input,BLOCK,FOLLOW_BLOCK_in_rewrite_tree_block2177); 

            match(input, Token.DOWN, null); 
            pushFollow(FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2179);
            rewrite_tree_alternative();

            state._fsp--;

            match(input,EOB,FOLLOW_EOB_in_rewrite_tree_block2181); 

            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree_block"

    public static class rewrite_tree_alternative_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree_alternative"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:432:1: rewrite_tree_alternative : ^( ALT ( rewrite_tree_element )+ EOA ) ;
    public final ANTLRv3TreeFilter.rewrite_tree_alternative_return rewrite_tree_alternative() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_alternative_return retval = new ANTLRv3TreeFilter.rewrite_tree_alternative_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:433:5: ( ^( ALT ( rewrite_tree_element )+ EOA ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:433:7: ^( ALT ( rewrite_tree_element )+ EOA )
            {
            match(input,ALT,FOLLOW_ALT_in_rewrite_tree_alternative2200); 

            match(input, Token.DOWN, null); 
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:433:13: ( rewrite_tree_element )+
            int cnt44=0;
            loop44:
            do {
                int alt44=2;
                int LA44_0 = input.LA(1);

                if ( ((LA44_0>=BLOCK && LA44_0<=POSITIVE_CLOSURE)||LA44_0==LABEL||LA44_0==TREE_BEGIN||(LA44_0>=TOKEN_REF && LA44_0<=ACTION)||LA44_0==RULE_REF) ) {
                    alt44=1;
                }


                switch (alt44) {
            	case 1 :
            	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:433:13: rewrite_tree_element
            	    {
            	    pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2202);
            	    rewrite_tree_element();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    if ( cnt44 >= 1 ) break loop44;
                        EarlyExitException eee =
                            new EarlyExitException(44, input);
                        throw eee;
                }
                cnt44++;
            } while (true);

            match(input,EOA,FOLLOW_EOA_in_rewrite_tree_alternative2205); 

            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree_alternative"

    public static class rewrite_tree_element_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree_element"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:436:1: rewrite_tree_element : ( rewrite_tree_atom | rewrite_tree | rewrite_tree_block | rewrite_tree_ebnf );
    public final ANTLRv3TreeFilter.rewrite_tree_element_return rewrite_tree_element() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_element_return retval = new ANTLRv3TreeFilter.rewrite_tree_element_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:437:2: ( rewrite_tree_atom | rewrite_tree | rewrite_tree_block | rewrite_tree_ebnf )
            int alt45=4;
            switch ( input.LA(1) ) {
            case LABEL:
            case TOKEN_REF:
            case STRING_LITERAL:
            case CHAR_LITERAL:
            case ACTION:
            case RULE_REF:
                {
                alt45=1;
                }
                break;
            case TREE_BEGIN:
                {
                alt45=2;
                }
                break;
            case BLOCK:
                {
                alt45=3;
                }
                break;
            case OPTIONAL:
            case CLOSURE:
            case POSITIVE_CLOSURE:
                {
                alt45=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 45, 0, input);

                throw nvae;
            }

            switch (alt45) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:437:4: rewrite_tree_atom
                    {
                    pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2220);
                    rewrite_tree_atom();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:438:4: rewrite_tree
                    {
                    pushFollow(FOLLOW_rewrite_tree_in_rewrite_tree_element2225);
                    rewrite_tree();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:439:6: rewrite_tree_block
                    {
                    pushFollow(FOLLOW_rewrite_tree_block_in_rewrite_tree_element2232);
                    rewrite_tree_block();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:440:6: rewrite_tree_ebnf
                    {
                    pushFollow(FOLLOW_rewrite_tree_ebnf_in_rewrite_tree_element2239);
                    rewrite_tree_ebnf();

                    state._fsp--;


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree_element"

    public static class rewrite_tree_atom_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree_atom"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:443:1: rewrite_tree_atom : ( CHAR_LITERAL | TOKEN_REF | ^( TOKEN_REF ARG_ACTION ) | RULE_REF | STRING_LITERAL | LABEL | ACTION );
    public final ANTLRv3TreeFilter.rewrite_tree_atom_return rewrite_tree_atom() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_atom_return retval = new ANTLRv3TreeFilter.rewrite_tree_atom_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:444:5: ( CHAR_LITERAL | TOKEN_REF | ^( TOKEN_REF ARG_ACTION ) | RULE_REF | STRING_LITERAL | LABEL | ACTION )
            int alt46=7;
            switch ( input.LA(1) ) {
            case CHAR_LITERAL:
                {
                alt46=1;
                }
                break;
            case TOKEN_REF:
                {
                int LA46_2 = input.LA(2);

                if ( (LA46_2==DOWN) ) {
                    alt46=3;
                }
                else if ( (LA46_2==UP||(LA46_2>=BLOCK && LA46_2<=POSITIVE_CLOSURE)||LA46_2==EOA||LA46_2==LABEL||LA46_2==TREE_BEGIN||(LA46_2>=TOKEN_REF && LA46_2<=ACTION)||LA46_2==RULE_REF) ) {
                    alt46=2;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 46, 2, input);

                    throw nvae;
                }
                }
                break;
            case RULE_REF:
                {
                alt46=4;
                }
                break;
            case STRING_LITERAL:
                {
                alt46=5;
                }
                break;
            case LABEL:
                {
                alt46=6;
                }
                break;
            case ACTION:
                {
                alt46=7;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 46, 0, input);

                throw nvae;
            }

            switch (alt46) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:444:9: CHAR_LITERAL
                    {
                    match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2255); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:445:6: TOKEN_REF
                    {
                    match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2262); 

                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:446:6: ^( TOKEN_REF ARG_ACTION )
                    {
                    match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_rewrite_tree_atom2270); 

                    match(input, Token.DOWN, null); 
                    match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rewrite_tree_atom2272); 

                    match(input, Token.UP, null); 

                    }
                    break;
                case 4 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:447:9: RULE_REF
                    {
                    match(input,RULE_REF,FOLLOW_RULE_REF_in_rewrite_tree_atom2284); 

                    }
                    break;
                case 5 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:448:6: STRING_LITERAL
                    {
                    match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2291); 

                    }
                    break;
                case 6 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:449:6: LABEL
                    {
                    match(input,LABEL,FOLLOW_LABEL_in_rewrite_tree_atom2298); 

                    }
                    break;
                case 7 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:450:4: ACTION
                    {
                    match(input,ACTION,FOLLOW_ACTION_in_rewrite_tree_atom2303); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree_atom"

    public static class rewrite_tree_ebnf_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree_ebnf"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:453:1: rewrite_tree_ebnf : ^( ebnfSuffix rewrite_tree_block ) ;
    public final ANTLRv3TreeFilter.rewrite_tree_ebnf_return rewrite_tree_ebnf() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_ebnf_return retval = new ANTLRv3TreeFilter.rewrite_tree_ebnf_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:454:2: ( ^( ebnfSuffix rewrite_tree_block ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:454:4: ^( ebnfSuffix rewrite_tree_block )
            {
            pushFollow(FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2315);
            ebnfSuffix();

            state._fsp--;


            match(input, Token.DOWN, null); 
            pushFollow(FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2317);
            rewrite_tree_block();

            state._fsp--;


            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree_ebnf"

    public static class rewrite_tree_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_tree"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:457:1: rewrite_tree : ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) ;
    public final ANTLRv3TreeFilter.rewrite_tree_return rewrite_tree() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_tree_return retval = new ANTLRv3TreeFilter.rewrite_tree_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:458:2: ( ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:458:4: ^( TREE_BEGIN rewrite_tree_atom ( rewrite_tree_element )* )
            {
            match(input,TREE_BEGIN,FOLLOW_TREE_BEGIN_in_rewrite_tree2331); 

            match(input, Token.DOWN, null); 
            pushFollow(FOLLOW_rewrite_tree_atom_in_rewrite_tree2333);
            rewrite_tree_atom();

            state._fsp--;

            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:458:35: ( rewrite_tree_element )*
            loop47:
            do {
                int alt47=2;
                int LA47_0 = input.LA(1);

                if ( ((LA47_0>=BLOCK && LA47_0<=POSITIVE_CLOSURE)||LA47_0==LABEL||LA47_0==TREE_BEGIN||(LA47_0>=TOKEN_REF && LA47_0<=ACTION)||LA47_0==RULE_REF) ) {
                    alt47=1;
                }


                switch (alt47) {
            	case 1 :
            	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:458:35: rewrite_tree_element
            	    {
            	    pushFollow(FOLLOW_rewrite_tree_element_in_rewrite_tree2335);
            	    rewrite_tree_element();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop47;
                }
            } while (true);


            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_tree"

    public static class rewrite_template_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_template"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:461:1: rewrite_template : ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION );
    public final ANTLRv3TreeFilter.rewrite_template_return rewrite_template() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_template_return retval = new ANTLRv3TreeFilter.rewrite_template_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:462:2: ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION )
            int alt48=4;
            alt48 = dfa48.predict(input);
            switch (alt48) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:462:6: ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) )
                    {
                    match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_template2353); 

                    match(input, Token.DOWN, null); 
                    match(input,ID,FOLLOW_ID_in_rewrite_template2355); 
                    pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template2357);
                    rewrite_template_args();

                    state._fsp--;

                    if ( (input.LA(1)>=DOUBLE_QUOTE_STRING_LITERAL && input.LA(1)<=DOUBLE_ANGLE_STRING_LITERAL) ) {
                        input.consume();
                        state.errorRecovery=false;
                    }
                    else {
                        MismatchedSetException mse = new MismatchedSetException(null,input);
                        throw mse;
                    }


                    match(input, Token.UP, null); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:465:4: rewrite_template_ref
                    {
                    pushFollow(FOLLOW_rewrite_template_ref_in_rewrite_template2380);
                    rewrite_template_ref();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:466:4: rewrite_indirect_template_head
                    {
                    pushFollow(FOLLOW_rewrite_indirect_template_head_in_rewrite_template2385);
                    rewrite_indirect_template_head();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:467:4: ACTION
                    {
                    match(input,ACTION,FOLLOW_ACTION_in_rewrite_template2390); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_template"

    public static class rewrite_template_ref_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_template_ref"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:470:1: rewrite_template_ref : ^( TEMPLATE ID rewrite_template_args ) ;
    public final ANTLRv3TreeFilter.rewrite_template_ref_return rewrite_template_ref() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_template_ref_return retval = new ANTLRv3TreeFilter.rewrite_template_ref_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:472:2: ( ^( TEMPLATE ID rewrite_template_args ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:472:4: ^( TEMPLATE ID rewrite_template_args )
            {
            match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_template_ref2404); 

            match(input, Token.DOWN, null); 
            match(input,ID,FOLLOW_ID_in_rewrite_template_ref2406); 
            pushFollow(FOLLOW_rewrite_template_args_in_rewrite_template_ref2408);
            rewrite_template_args();

            state._fsp--;


            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_template_ref"

    public static class rewrite_indirect_template_head_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_indirect_template_head"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:475:1: rewrite_indirect_template_head : ^( TEMPLATE ACTION rewrite_template_args ) ;
    public final ANTLRv3TreeFilter.rewrite_indirect_template_head_return rewrite_indirect_template_head() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_indirect_template_head_return retval = new ANTLRv3TreeFilter.rewrite_indirect_template_head_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:477:2: ( ^( TEMPLATE ACTION rewrite_template_args ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:477:4: ^( TEMPLATE ACTION rewrite_template_args )
            {
            match(input,TEMPLATE,FOLLOW_TEMPLATE_in_rewrite_indirect_template_head2423); 

            match(input, Token.DOWN, null); 
            match(input,ACTION,FOLLOW_ACTION_in_rewrite_indirect_template_head2425); 
            pushFollow(FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head2427);
            rewrite_template_args();

            state._fsp--;


            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_indirect_template_head"

    public static class rewrite_template_args_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_template_args"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:480:1: rewrite_template_args : ( ^( ARGLIST ( rewrite_template_arg )+ ) | ARGLIST );
    public final ANTLRv3TreeFilter.rewrite_template_args_return rewrite_template_args() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_template_args_return retval = new ANTLRv3TreeFilter.rewrite_template_args_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:481:2: ( ^( ARGLIST ( rewrite_template_arg )+ ) | ARGLIST )
            int alt50=2;
            int LA50_0 = input.LA(1);

            if ( (LA50_0==ARGLIST) ) {
                int LA50_1 = input.LA(2);

                if ( (LA50_1==DOWN) ) {
                    alt50=1;
                }
                else if ( (LA50_1==UP||(LA50_1>=DOUBLE_QUOTE_STRING_LITERAL && LA50_1<=DOUBLE_ANGLE_STRING_LITERAL)) ) {
                    alt50=2;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 50, 1, input);

                    throw nvae;
                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 50, 0, input);

                throw nvae;
            }
            switch (alt50) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:481:4: ^( ARGLIST ( rewrite_template_arg )+ )
                    {
                    match(input,ARGLIST,FOLLOW_ARGLIST_in_rewrite_template_args2440); 

                    match(input, Token.DOWN, null); 
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:481:14: ( rewrite_template_arg )+
                    int cnt49=0;
                    loop49:
                    do {
                        int alt49=2;
                        int LA49_0 = input.LA(1);

                        if ( (LA49_0==ARG) ) {
                            alt49=1;
                        }


                        switch (alt49) {
                    	case 1 :
                    	    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:481:14: rewrite_template_arg
                    	    {
                    	    pushFollow(FOLLOW_rewrite_template_arg_in_rewrite_template_args2442);
                    	    rewrite_template_arg();

                    	    state._fsp--;


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt49 >= 1 ) break loop49;
                                EarlyExitException eee =
                                    new EarlyExitException(49, input);
                                throw eee;
                        }
                        cnt49++;
                    } while (true);


                    match(input, Token.UP, null); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:482:4: ARGLIST
                    {
                    match(input,ARGLIST,FOLLOW_ARGLIST_in_rewrite_template_args2449); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_template_args"

    public static class rewrite_template_arg_return extends TreeRuleReturnScope {
        public StringTemplate st;
        public Object getTemplate() { return st; }
        public String toString() { return st==null?null:st.toString(); }
    };

    // $ANTLR start "rewrite_template_arg"
    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:485:1: rewrite_template_arg : ^( ARG ID ACTION ) ;
    public final ANTLRv3TreeFilter.rewrite_template_arg_return rewrite_template_arg() throws RecognitionException {
        ANTLRv3TreeFilter.rewrite_template_arg_return retval = new ANTLRv3TreeFilter.rewrite_template_arg_return();
        retval.start = input.LT(1);

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:486:2: ( ^( ARG ID ACTION ) )
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:486:6: ^( ARG ID ACTION )
            {
            match(input,ARG,FOLLOW_ARG_in_rewrite_template_arg2463); 

            match(input, Token.DOWN, null); 
            match(input,ID,FOLLOW_ID_in_rewrite_template_arg2465); 
            match(input,ACTION,FOLLOW_ACTION_in_rewrite_template_arg2467); 

            match(input, Token.UP, null); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end "rewrite_template_arg"

    // Delegated rules


    protected DFA33 dfa33 = new DFA33(this);
    protected DFA48 dfa48 = new DFA48(this);
    static final String DFA33_eotS =
        "\15\uffff";
    static final String DFA33_eofS =
        "\15\uffff";
    static final String DFA33_minS =
        "\1\10\2\2\6\uffff\1\24\1\10\2\uffff";
    static final String DFA33_maxS =
        "\1\134\2\2\6\uffff\1\24\1\134\2\uffff";
    static final String DFA33_acceptS =
        "\3\uffff\1\3\1\4\1\5\1\6\1\7\1\10\2\uffff\1\2\1\1";
    static final String DFA33_specialS =
        "\15\uffff}>";
    static final String[] DFA33_transitionS = {
            "\5\4\1\uffff\1\3\21\uffff\1\6\1\7\1\4\2\uffff\1\10\2\3\2\uffff"+
            "\3\3\1\5\3\uffff\1\3\25\uffff\1\1\17\uffff\1\2\1\uffff\1\3\2"+
            "\uffff\1\3",
            "\1\11",
            "\1\11",
            "",
            "",
            "",
            "",
            "",
            "",
            "\1\12",
            "\1\14\5\uffff\1\13\27\uffff\2\13\2\uffff\3\13\4\uffff\1\13"+
            "\47\uffff\1\13\2\uffff\1\13",
            "",
            ""
    };

    static final short[] DFA33_eot = DFA.unpackEncodedString(DFA33_eotS);
    static final short[] DFA33_eof = DFA.unpackEncodedString(DFA33_eofS);
    static final char[] DFA33_min = DFA.unpackEncodedStringToUnsignedChars(DFA33_minS);
    static final char[] DFA33_max = DFA.unpackEncodedStringToUnsignedChars(DFA33_maxS);
    static final short[] DFA33_accept = DFA.unpackEncodedString(DFA33_acceptS);
    static final short[] DFA33_special = DFA.unpackEncodedString(DFA33_specialS);
    static final short[][] DFA33_transition;

    static {
        int numStates = DFA33_transitionS.length;
        DFA33_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA33_transition[i] = DFA.unpackEncodedString(DFA33_transitionS[i]);
        }
    }

    class DFA33 extends DFA {

        public DFA33(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 33;
            this.eot = DFA33_eot;
            this.eof = DFA33_eof;
            this.min = DFA33_min;
            this.max = DFA33_max;
            this.accept = DFA33_accept;
            this.special = DFA33_special;
            this.transition = DFA33_transition;
        }
        public String getDescription() {
            return "226:1: elementNoOptionSpec : ( ^( ( '=' | '+=' ) ID block ) -> {$block.st} | ^( ( '=' | '+=' ) ID atom ) -> {$atom.st} | atom -> {$atom.st} | ebnf -> {$ebnf.st} | ACTION -> {%{\"epsilon\"}} | SEMPRED -> {%{\"[>SEMPRED<]\"}} | GATED_SEMPRED -> {%{\"[>GATED_SEMPRED<]\"}} | treeSpec -> {$treeSpec.st});";
        }
    }
    static final String DFA48_eotS =
        "\20\uffff";
    static final String DFA48_eofS =
        "\20\uffff";
    static final String DFA48_minS =
        "\1\36\1\2\1\uffff\1\24\1\26\1\uffff\1\2\1\25\2\uffff\1\2\1\24\1"+
        "\55\3\3";
    static final String DFA48_maxS =
        "\1\55\1\2\1\uffff\1\55\1\26\1\uffff\1\63\1\25\2\uffff\1\2\1\24"+
        "\1\55\1\3\1\25\1\63";
    static final String DFA48_acceptS =
        "\2\uffff\1\4\2\uffff\1\3\2\uffff\1\1\1\2\6\uffff";
    static final String DFA48_specialS =
        "\20\uffff}>";
    static final String[] DFA48_transitionS = {
            "\1\1\16\uffff\1\2",
            "\1\3",
            "",
            "\1\4\30\uffff\1\5",
            "\1\6",
            "",
            "\1\7\1\11\56\uffff\2\10",
            "\1\12",
            "",
            "",
            "\1\13",
            "\1\14",
            "\1\15",
            "\1\16",
            "\1\17\21\uffff\1\12",
            "\1\11\56\uffff\2\10"
    };

    static final short[] DFA48_eot = DFA.unpackEncodedString(DFA48_eotS);
    static final short[] DFA48_eof = DFA.unpackEncodedString(DFA48_eofS);
    static final char[] DFA48_min = DFA.unpackEncodedStringToUnsignedChars(DFA48_minS);
    static final char[] DFA48_max = DFA.unpackEncodedStringToUnsignedChars(DFA48_maxS);
    static final short[] DFA48_accept = DFA.unpackEncodedString(DFA48_acceptS);
    static final short[] DFA48_special = DFA.unpackEncodedString(DFA48_specialS);
    static final short[][] DFA48_transition;

    static {
        int numStates = DFA48_transitionS.length;
        DFA48_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA48_transition[i] = DFA.unpackEncodedString(DFA48_transitionS[i]);
        }
    }

    class DFA48 extends DFA {

        public DFA48(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 48;
            this.eot = DFA48_eot;
            this.eof = DFA48_eof;
            this.min = DFA48_min;
            this.max = DFA48_max;
            this.accept = DFA48_accept;
            this.special = DFA48_special;
            this.transition = DFA48_transition;
        }
        public String getDescription() {
            return "461:1: rewrite_template : ( ^( TEMPLATE ID rewrite_template_args ( DOUBLE_QUOTE_STRING_LITERAL | DOUBLE_ANGLE_STRING_LITERAL ) ) | rewrite_template_ref | rewrite_indirect_template_head | ACTION );";
        }
    }
 

    public static final BitSet FOLLOW_grammarType_in_grammarDef65 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_grammarDef67 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_DOC_COMMENT_in_grammarDef101 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_optionsSpec_in_grammarDef104 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_tokensSpec_in_grammarDef107 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_attrScope_in_grammarDef110 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_action_in_grammarDef113 = new BitSet(new long[]{0x0000420080000090L,0x0000000000000100L});
    public static final BitSet FOLLOW_rule_in_grammarDef119 = new BitSet(new long[]{0x0000420080000098L,0x0000000000000100L});
    public static final BitSet FOLLOW_LEXER_GRAMMAR_in_grammarType195 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PARSER_GRAMMAR_in_grammarType207 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TREE_GRAMMAR_in_grammarType219 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_COMBINED_GRAMMAR_in_grammarType225 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TOKENS_in_tokensSpec244 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_tokenSpec_in_tokensSpec246 = new BitSet(new long[]{0x0000040000000008L,0x0000000000000080L});
    public static final BitSet FOLLOW_71_in_tokenSpec260 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec262 = new BitSet(new long[]{0x0000080000000000L});
    public static final BitSet FOLLOW_STRING_LITERAL_in_tokenSpec264 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_71_in_tokenSpec271 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec273 = new BitSet(new long[]{0x0000100000000000L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_tokenSpec275 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_TOKEN_REF_in_tokenSpec281 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_SCOPE_in_attrScope293 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_attrScope295 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_ACTION_in_attrScope297 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_72_in_action310 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_action312 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ID_in_action314 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_ACTION_in_action316 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_72_in_action323 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_action325 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_ACTION_in_action327 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_OPTIONS_in_optionsSpec340 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_option_in_optionsSpec342 = new BitSet(new long[]{0x0000000000000008L,0x0000000000000080L});
    public static final BitSet FOLLOW_71_in_option361 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_option363 = new BitSet(new long[]{0x0000980000100000L});
    public static final BitSet FOLLOW_optionValue_in_option365 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_set_in_optionValue0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_in_rule431 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_rule433 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
    public static final BitSet FOLLOW_modifier_in_rule450 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
    public static final BitSet FOLLOW_ARG_in_rule455 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_rule457 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_RET_in_rule464 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_rule466 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_optionsSpec_in_rule477 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
    public static final BitSet FOLLOW_ruleScopeSpec_in_rule480 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
    public static final BitSet FOLLOW_ruleAction_in_rule483 = new BitSet(new long[]{0x0000401080A00100L,0x0000000000003900L});
    public static final BitSet FOLLOW_altList_in_rule501 = new BitSet(new long[]{0x0000000000020000L,0x0000000000600000L});
    public static final BitSet FOLLOW_exceptionGroup_in_rule518 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_EOR_in_rule528 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_set_in_modifier0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_72_in_ruleAction610 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_ruleAction612 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_ACTION_in_ruleAction614 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_80_in_throwsSpec627 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_throwsSpec629 = new BitSet(new long[]{0x0000000000100008L});
    public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec643 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec645 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec652 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ACTION_in_ruleScopeSpec654 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ID_in_ruleScopeSpec656 = new BitSet(new long[]{0x0000000000100008L});
    public static final BitSet FOLLOW_SCOPE_in_ruleScopeSpec664 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_ruleScopeSpec666 = new BitSet(new long[]{0x0000000000100008L});
    public static final BitSet FOLLOW_BLOCK_in_block691 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_optionsSpec_in_block693 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_alternative_in_block707 = new BitSet(new long[]{0x0000010000050000L});
    public static final BitSet FOLLOW_rewrite_in_block709 = new BitSet(new long[]{0x0000000000050000L});
    public static final BitSet FOLLOW_EOB_in_block739 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_BLOCK_in_altList812 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_alternative_in_altList825 = new BitSet(new long[]{0x0000010000050000L});
    public static final BitSet FOLLOW_rewrite_in_altList827 = new BitSet(new long[]{0x0000000000050000L});
    public static final BitSet FOLLOW_EOB_in_altList857 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_ALT_in_alternative930 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_element_in_alternative943 = new BitSet(new long[]{0x00023CE700085F00L,0x0000000012800080L});
    public static final BitSet FOLLOW_EOA_in_alternative973 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_ALT_in_alternative1027 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_EPSILON_in_alternative1029 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_EOA_in_alternative1038 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_exceptionHandler_in_exceptionGroup1072 = new BitSet(new long[]{0x0000000000000002L,0x0000000000600000L});
    public static final BitSet FOLLOW_finallyClause_in_exceptionGroup1075 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_finallyClause_in_exceptionGroup1081 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_85_in_exceptionHandler1102 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_exceptionHandler1104 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_ACTION_in_exceptionHandler1106 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_86_in_finallyClause1128 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ACTION_in_finallyClause1130 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_elementNoOptionSpec_in_element1145 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_71_in_elementNoOptionSpec1171 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_87_in_elementNoOptionSpec1173 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_elementNoOptionSpec1176 = new BitSet(new long[]{0x0000000400001F00L});
    public static final BitSet FOLLOW_block_in_elementNoOptionSpec1178 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_71_in_elementNoOptionSpec1196 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_87_in_elementNoOptionSpec1198 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_elementNoOptionSpec1201 = new BitSet(new long[]{0x00021CC000004000L,0x0000000012000000L});
    public static final BitSet FOLLOW_atom_in_elementNoOptionSpec1203 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_atom_in_elementNoOptionSpec1219 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ebnf_in_elementNoOptionSpec1234 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ACTION_in_elementNoOptionSpec1251 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_SEMPRED_in_elementNoOptionSpec1268 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_GATED_SEMPRED_in_elementNoOptionSpec1283 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_treeSpec_in_elementNoOptionSpec1300 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ROOT_in_atom1323 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_BANG_in_atom1325 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_atom_in_atom1328 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_range_in_atom1344 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_notSet_in_atom1359 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_REF_in_atom1376 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_atom1378 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_RULE_REF_in_atom1415 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_terminal_in_atom1451 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_89_in_notSet1473 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_notTerminal_in_notSet1475 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_89_in_notSet1482 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_block_in_notSet1484 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_TREE_BEGIN_in_treeSpec1507 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_TOKEN_REF_in_treeSpec1534 = new BitSet(new long[]{0x00023CE700085F08L,0x0000000012800080L});
    public static final BitSet FOLLOW_element_in_treeSpec1555 = new BitSet(new long[]{0x00023CE700085F08L,0x0000000012800080L});
    public static final BitSet FOLLOW_SYNPRED_in_ebnf1705 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_block_in_ebnf1707 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_SYN_SEMPRED_in_ebnf1723 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_OPTIONAL_in_ebnf1740 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_block_in_ebnf1742 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_CLOSURE_in_ebnf1779 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_block_in_ebnf1781 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnf1818 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_block_in_ebnf1820 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_block_in_ebnf1843 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHAR_RANGE_in_range1865 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_range1867 = new BitSet(new long[]{0x0000100000000000L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_range1869 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_terminal1882 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TOKEN_REF_in_terminal1898 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_LITERAL_in_terminal1948 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TOKEN_REF_in_terminal1992 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_terminal1994 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_92_in_terminal2011 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_notTerminal0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_OPTIONAL_in_ebnfSuffix2054 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CLOSURE_in_ebnfSuffix2070 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_POSITIVE_CLOSURE_in_ebnfSuffix2086 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_REWRITE_in_rewrite2111 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_SEMPRED_in_rewrite2113 = new BitSet(new long[]{0x0000200040010000L});
    public static final BitSet FOLLOW_rewrite_alternative_in_rewrite2115 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_REWRITE_in_rewrite2121 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_alternative_in_rewrite2123 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_rewrite_template_in_rewrite_alternative2138 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rewrite_tree_alternative_in_rewrite_alternative2143 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ALT_in_rewrite_alternative2154 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_EPSILON_in_rewrite_alternative2156 = new BitSet(new long[]{0x0000000000080000L});
    public static final BitSet FOLLOW_EOA_in_rewrite_alternative2158 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_BLOCK_in_rewrite_tree_block2177 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_tree_alternative_in_rewrite_tree_block2179 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_EOB_in_rewrite_tree_block2181 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_ALT_in_rewrite_tree_alternative2200 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_tree_element_in_rewrite_tree_alternative2202 = new BitSet(new long[]{0x00023C2020080F00L});
    public static final BitSet FOLLOW_EOA_in_rewrite_tree_alternative2205 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_rewrite_tree_atom_in_rewrite_tree_element2220 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rewrite_tree_in_rewrite_tree_element2225 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rewrite_tree_block_in_rewrite_tree_element2232 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rewrite_tree_ebnf_in_rewrite_tree_element2239 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CHAR_LITERAL_in_rewrite_tree_atom2255 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_tree_atom2262 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TOKEN_REF_in_rewrite_tree_atom2270 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ARG_ACTION_in_rewrite_tree_atom2272 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_RULE_REF_in_rewrite_tree_atom2284 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_LITERAL_in_rewrite_tree_atom2291 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_LABEL_in_rewrite_tree_atom2298 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ACTION_in_rewrite_tree_atom2303 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ebnfSuffix_in_rewrite_tree_ebnf2315 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_tree_block_in_rewrite_tree_ebnf2317 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_TREE_BEGIN_in_rewrite_tree2331 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_tree_atom_in_rewrite_tree2333 = new BitSet(new long[]{0x00023C2020080F08L});
    public static final BitSet FOLLOW_rewrite_tree_element_in_rewrite_tree2335 = new BitSet(new long[]{0x00023C2020080F08L});
    public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template2353 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_rewrite_template2355 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_template2357 = new BitSet(new long[]{0x000C000000000000L});
    public static final BitSet FOLLOW_set_in_rewrite_template2364 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_rewrite_template_ref_in_rewrite_template2380 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rewrite_indirect_template_head_in_rewrite_template2385 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ACTION_in_rewrite_template2390 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_TEMPLATE_in_rewrite_template_ref2404 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ID_in_rewrite_template_ref2406 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_template_ref2408 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_TEMPLATE_in_rewrite_indirect_template_head2423 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_ACTION_in_rewrite_indirect_template_head2425 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_rewrite_template_args_in_rewrite_indirect_template_head2427 = new BitSet(new long[]{0x0000000000000008L});
    public static final BitSet FOLLOW_ARGLIST_in_rewrite_template_args2440 = new BitSet(new long[]{0x0000000000000004L});
    public static final BitSet FOLLOW_rewrite_template_arg_in_rewrite_template_args2442 = new BitSet(new long[]{0x0000000000200008L});
    public static final BitSet FOLLOW_ARGLIST_in_rewrite_template_args2449 = new BitSet(new long[]{0x0000000000000002L}