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

		CommonTree root_0 = null;

		ParserRuleReturnScope primitiveType675 =null;
		ParserRuleReturnScope listType676 =null;
		ParserRuleReturnScope structType677 =null;
		ParserRuleReturnScope mapType678 =null;
		ParserRuleReturnScope unionType679 =null;


		try {
			// HiveParser.g:1766:5: ( primitiveType | listType | structType | mapType | unionType )
			int alt185=5;
			switch ( input.LA(1) ) {
			case KW_BIGINT:
			case KW_BINARY:
			case KW_BOOLEAN:
			case KW_DATE:
			case KW_DATETIME:
			case KW_DECIMAL:
			case KW_DOUBLE:
			case KW_FLOAT:
			case KW_INT:
			case KW_SMALLINT:
			case KW_STRING:
			case KW_TIMESTAMP:
			case KW_TINYINT:
			case KW_VARCHAR:
				{
				alt185=1;
				}
				break;
			case KW_ARRAY:
				{
				alt185=2;
				}
				break;
			case KW_STRUCT:
				{
				alt185=3;
				}
				break;
			case KW_MAP:
				{
				alt185=4;
				}
				break;
			case KW_UNIONTYPE:
				{
				alt185=5;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 185, 0, input);
				throw nvae;
			}
			switch (alt185) {
				case 1 :
					// HiveParser.g:1766:7: primitiveType
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_primitiveType_in_type10782);
					primitiveType675=primitiveType();
					state._fsp--;

					adaptor.addChild(root_0, primitiveType675.getTree());

					}
					break;
				case 2 :
					// HiveParser.g:1767:7: listType
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_listType_in_type10790);
					listType676=listType();
					state._fsp--;

					adaptor.addChild(root_0, listType676.getTree());

					}
					break;
				case 3 :
					// HiveParser.g:1768:7: structType
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_structType_in_type10798);
					structType677=structType();
					state._fsp--;

					adaptor.addChild(root_0, structType677.getTree());

					}
					break;
				case 4 :
					// HiveParser.g:1769:7: mapType
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_mapType_in_type10806);
					mapType678=mapType();
					state._fsp--;

					adaptor.addChild(root_0, mapType678.getTree());

					}
					break;
				case 5 :
					// HiveParser.g:1770:7: unionType
					{
					root_0 = (CommonTree)adaptor.nil();


					pushFollow(FOLLOW_unionType_in_type10814);
					unionType679=unionType();
					state._fsp--;

					adaptor.addChild(root_0, unionType679.getTree());

					}
					break;

			}
			retval.stop = input.LT(-1);

			retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}

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

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