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

		CommonTree root_0 = null;

		Token name=null;
		Token KW_ROW567=null;
		Token KW_FORMAT568=null;
		Token KW_SERDE569=null;
		Token KW_WITH570=null;
		Token KW_SERDEPROPERTIES571=null;
		ParserRuleReturnScope serdeprops =null;

		CommonTree name_tree=null;
		CommonTree KW_ROW567_tree=null;
		CommonTree KW_FORMAT568_tree=null;
		CommonTree KW_SERDE569_tree=null;
		CommonTree KW_WITH570_tree=null;
		CommonTree KW_SERDEPROPERTIES571_tree=null;
		RewriteRuleTokenStream stream_StringLiteral=new RewriteRuleTokenStream(adaptor,"token StringLiteral");
		RewriteRuleTokenStream stream_KW_ROW=new RewriteRuleTokenStream(adaptor,"token KW_ROW");
		RewriteRuleTokenStream stream_KW_FORMAT=new RewriteRuleTokenStream(adaptor,"token KW_FORMAT");
		RewriteRuleTokenStream stream_KW_WITH=new RewriteRuleTokenStream(adaptor,"token KW_WITH");
		RewriteRuleTokenStream stream_KW_SERDE=new RewriteRuleTokenStream(adaptor,"token KW_SERDE");
		RewriteRuleTokenStream stream_KW_SERDEPROPERTIES=new RewriteRuleTokenStream(adaptor,"token KW_SERDEPROPERTIES");
		RewriteRuleSubtreeStream stream_tableProperties=new RewriteRuleSubtreeStream(adaptor,"rule tableProperties");

		 msgs.push("serde format specification"); 
		try {
			// HiveParser.g:1519:5: ( KW_ROW KW_FORMAT KW_SERDE name= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )? -> ^( TOK_SERDENAME $name ( $serdeprops)? ) )
			// HiveParser.g:1519:7: KW_ROW KW_FORMAT KW_SERDE name= StringLiteral ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
			{
			KW_ROW567=(Token)match(input,KW_ROW,FOLLOW_KW_ROW_in_rowFormatSerde8804);  
			stream_KW_ROW.add(KW_ROW567);

			KW_FORMAT568=(Token)match(input,KW_FORMAT,FOLLOW_KW_FORMAT_in_rowFormatSerde8806);  
			stream_KW_FORMAT.add(KW_FORMAT568);

			KW_SERDE569=(Token)match(input,KW_SERDE,FOLLOW_KW_SERDE_in_rowFormatSerde8808);  
			stream_KW_SERDE.add(KW_SERDE569);

			name=(Token)match(input,StringLiteral,FOLLOW_StringLiteral_in_rowFormatSerde8812);  
			stream_StringLiteral.add(name);

			// HiveParser.g:1519:52: ( KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties )?
			int alt157=2;
			int LA157_0 = input.LA(1);
			if ( (LA157_0==KW_WITH) ) {
				alt157=1;
			}
			switch (alt157) {
				case 1 :
					// HiveParser.g:1519:53: KW_WITH KW_SERDEPROPERTIES serdeprops= tableProperties
					{
					KW_WITH570=(Token)match(input,KW_WITH,FOLLOW_KW_WITH_in_rowFormatSerde8815);  
					stream_KW_WITH.add(KW_WITH570);

					KW_SERDEPROPERTIES571=(Token)match(input,KW_SERDEPROPERTIES,FOLLOW_KW_SERDEPROPERTIES_in_rowFormatSerde8817);  
					stream_KW_SERDEPROPERTIES.add(KW_SERDEPROPERTIES571);

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

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

			}

			// AST REWRITE
			// elements: serdeprops, name
			// token labels: name
			// rule labels: serdeprops, retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			retval.tree = root_0;
			RewriteRuleTokenStream stream_name=new RewriteRuleTokenStream(adaptor,"token name",name);
			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();
			// 1520:5: -> ^( TOK_SERDENAME $name ( $serdeprops)? )
			{
				// HiveParser.g:1520:8: ^( TOK_SERDENAME $name ( $serdeprops)? )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_SERDENAME, "TOK_SERDENAME"), root_1);
				adaptor.addChild(root_1, stream_name.nextNode());
				// HiveParser.g:1520:31: ( $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;

			}

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