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

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:78:2: ( ^( '=' TOKEN_REF STRING_LITERAL ) | ^( '=' TOKEN_REF CHAR_LITERAL ) | TOKEN_REF )
            int alt9=3;
            int LA9_0 = input.LA(1);

            if ( (LA9_0==71) ) {
                int LA9_1 = input.LA(2);

                if ( (LA9_1==DOWN) ) {
                    int LA9_3 = input.LA(3);

                    if ( (LA9_3==TOKEN_REF) ) {
                        int LA9_4 = input.LA(4);

                        if ( (LA9_4==STRING_LITERAL) ) {
                            alt9=1;
                        }
                        else if ( (LA9_4==CHAR_LITERAL) ) {
                            alt9=2;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("", 9, 4, input);

                            throw nvae;
                        }
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("", 9, 3, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("", 9, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA9_0==TOKEN_REF) ) {
                alt9=3;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;
            }
            switch (alt9) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:78:4: ^( '=' TOKEN_REF STRING_LITERAL )
                    {
                    match(input,71,FOLLOW_71_in_tokenSpec260); 

                    match(input, Token.DOWN, null); 
                    match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec262); 
                    match(input,STRING_LITERAL,FOLLOW_STRING_LITERAL_in_tokenSpec264); 

                    match(input, Token.UP, null); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:79:4: ^( '=' TOKEN_REF CHAR_LITERAL )
                    {
                    match(input,71,FOLLOW_71_in_tokenSpec271); 

                    match(input, Token.DOWN, null); 
                    match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec273); 
                    match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_tokenSpec275); 

                    match(input, Token.UP, null); 

                    }
                    break;
                case 3 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:80:4: TOKEN_REF
                    {
                    match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_tokenSpec281); 

                    }
                    break;

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