public final InsertProgram grandInsert() throws RecognitionException {
		InsertProgram program = null;


		BasicInsertMeta s1 =null;
		BatchInsertMeta s2 =null;
		RTInsertMeta s3 =null;

		 program = null; 
		try {
			// druidG.g:65:2: ( (s1= insertStmnt ) | (s2= insertHStmnt ) | (s3= insertRTStmnt ) ( WS )? ( ( OPT_SEMI_COLON )? | ( OPT_AMPERSAND )? ) )
			int alt14=3;
			switch ( input.LA(1) ) {
			case INSERT:
				{
				alt14=1;
				}
				break;
			case INSERT_HADOOP:
				{
				alt14=2;
				}
				break;
			case INSERT_REALTIME:
				{
				alt14=3;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 14, 0, input);
				throw nvae;
			}
			switch (alt14) {
				case 1 :
					// druidG.g:65:4: (s1= insertStmnt )
					{
					// druidG.g:65:4: (s1= insertStmnt )
					// druidG.g:65:5: s1= insertStmnt
					{
					pushFollow(FOLLOW_insertStmnt_in_grandInsert214);
					s1=insertStmnt();
					state._fsp--;

					}

					 program = InsertProgram.getInsertInstance();program.addStmnt(s1); 
					}
					break;
				case 2 :
					// druidG.g:66:4: (s2= insertHStmnt )
					{
					// druidG.g:66:4: (s2= insertHStmnt )
					// druidG.g:66:5: s2= insertHStmnt
					{
					pushFollow(FOLLOW_insertHStmnt_in_grandInsert226);
					s2=insertHStmnt();
					state._fsp--;

					}

					 program = InsertProgram.getInsertHadoopInstance();program.addStmnt(s2); 
					}
					break;
				case 3 :
					// druidG.g:67:4: (s3= insertRTStmnt ) ( WS )? ( ( OPT_SEMI_COLON )? | ( OPT_AMPERSAND )? )
					{
					// druidG.g:67:4: (s3= insertRTStmnt )
					// druidG.g:67:5: s3= insertRTStmnt
					{
					pushFollow(FOLLOW_insertRTStmnt_in_grandInsert238);
					s3=insertRTStmnt();
					state._fsp--;

					}

					 program = InsertProgram.getInsertRTInstance();program.addStmnt(s3); 
					// druidG.g:68:4: ( WS )?
					int alt10=2;
					int LA10_0 = input.LA(1);
					if ( (LA10_0==WS) ) {
						alt10=1;
					}
					switch (alt10) {
						case 1 :
							// druidG.g:68:4: WS
							{
							match(input,WS,FOLLOW_WS_in_grandInsert247); 
							}
							break;

					}

					// druidG.g:68:8: ( ( OPT_SEMI_COLON )? | ( OPT_AMPERSAND )? )
					int alt13=2;
					switch ( input.LA(1) ) {
					case OPT_SEMI_COLON:
						{
						alt13=1;
						}
						break;
					case EOF:
						{
						alt13=1;
						}
						break;
					case OPT_AMPERSAND:
						{
						alt13=2;
						}
						break;
					default:
						NoViableAltException nvae =
							new NoViableAltException("", 13, 0, input);
						throw nvae;
					}
					switch (alt13) {
						case 1 :
							// druidG.g:68:9: ( OPT_SEMI_COLON )?
							{
							// druidG.g:68:9: ( OPT_SEMI_COLON )?
							int alt11=2;
							int LA11_0 = input.LA(1);
							if ( (LA11_0==OPT_SEMI_COLON) ) {
								alt11=1;
							}
							switch (alt11) {
								case 1 :
									// druidG.g:68:9: OPT_SEMI_COLON
									{
									match(input,OPT_SEMI_COLON,FOLLOW_OPT_SEMI_COLON_in_grandInsert251); 
									}
									break;

							}

							}
							break;
						case 2 :
							// druidG.g:68:27: ( OPT_AMPERSAND )?
							{
							// druidG.g:68:27: ( OPT_AMPERSAND )?
							int alt12=2;
							int LA12_0 = input.LA(1);
							if ( (LA12_0==OPT_AMPERSAND) ) {
								alt12=1;
							}
							switch (alt12) {
								case 1 :
									// druidG.g:68:28: OPT_AMPERSAND
									{
									match(input,OPT_AMPERSAND,FOLLOW_OPT_AMPERSAND_in_grandInsert257); 
									program.waitForCompletion = false;
									}
									break;

							}

							}
							break;

					}


					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return program;
	}
public final InsertProgram grandInsert ( ) throws RecognitionException { InsertProgram program = null ; BasicInsertMeta s1 = null ; BatchInsertMeta s2 = null ; RTInsertMeta s3 = null ; program = null ; try { int alt14 = 3 ; switch ( input . LA ( 1 ) ) { case INSERT : { alt14 = 1 ; } break ; case INSERT_HADOOP : { alt14 = 2 ; } break ; case INSERT_REALTIME : { alt14 = 3 ; } break ; default : NoViableAltException nvae = new NoViableAltException ( "" , 14 , 0 , input ) ; throw nvae ; } switch ( alt14 ) { case 1 : { { pushFollow ( FOLLOW_insertStmnt_in_grandInsert214 ) ; s1 = insertStmnt ( ) ; state . _fsp -- ; } program = InsertProgram . getInsertInstance ( ) ; program . addStmnt ( s1 ) ; } break ; case 2 : { { pushFollow ( FOLLOW_insertHStmnt_in_grandInsert226 ) ; s2 = insertHStmnt ( ) ; state . _fsp -- ; } program = InsertProgram . getInsertHadoopInstance ( ) ; program . addStmnt ( s2 ) ; } break ; case 3 : { { pushFollow ( FOLLOW_insertRTStmnt_in_grandInsert238 ) ; s3 = insertRTStmnt ( ) ; state . _fsp -- ; } program = InsertProgram . getInsertRTInstance ( ) ; program . addStmnt ( s3 ) ; int alt10 = 2 ; int LA10_0 = input . LA ( 1 ) ; if ( ( LA10_0 == WS ) ) { alt10 = 1 ; } switch ( alt10 ) { case 1 : { match ( input , WS , FOLLOW_WS_in_grandInsert247 ) ; } break ; } int alt13 = 2 ; switch ( input . LA ( 1 ) ) { case OPT_SEMI_COLON : { alt13 = 1 ; } break ; case EOF : { alt13 = 1 ; } break ; case OPT_AMPERSAND : { alt13 = 2 ; } break ; default : NoViableAltException nvae = new NoViableAltException ( "" , 13 , 0 , input ) ; throw nvae ; } switch ( alt13 ) { case 1 : { int alt11 = 2 ; int LA11_0 = input . LA ( 1 ) ; if ( ( LA11_0 == OPT_SEMI_COLON ) ) { alt11 = 1 ; } switch ( alt11 ) { case 1 : { match ( input , OPT_SEMI_COLON , FOLLOW_OPT_SEMI_COLON_in_grandInsert251 ) ; } break ; } } break ; case 2 : { int alt12 = 2 ; int LA12_0 = input . LA ( 1 ) ; if ( ( LA12_0 == OPT_AMPERSAND ) ) { alt12 = 1 ; } switch ( alt12 ) { case 1 : { match ( input , OPT_AMPERSAND , FOLLOW_OPT_AMPERSAND_in_grandInsert257 ) ; program . waitForCompletion = false ; } break ; } } break ; } } break ; } } catch ( RecognitionException re ) { reportError ( re ) ; recover ( input , re ) ; } finally { } return program ; }
druidG.g:63:1: grandInsert returns [InsertProgram program] : ( (s1= insertStmnt ) | (s2= insertHStmnt ) | (s3= insertRTStmnt ) ( WS )? ( ( OPT_SEMI_COLON )? | ( OPT_AMPERSAND )? ) );