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

		CommonTree root_0 = null;

		Token KW_LOCAL774=null;
		Token KW_DIRECTORY775=null;
		Token StringLiteral776=null;
		Token KW_DIRECTORY779=null;
		Token StringLiteral780=null;
		Token KW_TABLE781=null;
		ParserRuleReturnScope tableRowFormat777 =null;
		ParserRuleReturnScope tableFileFormat778 =null;
		ParserRuleReturnScope tableOrPartition782 =null;

		CommonTree KW_LOCAL774_tree=null;
		CommonTree KW_DIRECTORY775_tree=null;
		CommonTree StringLiteral776_tree=null;
		CommonTree KW_DIRECTORY779_tree=null;
		CommonTree StringLiteral780_tree=null;
		CommonTree KW_TABLE781_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_DIRECTORY=new RewriteRuleTokenStream(adaptor,"token KW_DIRECTORY");
		RewriteRuleTokenStream stream_KW_LOCAL=new RewriteRuleTokenStream(adaptor,"token KW_LOCAL");
		RewriteRuleTokenStream stream_KW_TABLE=new RewriteRuleTokenStream(adaptor,"token KW_TABLE");
		RewriteRuleSubtreeStream stream_tableOrPartition=new RewriteRuleSubtreeStream(adaptor,"rule tableOrPartition");
		RewriteRuleSubtreeStream stream_tableRowFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableRowFormat");
		RewriteRuleSubtreeStream stream_tableFileFormat=new RewriteRuleSubtreeStream(adaptor,"rule tableFileFormat");

		 msgs.push("destination specification"); 
		try {
			// HiveParser.g:1916:4: ( KW_LOCAL KW_DIRECTORY StringLiteral ( tableRowFormat )? ( tableFileFormat )? -> ^( TOK_LOCAL_DIR StringLiteral ( tableRowFormat )? ( tableFileFormat )? ) | KW_DIRECTORY StringLiteral -> ^( TOK_DIR StringLiteral ) | KW_TABLE tableOrPartition -> tableOrPartition )
			int alt234=3;
			switch ( input.LA(1) ) {
			case KW_LOCAL:
				{
				alt234=1;
				}
				break;
			case KW_DIRECTORY:
				{
				alt234=2;
				}
				break;
			case KW_TABLE:
				{
				alt234=3;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 234, 0, input);
				throw nvae;
			}
			switch (alt234) {
				case 1 :
					// HiveParser.g:1917:6: KW_LOCAL KW_DIRECTORY StringLiteral ( tableRowFormat )? ( tableFileFormat )?
					{
					KW_LOCAL774=(Token)match(input,KW_LOCAL,FOLLOW_KW_LOCAL_in_destination12219);  
					stream_KW_LOCAL.add(KW_LOCAL774);

					KW_DIRECTORY775=(Token)match(input,KW_DIRECTORY,FOLLOW_KW_DIRECTORY_in_destination12221);  
					stream_KW_DIRECTORY.add(KW_DIRECTORY775);

					StringLiteral776=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_destination12223);  
					stream_StringLiteral.add(StringLiteral776);

					// HiveParser.g:1917:42: ( tableRowFormat )?
					int alt232=2;
					int LA232_0 = input.LA(1);
					if ( (LA232_0==KW_ROW) ) {
						alt232=1;
					}
					switch (alt232) {
						case 1 :
							// HiveParser.g:1917:42: tableRowFormat
							{
							pushFollow(FOLLOW_tableRowFormat_in_destination12225);
							tableRowFormat777=tableRowFormat();
							state._fsp--;

							stream_tableRowFormat.add(tableRowFormat777.getTree());
							}
							break;

					}

					// HiveParser.g:1917:58: ( tableFileFormat )?
					int alt233=2;
					int LA233_0 = input.LA(1);
					if ( (LA233_0==KW_STORED) ) {
						alt233=1;
					}
					switch (alt233) {
						case 1 :
							// HiveParser.g:1917:58: tableFileFormat
							{
							pushFollow(FOLLOW_tableFileFormat_in_destination12228);
							tableFileFormat778=tableFileFormat();
							state._fsp--;

							stream_tableFileFormat.add(tableFileFormat778.getTree());
							}
							break;

					}

					// AST REWRITE
					// elements: tableRowFormat, tableFileFormat, StringLiteral
					// 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();
					// 1917:75: -> ^( TOK_LOCAL_DIR StringLiteral ( tableRowFormat )? ( tableFileFormat )? )
					{
						// HiveParser.g:1917:78: ^( TOK_LOCAL_DIR StringLiteral ( tableRowFormat )? ( tableFileFormat )? )
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_LOCAL_DIR, "TOK_LOCAL_DIR"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						// HiveParser.g:1917:108: ( tableRowFormat )?
						if ( stream_tableRowFormat.hasNext() ) {
							adaptor.addChild(root_1, stream_tableRowFormat.nextTree());
						}
						stream_tableRowFormat.reset();

						// HiveParser.g:1917:124: ( tableFileFormat )?
						if ( stream_tableFileFormat.hasNext() ) {
							adaptor.addChild(root_1, stream_tableFileFormat.nextTree());
						}
						stream_tableFileFormat.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;
				case 2 :
					// HiveParser.g:1918:6: KW_DIRECTORY StringLiteral
					{
					KW_DIRECTORY779=(Token)match(input,KW_DIRECTORY,FOLLOW_KW_DIRECTORY_in_destination12250);  
					stream_KW_DIRECTORY.add(KW_DIRECTORY779);

					StringLiteral780=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_destination12252);  
					stream_StringLiteral.add(StringLiteral780);

					// AST REWRITE
					// elements: StringLiteral
					// 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();
					// 1918:33: -> ^( TOK_DIR StringLiteral )
					{
						// HiveParser.g:1918:36: ^( TOK_DIR StringLiteral )
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_DIR, "TOK_DIR"), root_1);
						adaptor.addChild(root_1, stream_StringLiteral.nextNode());
						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;
				case 3 :
					// HiveParser.g:1919:6: KW_TABLE tableOrPartition
					{
					KW_TABLE781=(Token)match(input,KW_TABLE,FOLLOW_KW_TABLE_in_destination12267);  
					stream_KW_TABLE.add(KW_TABLE781);

					pushFollow(FOLLOW_tableOrPartition_in_destination12269);
					tableOrPartition782=tableOrPartition();
					state._fsp--;

					stream_tableOrPartition.add(tableOrPartition782.getTree());
					// AST REWRITE
					// elements: tableOrPartition
					// 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();
					// 1919:32: -> tableOrPartition
					{
						adaptor.addChild(root_0, stream_tableOrPartition.nextTree());
					}


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

			 msgs.pop(); 
		}

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

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