public final TLParser.functionDecl_return functionDecl() throws RecognitionException {
        TLParser.functionDecl_return retval = new TLParser.functionDecl_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token Def75=null;
        Token Identifier76=null;
        Token char_literal77=null;
        Token char_literal79=null;
        Token End81=null;
        TLParser.idList_return idList78 = null;

        TLParser.block_return block80 = null;


        Object Def75_tree=null;
        Object Identifier76_tree=null;
        Object char_literal77_tree=null;
        Object char_literal79_tree=null;
        Object End81_tree=null;

        try {
            // src/grammar/TL.g:110:3: ( Def Identifier '(' ( idList )? ')' block End )
            // src/grammar/TL.g:110:6: Def Identifier '(' ( idList )? ')' block End
            {
            root_0 = (Object)adaptor.nil();

            Def75=(Token)match(input,Def,FOLLOW_Def_in_functionDecl726); 
            Def75_tree = (Object)adaptor.create(Def75);
            adaptor.addChild(root_0, Def75_tree);

            Identifier76=(Token)match(input,Identifier,FOLLOW_Identifier_in_functionDecl728); 
            Identifier76_tree = (Object)adaptor.create(Identifier76);
            adaptor.addChild(root_0, Identifier76_tree);

            char_literal77=(Token)match(input,OParen,FOLLOW_OParen_in_functionDecl730); 
            char_literal77_tree = (Object)adaptor.create(char_literal77);
            adaptor.addChild(root_0, char_literal77_tree);

            // src/grammar/TL.g:110:25: ( idList )?
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==Identifier) ) {
                alt15=1;
            }
            switch (alt15) {
                case 1 :
                    // src/grammar/TL.g:110:25: idList
                    {
                    pushFollow(FOLLOW_idList_in_functionDecl732);
                    idList78=idList();

                    state._fsp--;

                    adaptor.addChild(root_0, idList78.getTree());

                    }
                    break;

            }

            char_literal79=(Token)match(input,CParen,FOLLOW_CParen_in_functionDecl735); 
            char_literal79_tree = (Object)adaptor.create(char_literal79);
            adaptor.addChild(root_0, char_literal79_tree);

            pushFollow(FOLLOW_block_in_functionDecl737);
            block80=block();

            state._fsp--;

            adaptor.addChild(root_0, block80.getTree());
            End81=(Token)match(input,End,FOLLOW_End_in_functionDecl739); 
            End81_tree = (Object)adaptor.create(End81);
            adaptor.addChild(root_0, End81_tree);

            defineFunction((Identifier76!=null?Identifier76.getText():null), (idList78!=null?((Object)idList78.tree):null), (block80!=null?((Object)block80.tree):null));

            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }