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

		CommonTree root_0 = null;

		Token inFmt=null;
		Token outFmt=null;
		Token inDriver=null;
		Token outDriver=null;
		Token storageHandler=null;
		Token KW_STORED609=null;
		Token KW_AS610=null;
		Token KW_SEQUENCEFILE611=null;
		Token KW_STORED612=null;
		Token KW_AS613=null;
		Token KW_TEXTFILE614=null;
		Token KW_STORED615=null;
		Token KW_AS616=null;
		Token KW_RCFILE617=null;
		Token KW_STORED618=null;
		Token KW_AS619=null;
		Token KW_ORCFILE620=null;
		Token KW_STORED621=null;
		Token KW_AS622=null;
		Token KW_INPUTFORMAT623=null;
		Token KW_OUTPUTFORMAT624=null;
		Token KW_INPUTDRIVER625=null;
		Token KW_OUTPUTDRIVER626=null;
		Token KW_STORED627=null;
		Token KW_BY628=null;
		Token KW_WITH629=null;
		Token KW_SERDEPROPERTIES630=null;
		Token KW_STORED631=null;
		Token KW_AS632=null;
		ParserRuleReturnScope serdeprops =null;
		ParserRuleReturnScope genericSpec =null;

		CommonTree inFmt_tree=null;
		CommonTree outFmt_tree=null;
		CommonTree inDriver_tree=null;
		CommonTree outDriver_tree=null;
		CommonTree storageHandler_tree=null;
		CommonTree KW_STORED609_tree=null;
		CommonTree KW_AS610_tree=null;
		CommonTree KW_SEQUENCEFILE611_tree=null;
		CommonTree KW_STORED612_tree=null;
		CommonTree KW_AS613_tree=null;
		CommonTree KW_TEXTFILE614_tree=null;
		CommonTree KW_STORED615_tree=null;
		CommonTree KW_AS616_tree=null;
		CommonTree KW_RCFILE617_tree=null;
		CommonTree KW_STORED618_tree=null;
		CommonTree KW_AS619_tree=null;
		CommonTree KW_ORCFILE620_tree=null;
		CommonTree KW_STORED621_tree=null;
		CommonTree KW_AS622_tree=null;
		CommonTree KW_INPUTFORMAT623_tree=null;
		CommonTree KW_OUTPUTFORMAT624_tree=null;
		CommonTree KW_INPUTDRIVER625_tree=null;
		CommonTree KW_OUTPUTDRIVER626_tree=null;
		CommonTree KW_STORED627_tree=null;
		CommonTree KW_BY628_tree=null;
		CommonTree KW_WITH629_tree=null;
		CommonTree KW_SERDEPROPERTIES630_tree=null;
		CommonTree KW_STORED631_tree=null;
		CommonTree KW_AS632_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_INPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_INPUTDRIVER");
		RewriteRuleTokenStream stream_KW_OUTPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTFORMAT");
		RewriteRuleTokenStream stream_KW_ORCFILE=new RewriteRuleTokenStream(adaptor,"token KW_ORCFILE");
		RewriteRuleTokenStream stream_KW_TEXTFILE=new RewriteRuleTokenStream(adaptor,"token KW_TEXTFILE");
		RewriteRuleTokenStream stream_KW_BY=new RewriteRuleTokenStream(adaptor,"token KW_BY");
		RewriteRuleTokenStream stream_KW_AS=new RewriteRuleTokenStream(adaptor,"token KW_AS");
		RewriteRuleTokenStream stream_KW_RCFILE=new RewriteRuleTokenStream(adaptor,"token KW_RCFILE");
		RewriteRuleTokenStream stream_KW_INPUTFORMAT=new RewriteRuleTokenStream(adaptor,"token KW_INPUTFORMAT");
		RewriteRuleTokenStream stream_KW_STORED=new RewriteRuleTokenStream(adaptor,"token KW_STORED");
		RewriteRuleTokenStream stream_KW_OUTPUTDRIVER=new RewriteRuleTokenStream(adaptor,"token KW_OUTPUTDRIVER");
		RewriteRuleTokenStream stream_KW_SEQUENCEFILE=new RewriteRuleTokenStream(adaptor,"token KW_SEQUENCEFILE");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_SERDEPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_SERDEPROPERTIES");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");
		RewriteRuleSubtreeStream stream_identifier=new RewriteRuleSubtreeStream(adaptor,"rule identifier");

		 msgs.push("table file format specification"); 
		try {
			// HiveParser.g:1613:5: ( KW_STORED KW_AS KW_SEQUENCEFILE -> TOK_TBLSEQUENCEFILE | KW_STORED KW_AS KW_TEXTFILE -> TOK_TBLTEXTFILE | KW_STORED KW_AS KW_RCFILE -> TOK_TBLRCFILE | KW_STORED KW_AS KW_ORCFILE -> TOK_TBLORCFILE | KW_STORED KW_AS KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )? -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? ) | KW_STORED KW_BY storageHandler= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? ) | KW_STORED KW_AS genericSpec= identifier -> ^( TOK_FILEFORMAT_GENERIC $genericSpec) )
			int alt169=7;
			int LA169_0 = input.LA(1);
			if ( (LA169_0==KW_STORED) ) {
				int LA169_1 = input.LA(2);
				if ( (LA169_1==KW_AS) ) {
					switch ( input.LA(3) ) {
					case KW_SEQUENCEFILE:
						{
						alt169=1;
						}
						break;
					case KW_TEXTFILE:
						{
						alt169=2;
						}
						break;
					case KW_RCFILE:
						{
						alt169=3;
						}
						break;
					case KW_ORCFILE:
						{
						alt169=4;
						}
						break;
					case KW_INPUTFORMAT:
						{
						alt169=5;
						}
						break;
					case Identifier:
					case KW_ADD:
					case KW_AFTER:
					case KW_ALTER:
					case KW_ANALYZE:
					case KW_ARCHIVE:
					case KW_ARRAY:
					case KW_AS:
					case KW_ASC:
					case KW_BEFORE:
					case KW_BETWEEN:
					case KW_BIGINT:
					case KW_BINARY:
					case KW_BOOLEAN:
					case KW_BOTH:
					case KW_BUCKET:
					case KW_BUCKETS:
					case KW_BY:
					case KW_CASCADE:
					case KW_CHANGE:
					case KW_CLUSTER:
					case KW_CLUSTERED:
					case KW_CLUSTERSTATUS:
					case KW_COLLECTION:
					case KW_COLUMNS:
					case KW_COMMENT:
					case KW_COMPUTE:
					case KW_CONCATENATE:
					case KW_CONTINUE:
					case KW_CREATE:
					case KW_CUBE:
					case KW_CURSOR:
					case KW_DATA:
					case KW_DATABASES:
					case KW_DATE:
					case KW_DATETIME:
					case KW_DBPROPERTIES:
					case KW_DECIMAL:
					case KW_DEFERRED:
					case KW_DELETE:
					case KW_DELIMITED:
					case KW_DEPENDENCY:
					case KW_DESC:
					case KW_DESCRIBE:
					case KW_DIRECTORIES:
					case KW_DIRECTORY:
					case KW_DISABLE:
					case KW_DISTRIBUTE:
					case KW_DOUBLE:
					case KW_DROP:
					case KW_ELEM_TYPE:
					case KW_ENABLE:
					case KW_ESCAPED:
					case KW_EXCLUSIVE:
					case KW_EXISTS:
					case KW_EXPLAIN:
					case KW_EXPORT:
					case KW_EXTERNAL:
					case KW_FALSE:
					case KW_FETCH:
					case KW_FIELDS:
					case KW_FILEFORMAT:
					case KW_FIRST:
					case KW_FLOAT:
					case KW_FOR:
					case KW_FORMAT:
					case KW_FORMATTED:
					case KW_FULL:
					case KW_FUNCTIONS:
					case KW_GRANT:
					case KW_GROUP:
					case KW_GROUPING:
					case KW_HOLD_DDLTIME:
					case KW_IDXPROPERTIES:
					case KW_IGNORE:
					case KW_IMPORT:
					case KW_IN:
					case KW_INCRE:
					case KW_INDEX:
					case KW_INDEXES:
					case KW_INNER:
					case KW_INPATH:
					case KW_INPUTDRIVER:
					case KW_INSERT:
					case KW_INT:
					case KW_INTERSECT:
					case KW_INTO:
					case KW_IS:
					case KW_ITEMS:
					case KW_KEYS:
					case KW_KEY_TYPE:
					case KW_LATERAL:
					case KW_LEFT:
					case KW_LIKE:
					case KW_LIMIT:
					case KW_LINES:
					case KW_LOAD:
					case KW_LOCAL:
					case KW_LOCATION:
					case KW_LOCK:
					case KW_LOCKS:
					case KW_LOGICAL:
					case KW_LONG:
					case KW_MAPJOIN:
					case KW_MATERIALIZED:
					case KW_MINUS:
					case KW_MSCK:
					case KW_NOSCAN:
					case KW_NO_DROP:
					case KW_NULL:
					case KW_OF:
					case KW_OFFLINE:
					case KW_OPTION:
					case KW_ORDER:
					case KW_OUT:
					case KW_OUTER:
					case KW_OUTPUTDRIVER:
					case KW_OUTPUTFORMAT:
					case KW_OVERWRITE:
					case KW_PARTITION:
					case KW_PARTITIONED:
					case KW_PARTITIONS:
					case KW_PERCENT:
					case KW_PLUS:
					case KW_PRETTY:
					case KW_PROCEDURE:
					case KW_PROTECTION:
					case KW_PURGE:
					case KW_RANGE:
					case KW_READ:
					case KW_READONLY:
					case KW_READS:
					case KW_REBUILD:
					case KW_RECORDREADER:
					case KW_RECORDWRITER:
					case KW_REGEXP:
					case KW_RENAME:
					case KW_REPAIR:
					case KW_REPLACE:
					case KW_RESTRICT:
					case KW_REVOKE:
					case KW_RIGHT:
					case KW_RLIKE:
					case KW_ROLE:
					case KW_ROLLUP:
					case KW_ROW:
					case KW_ROWS:
					case KW_SCHEMA:
					case KW_SCHEMAS:
					case KW_SEMI:
					case KW_SERDE:
					case KW_SERDEPROPERTIES:
					case KW_SET:
					case KW_SETS:
					case KW_SHARED:
					case KW_SHOW:
					case KW_SHOW_DATABASE:
					case KW_SKEWED:
					case KW_SMALLINT:
					case KW_SORT:
					case KW_SORTED:
					case KW_SSL:
					case KW_STATISTICS:
					case KW_STORED:
					case KW_STREAMTABLE:
					case KW_STRING:
					case KW_STRUCT:
					case KW_TABLE:
					case KW_TABLES:
					case KW_TBLPROPERTIES:
					case KW_TEMPORARY:
					case KW_TERMINATED:
					case KW_TIMESTAMP:
					case KW_TINYINT:
					case KW_TO:
					case KW_TOUCH:
					case KW_TRIGGER:
					case KW_TRUE:
					case KW_TRUNCATE:
					case KW_UNARCHIVE:
					case KW_UNDO:
					case KW_UNION:
					case KW_UNIONTYPE:
					case KW_UNLOCK:
					case KW_UNSET:
					case KW_UNSIGNED:
					case KW_UPDATE:
					case KW_USE:
					case KW_USER:
					case KW_USING:
					case KW_UTC:
					case KW_UTCTIMESTAMP:
					case KW_VALUE_TYPE:
					case KW_VIEW:
					case KW_WHILE:
					case KW_WITH:
						{
						alt169=7;
						}
						break;
					default:
						int nvaeMark = input.mark();
						try {
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
								input.consume();
							}
							NoViableAltException nvae =
								new NoViableAltException("", 169, 2, input);
							throw nvae;
						} finally {
							input.rewind(nvaeMark);
						}
					}
				}
				else if ( (LA169_1==KW_BY) ) {
					alt169=6;
				}

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

			}

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

			switch (alt169) {
				case 1 :
					// HiveParser.g:1614:7: KW_STORED KW_AS KW_SEQUENCEFILE
					{
					KW_STORED609=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9505);  
					stream_KW_STORED.add(KW_STORED609);

					KW_AS610=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9507);  
					stream_KW_AS.add(KW_AS610);

					KW_SEQUENCEFILE611=(Token)match(input,KW_SEQUENCEFILE,FOLLOW_KW_SEQUENCEFILE_in_tableFileFormat9509);  
					stream_KW_SEQUENCEFILE.add(KW_SEQUENCEFILE611);

					// AST REWRITE
					// elements: 
					// 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();
					// 1614:40: -> TOK_TBLSEQUENCEFILE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TBLSEQUENCEFILE, "TOK_TBLSEQUENCEFILE"));
					}


					retval.tree = root_0;

					}
					break;
				case 2 :
					// HiveParser.g:1615:9: KW_STORED KW_AS KW_TEXTFILE
					{
					KW_STORED612=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9524);  
					stream_KW_STORED.add(KW_STORED612);

					KW_AS613=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9526);  
					stream_KW_AS.add(KW_AS613);

					KW_TEXTFILE614=(Token)match(input,KW_TEXTFILE,FOLLOW_KW_TEXTFILE_in_tableFileFormat9528);  
					stream_KW_TEXTFILE.add(KW_TEXTFILE614);

					// AST REWRITE
					// elements: 
					// 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();
					// 1615:38: -> TOK_TBLTEXTFILE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TBLTEXTFILE, "TOK_TBLTEXTFILE"));
					}


					retval.tree = root_0;

					}
					break;
				case 3 :
					// HiveParser.g:1616:9: KW_STORED KW_AS KW_RCFILE
					{
					KW_STORED615=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9543);  
					stream_KW_STORED.add(KW_STORED615);

					KW_AS616=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9545);  
					stream_KW_AS.add(KW_AS616);

					KW_RCFILE617=(Token)match(input,KW_RCFILE,FOLLOW_KW_RCFILE_in_tableFileFormat9547);  
					stream_KW_RCFILE.add(KW_RCFILE617);

					// AST REWRITE
					// elements: 
					// 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();
					// 1616:36: -> TOK_TBLRCFILE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TBLRCFILE, "TOK_TBLRCFILE"));
					}


					retval.tree = root_0;

					}
					break;
				case 4 :
					// HiveParser.g:1617:9: KW_STORED KW_AS KW_ORCFILE
					{
					KW_STORED618=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9562);  
					stream_KW_STORED.add(KW_STORED618);

					KW_AS619=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9564);  
					stream_KW_AS.add(KW_AS619);

					KW_ORCFILE620=(Token)match(input,KW_ORCFILE,FOLLOW_KW_ORCFILE_in_tableFileFormat9566);  
					stream_KW_ORCFILE.add(KW_ORCFILE620);

					// AST REWRITE
					// elements: 
					// 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();
					// 1617:36: -> TOK_TBLORCFILE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TBLORCFILE, "TOK_TBLORCFILE"));
					}


					retval.tree = root_0;

					}
					break;
				case 5 :
					// HiveParser.g:1618:9: KW_STORED KW_AS KW_INPUTFORMAT inFmt= StringLiteral KW_OUTPUTFORMAT outFmt= StringLiteral ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					{
					KW_STORED621=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9580);  
					stream_KW_STORED.add(KW_STORED621);

					KW_AS622=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9582);  
					stream_KW_AS.add(KW_AS622);

					KW_INPUTFORMAT623=(Token)match(input,KW_INPUTFORMAT,FOLLOW_KW_INPUTFORMAT_in_tableFileFormat9584);  
					stream_KW_INPUTFORMAT.add(KW_INPUTFORMAT623);

					inFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat9588);  
					stream_StringLiteral.add(inFmt);

					KW_OUTPUTFORMAT624=(Token)match(input,KW_OUTPUTFORMAT,FOLLOW_KW_OUTPUTFORMAT_in_tableFileFormat9590);  
					stream_KW_OUTPUTFORMAT.add(KW_OUTPUTFORMAT624);

					outFmt=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat9594);  
					stream_StringLiteral.add(outFmt);

					// HiveParser.g:1618:97: ( KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral )?
					int alt167=2;
					int LA167_0 = input.LA(1);
					if ( (LA167_0==KW_INPUTDRIVER) ) {
						alt167=1;
					}
					switch (alt167) {
						case 1 :
							// HiveParser.g:1618:98: KW_INPUTDRIVER inDriver= StringLiteral KW_OUTPUTDRIVER outDriver= StringLiteral
							{
							KW_INPUTDRIVER625=(Token)match(input,KW_INPUTDRIVER,FOLLOW_KW_INPUTDRIVER_in_tableFileFormat9597);  
							stream_KW_INPUTDRIVER.add(KW_INPUTDRIVER625);

							inDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat9601);  
							stream_StringLiteral.add(inDriver);

							KW_OUTPUTDRIVER626=(Token)match(input,KW_OUTPUTDRIVER,FOLLOW_KW_OUTPUTDRIVER_in_tableFileFormat9603);  
							stream_KW_OUTPUTDRIVER.add(KW_OUTPUTDRIVER626);

							outDriver=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat9607);  
							stream_StringLiteral.add(outDriver);

							}
							break;

					}

					// AST REWRITE
					// elements: inDriver, outDriver, inFmt, outFmt
					// token labels: outDriver, outFmt, inDriver, inFmt
					// rule labels: retval
					// token list labels: 
					// rule list labels: 
					// wildcard labels: 
					retval.tree = root_0;
					RewriteRuleTokenStream stream_outDriver=new RewriteRuleTokenStream(adaptor,"token outDriver",outDriver);
					RewriteRuleTokenStream stream_outFmt=new RewriteRuleTokenStream(adaptor,"token outFmt",outFmt);
					RewriteRuleTokenStream stream_inDriver=new RewriteRuleTokenStream(adaptor,"token inDriver",inDriver);
					RewriteRuleTokenStream stream_inFmt=new RewriteRuleTokenStream(adaptor,"token inFmt",inFmt);
					RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

					root_0 = (CommonTree)adaptor.nil();
					// 1619:7: -> ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? )
					{
						// HiveParser.g:1619:10: ^( TOK_TABLEFILEFORMAT $inFmt $outFmt ( $inDriver)? ( $outDriver)? )
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_TABLEFILEFORMAT, "TOK_TABLEFILEFORMAT"), root_1);
						adaptor.addChild(root_1, stream_inFmt.nextNode());
						adaptor.addChild(root_1, stream_outFmt.nextNode());
						// HiveParser.g:1619:48: ( $inDriver)?
						if ( stream_inDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_inDriver.nextNode());
						}
						stream_inDriver.reset();

						// HiveParser.g:1619:59: ( $outDriver)?
						if ( stream_outDriver.hasNext() ) {
							adaptor.addChild(root_1, stream_outDriver.nextNode());
						}
						stream_outDriver.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;
				case 6 :
					// HiveParser.g:1620:9: KW_STORED KW_BY storageHandler= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
					{
					KW_STORED627=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9645);  
					stream_KW_STORED.add(KW_STORED627);

					KW_BY628=(Token)match(input,KW_BY,FOLLOW_KW_BY_in_tableFileFormat9647);  
					stream_KW_BY.add(KW_BY628);

					storageHandler=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_tableFileFormat9651);  
					stream_StringLiteral.add(storageHandler);

					// HiveParser.g:1621:10: ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
					int alt168=2;
					int LA168_0 = input.LA(1);
					if ( (LA168_0==KW_WITH) ) {
						alt168=1;
					}
					switch (alt168) {
						case 1 :
							// HiveParser.g:1621:11: KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties
							{
							KW_WITH629=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_tableFileFormat9663);  
							stream_KW_WITH.add(KW_WITH629);

							KW_SERDEPROPERTIES630=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_tableFileFormat9665);  
							stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES630);

							pushFollow(FOLLOW_tableProperties_in_tableFileFormat9669);
							serdeprops=tableProperties();
							state._fsp--;

							stream_tableProperties.add(serdeprops.getTree());
							}
							break;

					}

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

					root_0 = (CommonTree)adaptor.nil();
					// 1622:7: -> ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? )
					{
						// HiveParser.g:1622:10: ^( TOK_STORAGEHANDLER $storageHandler ( $serdeprops)? )
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_STORAGEHANDLER, "TOK_STORAGEHANDLER"), root_1);
						adaptor.addChild(root_1, stream_storageHandler.nextNode());
						// HiveParser.g:1622:48: ( $serdeprops)?
						if ( stream_serdeprops.hasNext() ) {
							adaptor.addChild(root_1, stream_serdeprops.nextTree());
						}
						stream_serdeprops.reset();

						adaptor.addChild(root_0, root_1);
						}

					}


					retval.tree = root_0;

					}
					break;
				case 7 :
					// HiveParser.g:1623:9: KW_STORED KW_AS genericSpec= identifier
					{
					KW_STORED631=(Token)match(input,KW_STORED,FOLLOW_KW_STORED_in_tableFileFormat9700);  
					stream_KW_STORED.add(KW_STORED631);

					KW_AS632=(Token)match(input,KW_AS,FOLLOW_KW_AS_in_tableFileFormat9702);  
					stream_KW_AS.add(KW_AS632);

					pushFollow(FOLLOW_identifier_in_tableFileFormat9706);
					genericSpec=identifier();
					state._fsp--;

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

					root_0 = (CommonTree)adaptor.nil();
					// 1624:7: -> ^( TOK_FILEFORMAT_GENERIC $genericSpec)
					{
						// HiveParser.g:1624:10: ^( TOK_FILEFORMAT_GENERIC $genericSpec)
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_FILEFORMAT_GENERIC, "TOK_FILEFORMAT_GENERIC"), root_1);
						adaptor.addChild(root_1, stream_genericSpec.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);

			 msgs.pop(); 
		}

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

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