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

		CommonTree root_0 = null;

		Token length=null;
		Token KW_TINYINT680=null;
		Token KW_SMALLINT681=null;
		Token KW_INT682=null;
		Token KW_BIGINT683=null;
		Token KW_BOOLEAN684=null;
		Token KW_FLOAT685=null;
		Token KW_DOUBLE686=null;
		Token KW_DATE687=null;
		Token KW_DATETIME688=null;
		Token KW_TIMESTAMP689=null;
		Token KW_STRING690=null;
		Token KW_BINARY691=null;
		Token KW_DECIMAL692=null;
		Token KW_VARCHAR693=null;
		Token LPAREN694=null;
		Token RPAREN695=null;

		CommonTree length_tree=null;
		CommonTree KW_TINYINT680_tree=null;
		CommonTree KW_SMALLINT681_tree=null;
		CommonTree KW_INT682_tree=null;
		CommonTree KW_BIGINT683_tree=null;
		CommonTree KW_BOOLEAN684_tree=null;
		CommonTree KW_FLOAT685_tree=null;
		CommonTree KW_DOUBLE686_tree=null;
		CommonTree KW_DATE687_tree=null;
		CommonTree KW_DATETIME688_tree=null;
		CommonTree KW_TIMESTAMP689_tree=null;
		CommonTree KW_STRING690_tree=null;
		CommonTree KW_BINARY691_tree=null;
		CommonTree KW_DECIMAL692_tree=null;
		CommonTree KW_VARCHAR693_tree=null;
		CommonTree LPAREN694_tree=null;
		CommonTree RPAREN695_tree=null;
		RewriteRuleTokenStream stream_KW_DATETIME=new RewriteRuleTokenStream(adaptor,"token KW_DATETIME");
		RewriteRuleTokenStream stream_KW_VARCHAR=new RewriteRuleTokenStream(adaptor,"token KW_VARCHAR");
		RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,"token RPAREN");
		RewriteRuleTokenStream stream_KW_DATE=new RewriteRuleTokenStream(adaptor,"token KW_DATE");
		RewriteRuleTokenStream stream_KW_TIMESTAMP=new RewriteRuleTokenStream(adaptor,"token KW_TIMESTAMP");
		RewriteRuleTokenStream stream_KW_STRING=new RewriteRuleTokenStream(adaptor,"token KW_STRING");
		RewriteRuleTokenStream stream_Number=new RewriteRuleTokenStream(adaptor,"token Number");
		RewriteRuleTokenStream stream_KW_SMALLINT=new RewriteRuleTokenStream(adaptor,"token KW_SMALLINT");
		RewriteRuleTokenStream stream_KW_INT=new RewriteRuleTokenStream(adaptor,"token KW_INT");
		RewriteRuleTokenStream stream_KW_BINARY=new RewriteRuleTokenStream(adaptor,"token KW_BINARY");
		RewriteRuleTokenStream stream_KW_DECIMAL=new RewriteRuleTokenStream(adaptor,"token KW_DECIMAL");
		RewriteRuleTokenStream stream_KW_BOOLEAN=new RewriteRuleTokenStream(adaptor,"token KW_BOOLEAN");
		RewriteRuleTokenStream stream_KW_FLOAT=new RewriteRuleTokenStream(adaptor,"token KW_FLOAT");
		RewriteRuleTokenStream stream_KW_DOUBLE=new RewriteRuleTokenStream(adaptor,"token KW_DOUBLE");
		RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,"token LPAREN");
		RewriteRuleTokenStream stream_KW_BIGINT=new RewriteRuleTokenStream(adaptor,"token KW_BIGINT");
		RewriteRuleTokenStream stream_KW_TINYINT=new RewriteRuleTokenStream(adaptor,"token KW_TINYINT");

		 msgs.push("primitive type specification"); 
		try {
			// HiveParser.g:1775:5: ( KW_TINYINT -> TOK_TINYINT | KW_SMALLINT -> TOK_SMALLINT | KW_INT -> TOK_INT | KW_BIGINT -> TOK_BIGINT | KW_BOOLEAN -> TOK_BOOLEAN | KW_FLOAT -> TOK_FLOAT | KW_DOUBLE -> TOK_DOUBLE | KW_DATE -> TOK_DATE | KW_DATETIME -> TOK_DATETIME | KW_TIMESTAMP -> TOK_TIMESTAMP | KW_STRING -> TOK_STRING | KW_BINARY -> TOK_BINARY | KW_DECIMAL -> TOK_DECIMAL | KW_VARCHAR LPAREN length= Number RPAREN -> ^( TOK_VARCHAR $length) )
			int alt186=14;
			switch ( input.LA(1) ) {
			case KW_TINYINT:
				{
				alt186=1;
				}
				break;
			case KW_SMALLINT:
				{
				alt186=2;
				}
				break;
			case KW_INT:
				{
				alt186=3;
				}
				break;
			case KW_BIGINT:
				{
				alt186=4;
				}
				break;
			case KW_BOOLEAN:
				{
				alt186=5;
				}
				break;
			case KW_FLOAT:
				{
				alt186=6;
				}
				break;
			case KW_DOUBLE:
				{
				alt186=7;
				}
				break;
			case KW_DATE:
				{
				alt186=8;
				}
				break;
			case KW_DATETIME:
				{
				alt186=9;
				}
				break;
			case KW_TIMESTAMP:
				{
				alt186=10;
				}
				break;
			case KW_STRING:
				{
				alt186=11;
				}
				break;
			case KW_BINARY:
				{
				alt186=12;
				}
				break;
			case KW_DECIMAL:
				{
				alt186=13;
				}
				break;
			case KW_VARCHAR:
				{
				alt186=14;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 186, 0, input);
				throw nvae;
			}
			switch (alt186) {
				case 1 :
					// HiveParser.g:1775:7: KW_TINYINT
					{
					KW_TINYINT680=(Token)match(input,KW_TINYINT,FOLLOW_KW_TINYINT_in_primitiveType10836);  
					stream_KW_TINYINT.add(KW_TINYINT680);

					// 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();
					// 1775:24: -> TOK_TINYINT
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TINYINT, "TOK_TINYINT"));
					}


					retval.tree = root_0;

					}
					break;
				case 2 :
					// HiveParser.g:1776:7: KW_SMALLINT
					{
					KW_SMALLINT681=(Token)match(input,KW_SMALLINT,FOLLOW_KW_SMALLINT_in_primitiveType10857);  
					stream_KW_SMALLINT.add(KW_SMALLINT681);

					// 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();
					// 1776:24: -> TOK_SMALLINT
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_SMALLINT, "TOK_SMALLINT"));
					}


					retval.tree = root_0;

					}
					break;
				case 3 :
					// HiveParser.g:1777:7: KW_INT
					{
					KW_INT682=(Token)match(input,KW_INT,FOLLOW_KW_INT_in_primitiveType10877);  
					stream_KW_INT.add(KW_INT682);

					// 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();
					// 1777:24: -> TOK_INT
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_INT, "TOK_INT"));
					}


					retval.tree = root_0;

					}
					break;
				case 4 :
					// HiveParser.g:1778:7: KW_BIGINT
					{
					KW_BIGINT683=(Token)match(input,KW_BIGINT,FOLLOW_KW_BIGINT_in_primitiveType10902);  
					stream_KW_BIGINT.add(KW_BIGINT683);

					// 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();
					// 1778:24: -> TOK_BIGINT
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_BIGINT, "TOK_BIGINT"));
					}


					retval.tree = root_0;

					}
					break;
				case 5 :
					// HiveParser.g:1779:7: KW_BOOLEAN
					{
					KW_BOOLEAN684=(Token)match(input,KW_BOOLEAN,FOLLOW_KW_BOOLEAN_in_primitiveType10924);  
					stream_KW_BOOLEAN.add(KW_BOOLEAN684);

					// 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();
					// 1779:24: -> TOK_BOOLEAN
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_BOOLEAN, "TOK_BOOLEAN"));
					}


					retval.tree = root_0;

					}
					break;
				case 6 :
					// HiveParser.g:1780:7: KW_FLOAT
					{
					KW_FLOAT685=(Token)match(input,KW_FLOAT,FOLLOW_KW_FLOAT_in_primitiveType10945);  
					stream_KW_FLOAT.add(KW_FLOAT685);

					// 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();
					// 1780:24: -> TOK_FLOAT
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_FLOAT, "TOK_FLOAT"));
					}


					retval.tree = root_0;

					}
					break;
				case 7 :
					// HiveParser.g:1781:7: KW_DOUBLE
					{
					KW_DOUBLE686=(Token)match(input,KW_DOUBLE,FOLLOW_KW_DOUBLE_in_primitiveType10968);  
					stream_KW_DOUBLE.add(KW_DOUBLE686);

					// 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();
					// 1781:24: -> TOK_DOUBLE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_DOUBLE, "TOK_DOUBLE"));
					}


					retval.tree = root_0;

					}
					break;
				case 8 :
					// HiveParser.g:1782:7: KW_DATE
					{
					KW_DATE687=(Token)match(input,KW_DATE,FOLLOW_KW_DATE_in_primitiveType10990);  
					stream_KW_DATE.add(KW_DATE687);

					// 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();
					// 1782:24: -> TOK_DATE
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_DATE, "TOK_DATE"));
					}


					retval.tree = root_0;

					}
					break;
				case 9 :
					// HiveParser.g:1783:7: KW_DATETIME
					{
					KW_DATETIME688=(Token)match(input,KW_DATETIME,FOLLOW_KW_DATETIME_in_primitiveType11014);  
					stream_KW_DATETIME.add(KW_DATETIME688);

					// 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();
					// 1783:24: -> TOK_DATETIME
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_DATETIME, "TOK_DATETIME"));
					}


					retval.tree = root_0;

					}
					break;
				case 10 :
					// HiveParser.g:1784:7: KW_TIMESTAMP
					{
					KW_TIMESTAMP689=(Token)match(input,KW_TIMESTAMP,FOLLOW_KW_TIMESTAMP_in_primitiveType11034);  
					stream_KW_TIMESTAMP.add(KW_TIMESTAMP689);

					// 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();
					// 1784:24: -> TOK_TIMESTAMP
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_TIMESTAMP, "TOK_TIMESTAMP"));
					}


					retval.tree = root_0;

					}
					break;
				case 11 :
					// HiveParser.g:1785:7: KW_STRING
					{
					KW_STRING690=(Token)match(input,KW_STRING,FOLLOW_KW_STRING_in_primitiveType11053);  
					stream_KW_STRING.add(KW_STRING690);

					// 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();
					// 1785:24: -> TOK_STRING
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_STRING, "TOK_STRING"));
					}


					retval.tree = root_0;

					}
					break;
				case 12 :
					// HiveParser.g:1786:7: KW_BINARY
					{
					KW_BINARY691=(Token)match(input,KW_BINARY,FOLLOW_KW_BINARY_in_primitiveType11075);  
					stream_KW_BINARY.add(KW_BINARY691);

					// 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();
					// 1786:24: -> TOK_BINARY
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_BINARY, "TOK_BINARY"));
					}


					retval.tree = root_0;

					}
					break;
				case 13 :
					// HiveParser.g:1787:7: KW_DECIMAL
					{
					KW_DECIMAL692=(Token)match(input,KW_DECIMAL,FOLLOW_KW_DECIMAL_in_primitiveType11097);  
					stream_KW_DECIMAL.add(KW_DECIMAL692);

					// 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();
					// 1787:24: -> TOK_DECIMAL
					{
						adaptor.addChild(root_0, (CommonTree)adaptor.create(TOK_DECIMAL, "TOK_DECIMAL"));
					}


					retval.tree = root_0;

					}
					break;
				case 14 :
					// HiveParser.g:1788:7: KW_VARCHAR LPAREN length= Number RPAREN
					{
					KW_VARCHAR693=(Token)match(input,KW_VARCHAR,FOLLOW_KW_VARCHAR_in_primitiveType11118);  
					stream_KW_VARCHAR.add(KW_VARCHAR693);

					LPAREN694=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_primitiveType11120);  
					stream_LPAREN.add(LPAREN694);

					length=(Token)match(input,Number,FOLLOW_Number_in_primitiveType11124);  
					stream_Number.add(length);

					RPAREN695=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_primitiveType11126);  
					stream_RPAREN.add(RPAREN695);

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

					root_0 = (CommonTree)adaptor.nil();
					// 1788:51: -> ^( TOK_VARCHAR $length)
					{
						// HiveParser.g:1788:57: ^( TOK_VARCHAR $length)
						{
						CommonTree root_1 = (CommonTree)adaptor.nil();
						root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(TOK_VARCHAR, "TOK_VARCHAR"), root_1);
						adaptor.addChild(root_1, stream_length.nextNode());
						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;
	}