public final HiveParser.limitClause_return limitClause() throws RecognitionException {
		HiveParser.limitClause_return retval = new HiveParser.limitClause_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token num=null;
		Token KW_LIMIT783=null;

		CommonTree num_tree=null;
		CommonTree KW_LIMIT783_tree=null;
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_LIMIT=new RewriteRuleTokenStream(adaptor,"token KW_LIMIT");

		 msgs.push("limit clause"); 
		try {
			// HiveParser.g:1925:4: ( KW_LIMIT num= Number -> ^( TOK_LIMIT $num) )
			// HiveParser.g:1926:4: KW_LIMIT num= Number
			{
			KW_LIMIT783=(Token)match(input,KW_LIMIT,FOLLOW_KW_LIMIT_in_limitClause12301);  
			stream_KW_LIMIT.add(KW_LIMIT783);

			num=(Token)match(input,Number,FOLLOW_Number_in_limitClause12305);  
			stream_Number.add(num);

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

			root_0 = (CommonTree)adaptor.nil();
			// 1926:24: -> ^( TOK_LIMIT $num)
			{
				// HiveParser.g:1926:27: ^( TOK_LIMIT $num)
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_LIMIT, "TOK_LIMIT"), root_1);
				adaptor.addChild(root_1, stream_num.nextNode());
				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);

			 msgs.pop(); 
		}

		catch (RecognitionException e) {
		 reportError(e);
		  throw e;
		}

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