public final WaiprParser.handler_return handler() throws RecognitionException {
		WaiprParser.handler_return retval = new WaiprParser.handler_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token ID24=null;
		Token char_literal25=null;
		Token char_literal27=null;
		Token char_literal28=null;
		Token char_literal30=null;
		ParserRuleReturnScope triggersource26 =null;
		ParserRuleReturnScope statement29 =null;

		CommonTree ID24_tree=null;
		CommonTree char_literal25_tree=null;
		CommonTree char_literal27_tree=null;
		CommonTree char_literal28_tree=null;
		CommonTree char_literal30_tree=null;
		RewriteRuleTokenStream stream_25=new RewriteRuleTokenStream(adaptor,"token 25");
		RewriteRuleTokenStream stream_26=new RewriteRuleTokenStream(adaptor,"token 26");
		RewriteRuleTokenStream stream_15=new RewriteRuleTokenStream(adaptor,"token 15");
		RewriteRuleTokenStream stream_16=new RewriteRuleTokenStream(adaptor,"token 16");
		RewriteRuleTokenStream stream_ID=new RewriteRuleTokenStream(adaptor,"token ID");
		RewriteRuleSubtreeStream stream_statement=new RewriteRuleSubtreeStream(adaptor,"rule statement");
		RewriteRuleSubtreeStream stream_triggersource=new RewriteRuleSubtreeStream(adaptor,"rule triggersource");

		try {
			// Waipr.g:26:9: ( ID '(' triggersource ')' '{' ( statement )* '}' -> ^( ID triggersource ( statement )* ) )
			// Waipr.g:26:11: ID '(' triggersource ')' '{' ( statement )* '}'
			{
			ID24=(Token)match(input,ID,FOLLOW_ID_in_handler175);  
			stream_ID.add(ID24);

			char_literal25=(Token)match(input,15,FOLLOW_15_in_handler177);  
			stream_15.add(char_literal25);

			pushFollow(FOLLOW_triggersource_in_handler179);
			triggersource26=triggersource();
			state._fsp--;

			stream_triggersource.add(triggersource26.getTree());
			char_literal27=(Token)match(input,16,FOLLOW_16_in_handler181);  
			stream_16.add(char_literal27);

			char_literal28=(Token)match(input,25,FOLLOW_25_in_handler183);  
			stream_25.add(char_literal28);

			// Waipr.g:26:40: ( statement )*
			loop9:
			while (true) {
				int alt9=2;
				int LA9_0 = input.LA(1);
				if ( (LA9_0==ID) ) {
					alt9=1;
				}

				switch (alt9) {
				case 1 :
					// Waipr.g:26:40: statement
					{
					pushFollow(FOLLOW_statement_in_handler185);
					statement29=statement();
					state._fsp--;

					stream_statement.add(statement29.getTree());
					}
					break;

				default :
					break loop9;
				}
			}

			char_literal30=(Token)match(input,26,FOLLOW_26_in_handler188);  
			stream_26.add(char_literal30);

			// AST REWRITE
			// elements: ID, triggersource, statement
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (CommonTree)adaptor.nil();
			// 26:55: -> ^( ID triggersource ( statement )* )
			{
				// Waipr.g:26:58: ^( ID triggersource ( statement )* )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot(stream_ID.nextNode(), root_1);
				adaptor.addChild(root_1, stream_triggersource.nextTree());
				// Waipr.g:26:77: ( statement )*
				while ( stream_statement.hasNext() ) {
					adaptor.addChild(root_1, stream_statement.nextTree());
				}
				stream_statement.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;

			}

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

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

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}