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

		CommonTree root_0 = null;

		Token islocal=null;
		Token path=null;
		Token isoverwrite=null;
		Token KW_LOAD12=null;
		Token KW_DATA13=null;
		Token KW_INPATH14=null;
		Token KW_INTO15=null;
		Token KW_TABLE16=null;
		ParserRuleReturnScope tab =null;

		CommonTree islocal_tree=null;
		CommonTree path_tree=null;
		CommonTree isoverwrite_tree=null;
		CommonTree KW_LOAD12_tree=null;
		CommonTree KW_DATA13_tree=null;
		CommonTree KW_INPATH14_tree=null;
		CommonTree KW_INTO15_tree=null;
		CommonTree KW_TABLE16_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_INPATH=new RewriteRuleTokenStream(adaptor,"token KW_INPATH");
		RewriteRuleTokenStream stream_KW_INTO=new RewriteRuleTokenStream(adaptor,"token KW_INTO");
		RewriteRuleTokenStream stream_KW_LOCAL=new RewriteRuleTokenStream(adaptor,"token KW_LOCAL");
		RewriteRuleTokenStream stream_KW_OVERWRITE=new RewriteRuleTokenStream(adaptor,"token KW_OVERWRITE");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleTokenStream stream_KW_LOAD=new RewriteRuleTokenStream(adaptor,"token KW_LOAD");
		RewriteRuleTokenStream stream_KW_DATA=new RewriteRuleTokenStream(adaptor,"token KW_DATA");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");

		 msgs.push("load statement"); 
		try {
			// HiveParser.g:589:5: ( KW_LOAD KW_DATA (islocal= KW_LOCAL )? KW_INPATH (path= StringLiteral ) (isoverwrite= KW_OVERWRITE )? KW_INTO KW_TABLE (tab= tableOrPartition ) -> ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? ) )
			// HiveParser.g:589:7: KW_LOAD KW_DATA (islocal= KW_LOCAL )? KW_INPATH (path= StringLiteral ) (isoverwrite= KW_OVERWRITE )? KW_INTO KW_TABLE (tab= tableOrPartition )
			{
			KW_LOAD12=(Token)match(input,KW_LOAD,FOLLOW_KW_LOAD_in_loadStatement1077);  
			stream_KW_LOAD.add(KW_LOAD12);

			KW_DATA13=(Token)match(input,KW_DATA,FOLLOW_KW_DATA_in_loadStatement1079);  
			stream_KW_DATA.add(KW_DATA13);

			// HiveParser.g:589:23: (islocal= KW_LOCAL )?
			int alt4=2;
			int LA4_0 = input.LA(1);
			if ( (LA4_0==KW_LOCAL) ) {
				alt4=1;
			}
			switch (alt4) {
				case 1 :
					// HiveParser.g:589:24: islocal= KW_LOCAL
					{
					islocal=(Token)match(input,KW_LOCAL,FOLLOW_KW_LOCAL_in_loadStatement1084);  
					stream_KW_LOCAL.add(islocal);

					}
					break;

			}

			KW_INPATH14=(Token)match(input,KW_INPATH,FOLLOW_KW_INPATH_in_loadStatement1088);  
			stream_KW_INPATH.add(KW_INPATH14);

			// HiveParser.g:589:53: (path= StringLiteral )
			// HiveParser.g:589:54: path= StringLiteral
			{
			path=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_loadStatement1093);  
			stream_StringLiteral.add(path);

			}

			// HiveParser.g:589:74: (isoverwrite= KW_OVERWRITE )?
			int alt5=2;
			int LA5_0 = input.LA(1);
			if ( (LA5_0==KW_OVERWRITE) ) {
				alt5=1;
			}
			switch (alt5) {
				case 1 :
					// HiveParser.g:589:75: isoverwrite= KW_OVERWRITE
					{
					isoverwrite=(Token)match(input,KW_OVERWRITE,FOLLOW_KW_OVERWRITE_in_loadStatement1099);  
					stream_KW_OVERWRITE.add(isoverwrite);

					}
					break;

			}

			KW_INTO15=(Token)match(input,KW_INTO,FOLLOW_KW_INTO_in_loadStatement1103);  
			stream_KW_INTO.add(KW_INTO15);

			KW_TABLE16=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_loadStatement1105);  
			stream_KW_TABLE.add(KW_TABLE16);

			// HiveParser.g:589:119: (tab= tableOrPartition )
			// HiveParser.g:589:120: tab= tableOrPartition
			{
			pushFollow(FOLLOW_tableOrPartition_in_loadStatement1110);
			tab=tableOrPartition();
			state._fsp--;

			stream_tableOrPartition.add(tab.getTree());
			}

			// AST REWRITE
			// elements: islocal, path, isoverwrite, tab
			// token labels: islocal, isoverwrite, path
			// rule labels: retval, tab
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			retval.tree = root_0;
			RewriteRuleTokenStream stream_islocal=new RewriteRuleTokenStream(adaptor,"token islocal",islocal);
			RewriteRuleTokenStream stream_isoverwrite=new RewriteRuleTokenStream(adaptor,"token isoverwrite",isoverwrite);
			RewriteRuleTokenStream stream_path=new RewriteRuleTokenStream(adaptor,"token path",path);
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);
			RewriteRuleSubtreeStream stream_tab=new RewriteRuleSubtreeStream(adaptor,"rule tab",tab!=null?tab.getTree():null);

			root_0 = (CommonTree)adaptor.nil();
			// 590:5: -> ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? )
			{
				// HiveParser.g:590:8: ^( TOK_LOAD $path $tab ( $islocal)? ( $isoverwrite)? )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_LOAD, "TOK_LOAD"), root_1);
				adaptor.addChild(root_1, stream_path.nextNode());
				adaptor.addChild(root_1, stream_tab.nextTree());
				// HiveParser.g:590:31: ( $islocal)?
				if ( stream_islocal.hasNext() ) {
					adaptor.addChild(root_1, stream_islocal.nextNode());
				}
				stream_islocal.reset();

				// HiveParser.g:590:41: ( $isoverwrite)?
				if ( stream_isoverwrite.hasNext() ) {
					adaptor.addChild(root_1, stream_isoverwrite.nextNode());
				}
				stream_isoverwrite.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);

			 msgs.pop(); 
		}

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

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