public final HiveParser_SelectClauseParser.window_clause_return window_clause() throws RecognitionException {
		HiveParser_SelectClauseParser.window_clause_return retval = new HiveParser_SelectClauseParser.window_clause_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token KW_WINDOW88=null;
		Token COMMA90=null;
		ParserRuleReturnScope window_defn89 =null;
		ParserRuleReturnScope window_defn91 =null;

		CommonTree KW_WINDOW88_tree=null;
		CommonTree COMMA90_tree=null;
		RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,"token COMMA");
		RewriteRuleTokenStream stream_KW_WINDOW=new RewriteRuleTokenStream(adaptor,"token KW_WINDOW");
		RewriteRuleSubtreeStream stream_window_defn=new RewriteRuleSubtreeStream(adaptor,"rule window_defn");

		 gParent.msgs.push("window_clause"); 
		try {
			// SelectClauseParser.g:243:3: ( KW_WINDOW window_defn ( COMMA window_defn )* -> ^( KW_WINDOW ( window_defn )+ ) )
			// SelectClauseParser.g:244:3: KW_WINDOW window_defn ( COMMA window_defn )*
			{
			KW_WINDOW88=(Token)match(input,KW_WINDOW,FOLLOW_KW_WINDOW_in_window_clause1658);  
			stream_KW_WINDOW.add(KW_WINDOW88);

			pushFollow(FOLLOW_window_defn_in_window_clause1660);
			window_defn89=window_defn();
			state._fsp--;

			stream_window_defn.add(window_defn89.getTree());
			// SelectClauseParser.g:244:25: ( COMMA window_defn )*
			loop32:
			while (true) {
				int alt32=2;
				int LA32_0 = input.LA(1);
				if ( (LA32_0==COMMA) ) {
					alt32=1;
				}

				switch (alt32) {
				case 1 :
					// SelectClauseParser.g:244:26: COMMA window_defn
					{
					COMMA90=(Token)match(input,COMMA,FOLLOW_COMMA_in_window_clause1663);  
					stream_COMMA.add(COMMA90);

					pushFollow(FOLLOW_window_defn_in_window_clause1665);
					window_defn91=window_defn();
					state._fsp--;

					stream_window_defn.add(window_defn91.getTree());
					}
					break;

				default :
					break loop32;
				}
			}

			// AST REWRITE
			// elements: window_defn, KW_WINDOW
			// 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();
			// 244:46: -> ^( KW_WINDOW ( window_defn )+ )
			{
				// SelectClauseParser.g:244:49: ^( KW_WINDOW ( window_defn )+ )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot(stream_KW_WINDOW.nextNode(), root_1);
				if ( !(stream_window_defn.hasNext()) ) {
					throw new RewriteEarlyExitException();
				}
				while ( stream_window_defn.hasNext() ) {
					adaptor.addChild(root_1, stream_window_defn.nextTree());
				}
				stream_window_defn.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);

			 gParent.msgs.pop(); 
		}

		catch (RecognitionException e) {
		  throw e;
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}