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

        try {
            // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:64:3: ( LEXER_GRAMMAR | PARSER_GRAMMAR | TREE_GRAMMAR | COMBINED_GRAMMAR )
            int alt7=4;
            switch ( input.LA(1) ) {
            case LEXER_GRAMMAR:
                {
                alt7=1;
                }
                break;
            case PARSER_GRAMMAR:
                {
                alt7=2;
                }
                break;
            case TREE_GRAMMAR:
                {
                alt7=3;
                }
                break;
            case COMBINED_GRAMMAR:
                {
                alt7=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }

            switch (alt7) {
                case 1 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:64:5: LEXER_GRAMMAR
                    {
                    match(input,LEXER_GRAMMAR,FOLLOW_LEXER_GRAMMAR_in_grammarType195); 
                     if (true) throw new UnsupportedSyntaxException("Only tree grammars are allowed."); 

                    }
                    break;
                case 2 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:66:5: PARSER_GRAMMAR
                    {
                    match(input,PARSER_GRAMMAR,FOLLOW_PARSER_GRAMMAR_in_grammarType207); 
                     if (true) throw new UnsupportedSyntaxException("Only tree grammars are allowed."); 

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

                    }
                    break;
                case 4 :
                    // back-end/koopa/trees/antlr/filter/generator/ANTLRv3TreeFilter.g:69:5: COMBINED_GRAMMAR
                    {
                    match(input,COMBINED_GRAMMAR,FOLLOW_COMBINED_GRAMMAR_in_grammarType225); 
                     if (true) throw new UnsupportedSyntaxException("Only tree grammars are allowed."); 

                    }
                    break;

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