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

		CommonTree root_0 = null;

		Token KW_RANGE107=null;
		Token KW_RANGE108=null;
		Token KW_BETWEEN109=null;
		Token KW_AND110=null;
		ParserRuleReturnScope sb =null;
		ParserRuleReturnScope s =null;
		ParserRuleReturnScope end =null;

		CommonTree KW_RANGE107_tree=null;
		CommonTree KW_RANGE108_tree=null;
		CommonTree KW_BETWEEN109_tree=null;
		CommonTree KW_AND110_tree=null;
		RewriteRuleTokenStream stream_KW_BETWEEN=new RewriteRuleTokenStream(adaptor,"token KW_BETWEEN");
		RewriteRuleTokenStream stream_KW_AND=new RewriteRuleTokenStream(adaptor,"token KW_AND");
		RewriteRuleTokenStream stream_KW_RANGE=new RewriteRuleTokenStream(adaptor,"token KW_RANGE");
		RewriteRuleSubtreeStream stream_window_frame_boundary=new RewriteRuleSubtreeStream(adaptor,"rule window_frame_boundary");
		RewriteRuleSubtreeStream stream_window_frame_start_boundary=new RewriteRuleSubtreeStream(adaptor,"rule window_frame_start_boundary");

		 gParent.msgs.push("window_value_expression"); 
		try {
			// SelectClauseParser.g:277:2: ( KW_RANGE sb= window_frame_start_boundary -> ^( TOK_WINDOWVALUES $sb) | KW_RANGE KW_BETWEEN s= window_frame_boundary KW_AND end= window_frame_boundary -> ^( TOK_WINDOWVALUES $s $end) )
			int alt39=2;
			int LA39_0 = input.LA(1);
			if ( (LA39_0==KW_RANGE) ) {
				int LA39_1 = input.LA(2);
				if ( (LA39_1==KW_BETWEEN) ) {
					alt39=2;
				}
				else if ( (LA39_1==KW_CURRENT||LA39_1==KW_UNBOUNDED||LA39_1==Number) ) {
					alt39=1;
				}

				else {
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 39, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

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

			switch (alt39) {
				case 1 :
					// SelectClauseParser.g:278:2: KW_RANGE sb= window_frame_start_boundary
					{
					KW_RANGE107=(Token)match(input,KW_RANGE,FOLLOW_KW_RANGE_in_window_value_expression1876);  
					stream_KW_RANGE.add(KW_RANGE107);

					pushFollow(FOLLOW_window_frame_start_boundary_in_window_value_expression1880);
					sb=window_frame_start_boundary();
					state._fsp--;

					stream_window_frame_start_boundary.add(sb.getTree());
					// AST REWRITE
					// elements: sb
					// token labels: 
					// rule labels: retval, sb
					// 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);
					RewriteRuleSubtreeStream stream_sb=new RewriteRuleSubtreeStream(adaptor,"rule sb",sb!=null?sb.getTree():null);

					root_0 = (CommonTree)adaptor.nil();
					// 278:42: -> ^( TOK_WINDOWVALUES $sb)
					{
						// SelectClauseParser.g:278:45: ^( TOK_WINDOWVALUES $sb)
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_WINDOWVALUES, "TOK_WINDOWVALUES"), root_1);
						adaptor.addChild(root_1, stream_sb.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;
				case 2 :
					// SelectClauseParser.g:279:2: KW_RANGE KW_BETWEEN s= window_frame_boundary KW_AND end= window_frame_boundary
					{
					KW_RANGE108=(Token)match(input,KW_RANGE,FOLLOW_KW_RANGE_in_window_value_expression1894);  
					stream_KW_RANGE.add(KW_RANGE108);

					KW_BETWEEN109=(Token)match(input,KW_BETWEEN,FOLLOW_KW_BETWEEN_in_window_value_expression1896);  
					stream_KW_BETWEEN.add(KW_BETWEEN109);

					pushFollow(FOLLOW_window_frame_boundary_in_window_value_expression1900);
					s=window_frame_boundary();
					state._fsp--;

					stream_window_frame_boundary.add(s.getTree());
					KW_AND110=(Token)match(input,KW_AND,FOLLOW_KW_AND_in_window_value_expression1902);  
					stream_KW_AND.add(KW_AND110);

					pushFollow(FOLLOW_window_frame_boundary_in_window_value_expression1906);
					end=window_frame_boundary();
					state._fsp--;

					stream_window_frame_boundary.add(end.getTree());
					// AST REWRITE
					// elements: end, s
					// token labels: 
					// rule labels: retval, s, end
					// 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);
					RewriteRuleSubtreeStream stream_s=new RewriteRuleSubtreeStream(adaptor,"rule s",s!=null?s.getTree():null);
					RewriteRuleSubtreeStream stream_end=new RewriteRuleSubtreeStream(adaptor,"rule end",end!=null?end.getTree():null);

					root_0 = (CommonTree)adaptor.nil();
					// 279:79: -> ^( TOK_WINDOWVALUES $s $end)
					{
						// SelectClauseParser.g:279:82: ^( TOK_WINDOWVALUES $s $end)
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_WINDOWVALUES, "TOK_WINDOWVALUES"), root_1);
						adaptor.addChild(root_1, stream_s.nextTree());
						adaptor.addChild(root_1, stream_end.nextTree());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;

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