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

		CommonTree root_0 = null;

		ParserRuleReturnScope globalstat54 =null;
		ParserRuleReturnScope localstat55 =null;


		try {
			// Waipr.g:46:6: ( globalstat | localstat )
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0==14) ) {
				alt15=1;
			}
			else if ( (LA15_0==ID) ) {
				alt15=2;
			}

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

			switch (alt15) {
				case 1 :
					// Waipr.g:46:8: globalstat
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_globalstat_in_stat358);
					globalstat54=globalstat();
					state._fsp--;

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

					}
					break;
				case 2 :
					// Waipr.g:47:4: localstat
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_localstat_in_stat363);
					localstat55=localstat();
					state._fsp--;

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

					}
					break;

			}
			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;
	}