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

		CommonTree root_0 = null;

		Token KW_CREATE501=null;
		Token KW_TEMPORARY502=null;
		Token KW_MACRO503=null;
		Token Identifier504=null;
		Token LPAREN505=null;
		Token RPAREN507=null;
		ParserRuleReturnScope columnNameTypeList506 =null;
		ParserRuleReturnScope expression508 =null;

		CommonTree KW_CREATE501_tree=null;
		CommonTree KW_TEMPORARY502_tree=null;
		CommonTree KW_MACRO503_tree=null;
		CommonTree Identifier504_tree=null;
		CommonTree LPAREN505_tree=null;
		CommonTree RPAREN507_tree=null;
		RewriteRuleTokenStream stream_KW_CREATE=new RewriteRuleTokenStream(adaptor,"token KW_CREATE");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_TEMPORARY=new RewriteRuleTokenStream(adaptor,"token KW_TEMPORARY");
		RewriteRuleTokenStream stream_Identifier=new RewriteRuleTokenStream(adaptor,"token Identifier");
		RewriteRuleTokenStream stream_KW_MACRO=new RewriteRuleTokenStream(adaptor,"token KW_MACRO");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,"rule expression");
		RewriteRuleSubtreeStream stream_columnNameTypeList=new RewriteRuleSubtreeStream(adaptor,"rule columnNameTypeList");

		 msgs.push("create macro statement"); 
		try {
			// HiveParser.g:1412:5: ( KW_CREATE KW_TEMPORARY KW_MACRO Identifier LPAREN ( columnNameTypeList )? RPAREN expression -> ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression ) )
			// HiveParser.g:1412:7: KW_CREATE KW_TEMPORARY KW_MACRO Identifier LPAREN ( columnNameTypeList )? RPAREN expression
			{
			KW_CREATE501=(Token)match(input,KW_CREATE,FOLLOW_KW_CREATE_in_createMacroStatement7943);  
			stream_KW_CREATE.add(KW_CREATE501);

			KW_TEMPORARY502=(Token)match(input,KW_TEMPORARY,FOLLOW_KW_TEMPORARY_in_createMacroStatement7945);  
			stream_KW_TEMPORARY.add(KW_TEMPORARY502);

			KW_MACRO503=(Token)match(input,KW_MACRO,FOLLOW_KW_MACRO_in_createMacroStatement7947);  
			stream_KW_MACRO.add(KW_MACRO503);

			Identifier504=(Token)match(input,Identifier,FOLLOW_Identifier_in_createMacroStatement7949);  
			stream_Identifier.add(Identifier504);

			LPAREN505=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_createMacroStatement7957);  
			stream_LPAREN.add(LPAREN505);

			// HiveParser.g:1413:14: ( columnNameTypeList )?
			int alt142=2;
			int LA142_0 = input.LA(1);
			if ( (LA142_0==Identifier||(LA142_0 >= KW_ADD && LA142_0 <= KW_AFTER)||(LA142_0 >= KW_ALTER && LA142_0 <= KW_ANALYZE)||(LA142_0 >= KW_ARCHIVE && LA142_0 <= KW_CASCADE)||(LA142_0 >= KW_CHANGE && LA142_0 <= KW_COLLECTION)||(LA142_0 >= KW_COLUMNS && LA142_0 <= KW_CONCATENATE)||(LA142_0 >= KW_CONTINUE && LA142_0 <= KW_CREATE)||LA142_0==KW_CUBE||(LA142_0 >= KW_CURSOR && LA142_0 <= KW_DATA)||(LA142_0 >= KW_DATABASES && LA142_0 <= KW_DATETIME)||(LA142_0 >= KW_DBPROPERTIES && LA142_0 <= KW_DISABLE)||(LA142_0 >= KW_DISTRIBUTE && LA142_0 <= KW_ELEM_TYPE)||LA142_0==KW_ENABLE||LA142_0==KW_ESCAPED||(LA142_0 >= KW_EXCLUSIVE && LA142_0 <= KW_EXPORT)||(LA142_0 >= KW_EXTERNAL && LA142_0 <= KW_FLOAT)||(LA142_0 >= KW_FOR && LA142_0 <= KW_FORMATTED)||LA142_0==KW_FULL||(LA142_0 >= KW_FUNCTIONS && LA142_0 <= KW_GROUPING)||LA142_0==KW_HOLD_DDLTIME||LA142_0==KW_IDXPROPERTIES||(LA142_0 >= KW_IGNORE && LA142_0 <= KW_INTERSECT)||(LA142_0 >= KW_INTO && LA142_0 <= KW_ITEMS)||(LA142_0 >= KW_KEYS && LA142_0 <= KW_LEFT)||(LA142_0 >= KW_LIKE && LA142_0 <= KW_LONG)||(LA142_0 >= KW_MAPJOIN && LA142_0 <= KW_MINUS)||(LA142_0 >= KW_MSCK && LA142_0 <= KW_NOSCAN)||(LA142_0 >= KW_NO_DROP && LA142_0 <= KW_OFFLINE)||LA142_0==KW_OPTION||(LA142_0 >= KW_ORCFILE && LA142_0 <= KW_OUTPUTFORMAT)||LA142_0==KW_OVERWRITE||(LA142_0 >= KW_PARTITION && LA142_0 <= KW_PLUS)||(LA142_0 >= KW_PRETTY && LA142_0 <= KW_RECORDWRITER)||(LA142_0 >= KW_REGEXP && LA142_0 <= KW_SCHEMAS)||(LA142_0 >= KW_SEMI && LA142_0 <= KW_TABLES)||(LA142_0 >= KW_TBLPROPERTIES && LA142_0 <= KW_TEXTFILE)||(LA142_0 >= KW_TIMESTAMP && LA142_0 <= KW_TOUCH)||(LA142_0 >= KW_TRIGGER && LA142_0 <= KW_UNARCHIVE)||(LA142_0 >= KW_UNDO && LA142_0 <= KW_UNIONTYPE)||(LA142_0 >= KW_UNLOCK && LA142_0 <= KW_VALUE_TYPE)||LA142_0==KW_VIEW||LA142_0==KW_WHILE||LA142_0==KW_WITH) ) {
				alt142=1;
			}
			switch (alt142) {
				case 1 :
					// HiveParser.g:1413:14: columnNameTypeList
					{
					pushFollow(FOLLOW_columnNameTypeList_in_createMacroStatement7959);
					columnNameTypeList506=columnNameTypeList();
					state._fsp--;

					stream_columnNameTypeList.add(columnNameTypeList506.getTree());
					}
					break;

			}

			RPAREN507=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_createMacroStatement7962);  
			stream_RPAREN.add(RPAREN507);

			pushFollow(FOLLOW_expression_in_createMacroStatement7964);
			expression508=expression();
			state._fsp--;

			stream_expression.add(expression508.getTree());
			// AST REWRITE
			// elements: expression, columnNameTypeList, Identifier
			// 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();
			// 1414:5: -> ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression )
			{
				// HiveParser.g:1414:8: ^( TOK_CREATEMACRO Identifier ( columnNameTypeList )? expression )
				{
				CommonTree root_1 = (CommonTree)adaptor.nil();
				root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_CREATEMACRO, "TOK_CREATEMACRO"), root_1);
				adaptor.addChild(root_1, stream_Identifier.nextNode());
				// HiveParser.g:1414:37: ( columnNameTypeList )?
				if ( stream_columnNameTypeList.hasNext() ) {
					adaptor.addChild(root_1, stream_columnNameTypeList.nextTree());
				}
				stream_columnNameTypeList.reset();

				adaptor.addChild(root_1, stream_expression.nextTree());
				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;
	}