SqlServerParser.java

// $ANTLR 3.5.2 org/argouml/language/sql/reveng/SqlServer.g 2024-12-21 19:52:02

package org.argouml.language.sql.reveng;

import org.argouml.language.sql.TableDefinition;
import org.argouml.language.sql.ColumnDefinition;
import org.argouml.language.sql.ForeignKeyDefinition;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings("all")
public class SqlServerParser extends Parser {
	public static final String[] tokenNames = new String[] {
		"<invalid>", "<EOR>", "<DOWN>", "<UP>", "COMMA", "DIGIT", "DOT", "ID", 
		"LEFT_PAREN", "LETTER", "ML_COMMENT", "NUMBER", "QUOTED_TEXT", "RIGHT_PAREN", 
		"SL_COMMENT", "WS", "';'", "'='", "'ACTION'", "'ADD'", "'ALLOW_PAGE_LOCKS'", 
		"'ALLOW_ROW_LOCKS'", "'ALTER'", "'ANSI_NULLS'", "'ANSI_PADDING'", "'ASC'", 
		"'BTREE'", "'CASCADE'", "'CHECK'", "'CLUSTERED'", "'CONSTRAINT'", "'CREATE'", 
		"'DATA_COMPRESSION'", "'DEFAULT'", "'DELETE'", "'DESC'", "'FILLFACTOR'", 
		"'FOR'", "'FOREIGN'", "'FULL'", "'GO'", "'HASH'", "'IGNORE_DUP_KEY'", 
		"'INDEX'", "'KEY'", "'MATCH'", "'NO'", "'NONCLUSTERED'", "'NONE'", "'NOT'", 
		"'NULL'", "'OFF'", "'ON'", "'PAD_INDEX'", "'PAGE'", "'PARTIAL'", "'PRIMARY'", 
		"'QUOTED_IDENTIFIER'", "'REFERENCES'", "'RESTRICT'", "'ROW'", "'SET'", 
		"'STATISTICS_NORECOMPUTE'", "'TABLE'", "'UNIQUE'", "'UPDATE'", "'USE'", 
		"'WITH'", "'['", "']'"
	};
	public static final int EOF=-1;
	public static final int T__16=16;
	public static final int T__17=17;
	public static final int T__18=18;
	public static final int T__19=19;
	public static final int T__20=20;
	public static final int T__21=21;
	public static final int T__22=22;
	public static final int T__23=23;
	public static final int T__24=24;
	public static final int T__25=25;
	public static final int T__26=26;
	public static final int T__27=27;
	public static final int T__28=28;
	public static final int T__29=29;
	public static final int T__30=30;
	public static final int T__31=31;
	public static final int T__32=32;
	public static final int T__33=33;
	public static final int T__34=34;
	public static final int T__35=35;
	public static final int T__36=36;
	public static final int T__37=37;
	public static final int T__38=38;
	public static final int T__39=39;
	public static final int T__40=40;
	public static final int T__41=41;
	public static final int T__42=42;
	public static final int T__43=43;
	public static final int T__44=44;
	public static final int T__45=45;
	public static final int T__46=46;
	public static final int T__47=47;
	public static final int T__48=48;
	public static final int T__49=49;
	public static final int T__50=50;
	public static final int T__51=51;
	public static final int T__52=52;
	public static final int T__53=53;
	public static final int T__54=54;
	public static final int T__55=55;
	public static final int T__56=56;
	public static final int T__57=57;
	public static final int T__58=58;
	public static final int T__59=59;
	public static final int T__60=60;
	public static final int T__61=61;
	public static final int T__62=62;
	public static final int T__63=63;
	public static final int T__64=64;
	public static final int T__65=65;
	public static final int T__66=66;
	public static final int T__67=67;
	public static final int T__68=68;
	public static final int T__69=69;
	public static final int COMMA=4;
	public static final int DIGIT=5;
	public static final int DOT=6;
	public static final int ID=7;
	public static final int LEFT_PAREN=8;
	public static final int LETTER=9;
	public static final int ML_COMMENT=10;
	public static final int NUMBER=11;
	public static final int QUOTED_TEXT=12;
	public static final int RIGHT_PAREN=13;
	public static final int SL_COMMENT=14;
	public static final int WS=15;

	// delegates
	public Parser[] getDelegates() {
		return new Parser[] {};
	}

	// delegators


	public SqlServerParser(TokenStream input) {
		this(input, new RecognizerSharedState());
	}
	public SqlServerParser(TokenStream input, RecognizerSharedState state) {
		super(input, state);
	}

	@Override public String[] getTokenNames() { return SqlServerParser.tokenNames; }
	@Override public String getGrammarFileName() { return "org/argouml/language/sql/reveng/SqlServer.g"; }


		private Lexer _lexer = null;

		private Modeller _modeller;

		boolean readSpace = false;
		public Modeller getModeller() {
	        return _modeller;
	    }
	    
	    public void setModeller(Modeller modeller) {
	        _modeller = modeller;
	    }



	// $ANTLR start "dump_read"
	// org/argouml/language/sql/reveng/SqlServer.g:50:1: dump_read[Modeller modeller, Lexer lexer] : 'USE' name_with_esc ( instr )* ;
	public final void dump_read(Modeller modeller, Lexer lexer) throws RecognitionException {

		        setModeller(modeller);
		        _lexer = lexer;
		        
		    
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:56:5: ( 'USE' name_with_esc ( instr )* )
			// org/argouml/language/sql/reveng/SqlServer.g:57:5: 'USE' name_with_esc ( instr )*
			{
			match(input,66,FOLLOW_66_in_dump_read55); 
			pushFollow(FOLLOW_name_with_esc_in_dump_read57);
			name_with_esc();
			state._fsp--;

			// org/argouml/language/sql/reveng/SqlServer.g:58:5: ( instr )*
			loop1:
			while (true) {
				int alt1=2;
				int LA1_0 = input.LA(1);
				if ( (LA1_0==ML_COMMENT||LA1_0==SL_COMMENT||LA1_0==22||LA1_0==31||LA1_0==40||LA1_0==61) ) {
					alt1=1;
				}

				switch (alt1) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:58:6: instr
					{
					pushFollow(FOLLOW_instr_in_dump_read64);
					instr();
					state._fsp--;

					}
					break;

				default :
					break loop1;
				}
			}


					getModeller().generateModele();
				
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "dump_read"



	// $ANTLR start "instr"
	// org/argouml/language/sql/reveng/SqlServer.g:64:1: instr : ( dumpComment | 'GO' | set_instr | create_table_statement | alter_table_statement );
	public final void instr() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:64:7: ( dumpComment | 'GO' | set_instr | create_table_statement | alter_table_statement )
			int alt2=5;
			switch ( input.LA(1) ) {
			case ML_COMMENT:
			case SL_COMMENT:
				{
				alt2=1;
				}
				break;
			case 40:
				{
				alt2=2;
				}
				break;
			case 61:
				{
				alt2=3;
				}
				break;
			case 31:
				{
				alt2=4;
				}
				break;
			case 22:
				{
				alt2=5;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 2, 0, input);
				throw nvae;
			}
			switch (alt2) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:65:3: dumpComment
					{
					pushFollow(FOLLOW_dumpComment_in_instr84);
					dumpComment();
					state._fsp--;

					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:66:5: 'GO'
					{
					match(input,40,FOLLOW_40_in_instr90); 
					}
					break;
				case 3 :
					// org/argouml/language/sql/reveng/SqlServer.g:67:5: set_instr
					{
					pushFollow(FOLLOW_set_instr_in_instr96);
					set_instr();
					state._fsp--;

					}
					break;
				case 4 :
					// org/argouml/language/sql/reveng/SqlServer.g:68:4: create_table_statement
					{
					pushFollow(FOLLOW_create_table_statement_in_instr101);
					create_table_statement();
					state._fsp--;

					}
					break;
				case 5 :
					// org/argouml/language/sql/reveng/SqlServer.g:69:4: alter_table_statement
					{
					pushFollow(FOLLOW_alter_table_statement_in_instr106);
					alter_table_statement();
					state._fsp--;

					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "instr"



	// $ANTLR start "set_instr"
	// org/argouml/language/sql/reveng/SqlServer.g:73:1: set_instr : 'SET' ( 'ANSI_NULLS' | 'QUOTED_IDENTIFIER' | 'ANSI_PADDING' ) ( 'ON' | 'OFF' ) ;
	public final void set_instr() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:73:11: ( 'SET' ( 'ANSI_NULLS' | 'QUOTED_IDENTIFIER' | 'ANSI_PADDING' ) ( 'ON' | 'OFF' ) )
			// org/argouml/language/sql/reveng/SqlServer.g:74:2: 'SET' ( 'ANSI_NULLS' | 'QUOTED_IDENTIFIER' | 'ANSI_PADDING' ) ( 'ON' | 'OFF' )
			{
			match(input,61,FOLLOW_61_in_set_instr118); 
			if ( (input.LA(1) >= 23 && input.LA(1) <= 24)||input.LA(1)==57 ) {
				input.consume();
				state.errorRecovery=false;
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
				input.consume();
				state.errorRecovery=false;
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "set_instr"



	// $ANTLR start "dumpComment"
	// org/argouml/language/sql/reveng/SqlServer.g:85:1: dumpComment : ( SL_COMMENT | ML_COMMENT ( ';' )? );
	public final void dumpComment() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:85:12: ( SL_COMMENT | ML_COMMENT ( ';' )? )
			int alt4=2;
			int LA4_0 = input.LA(1);
			if ( (LA4_0==SL_COMMENT) ) {
				alt4=1;
			}
			else if ( (LA4_0==ML_COMMENT) ) {
				alt4=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 4, 0, input);
				throw nvae;
			}

			switch (alt4) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:86:2: SL_COMMENT
					{
					match(input,SL_COMMENT,FOLLOW_SL_COMMENT_in_dumpComment164); 
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:87:4: ML_COMMENT ( ';' )?
					{
					match(input,ML_COMMENT,FOLLOW_ML_COMMENT_in_dumpComment169); 
					// org/argouml/language/sql/reveng/SqlServer.g:87:15: ( ';' )?
					int alt3=2;
					int LA3_0 = input.LA(1);
					if ( (LA3_0==16) ) {
						alt3=1;
					}
					switch (alt3) {
						case 1 :
							// org/argouml/language/sql/reveng/SqlServer.g:87:16: ';'
							{
							match(input,16,FOLLOW_16_in_dumpComment172); 
							}
							break;

					}

					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "dumpComment"



	// $ANTLR start "create_table_statement"
	// org/argouml/language/sql/reveng/SqlServer.g:90:1: create_table_statement : 'CREATE' 'TABLE' name_with_esc DOT table_name create_definition_list[table] table_store ;
	public final void create_table_statement() throws RecognitionException {
		String table_name1 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:90:24: ( 'CREATE' 'TABLE' name_with_esc DOT table_name create_definition_list[table] table_store )
			// org/argouml/language/sql/reveng/SqlServer.g:91:2: 'CREATE' 'TABLE' name_with_esc DOT table_name create_definition_list[table] table_store
			{
			match(input,31,FOLLOW_31_in_create_table_statement186); 
			match(input,63,FOLLOW_63_in_create_table_statement188); 
			pushFollow(FOLLOW_name_with_esc_in_create_table_statement193);
			name_with_esc();
			state._fsp--;

			match(input,DOT,FOLLOW_DOT_in_create_table_statement195); 
			pushFollow(FOLLOW_table_name_in_create_table_statement197);
			table_name1=table_name();
			state._fsp--;


			    		 	TableDefinition table = getModeller().getTableFromName(table_name1);
						
			pushFollow(FOLLOW_create_definition_list_in_create_table_statement221);
			create_definition_list(table);
			state._fsp--;

			pushFollow(FOLLOW_table_store_in_create_table_statement237);
			table_store();
			state._fsp--;

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "create_table_statement"



	// $ANTLR start "alter_table_statement"
	// org/argouml/language/sql/reveng/SqlServer.g:101:1: alter_table_statement : 'ALTER' 'TABLE' name_with_esc DOT table_name ( 'WITH' 'CHECK' )? ( 'ADD' constraint_def[table] | 'CHECK' 'CONSTRAINT' ( symbol )? ) ;
	public final void alter_table_statement() throws RecognitionException {
		String table_name2 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:101:23: ( 'ALTER' 'TABLE' name_with_esc DOT table_name ( 'WITH' 'CHECK' )? ( 'ADD' constraint_def[table] | 'CHECK' 'CONSTRAINT' ( symbol )? ) )
			// org/argouml/language/sql/reveng/SqlServer.g:102:2: 'ALTER' 'TABLE' name_with_esc DOT table_name ( 'WITH' 'CHECK' )? ( 'ADD' constraint_def[table] | 'CHECK' 'CONSTRAINT' ( symbol )? )
			{
			match(input,22,FOLLOW_22_in_alter_table_statement248); 
			match(input,63,FOLLOW_63_in_alter_table_statement250); 
			pushFollow(FOLLOW_name_with_esc_in_alter_table_statement254);
			name_with_esc();
			state._fsp--;

			match(input,DOT,FOLLOW_DOT_in_alter_table_statement256); 
			pushFollow(FOLLOW_table_name_in_alter_table_statement258);
			table_name2=table_name();
			state._fsp--;


			    		 TableDefinition table = getModeller().getTableFromName(table_name2);
					
			// org/argouml/language/sql/reveng/SqlServer.g:106:3: ( 'WITH' 'CHECK' )?
			int alt5=2;
			int LA5_0 = input.LA(1);
			if ( (LA5_0==67) ) {
				alt5=1;
			}
			switch (alt5) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:106:4: 'WITH' 'CHECK'
					{
					match(input,67,FOLLOW_67_in_alter_table_statement265); 
					match(input,28,FOLLOW_28_in_alter_table_statement267); 
					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:108:3: ( 'ADD' constraint_def[table] | 'CHECK' 'CONSTRAINT' ( symbol )? )
			int alt7=2;
			int LA7_0 = input.LA(1);
			if ( (LA7_0==19) ) {
				alt7=1;
			}
			else if ( (LA7_0==28) ) {
				alt7=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 7, 0, input);
				throw nvae;
			}

			switch (alt7) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:109:3: 'ADD' constraint_def[table]
					{
					match(input,19,FOLLOW_19_in_alter_table_statement280); 
					pushFollow(FOLLOW_constraint_def_in_alter_table_statement282);
					constraint_def(table);
					state._fsp--;

					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:110:5: 'CHECK' 'CONSTRAINT' ( symbol )?
					{
					match(input,28,FOLLOW_28_in_alter_table_statement289); 
					match(input,30,FOLLOW_30_in_alter_table_statement291); 
					// org/argouml/language/sql/reveng/SqlServer.g:110:26: ( symbol )?
					int alt6=2;
					int LA6_0 = input.LA(1);
					if ( (LA6_0==68) ) {
						alt6=1;
					}
					switch (alt6) {
						case 1 :
							// org/argouml/language/sql/reveng/SqlServer.g:110:27: symbol
							{
							pushFollow(FOLLOW_symbol_in_alter_table_statement294);
							symbol();
							state._fsp--;

							}
							break;

					}

					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "alter_table_statement"



	// $ANTLR start "create_definition_list"
	// org/argouml/language/sql/reveng/SqlServer.g:116:1: create_definition_list[TableDefinition table] : LEFT_PAREN create_definition[table] ( COMMA create_definition[table] )* RIGHT_PAREN ;
	public final void create_definition_list(TableDefinition table) throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:117:5: ( LEFT_PAREN create_definition[table] ( COMMA create_definition[table] )* RIGHT_PAREN )
			// org/argouml/language/sql/reveng/SqlServer.g:117:7: LEFT_PAREN create_definition[table] ( COMMA create_definition[table] )* RIGHT_PAREN
			{
			match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_create_definition_list317); 
			pushFollow(FOLLOW_create_definition_in_create_definition_list319);
			create_definition(table);
			state._fsp--;

			// org/argouml/language/sql/reveng/SqlServer.g:117:43: ( COMMA create_definition[table] )*
			loop8:
			while (true) {
				int alt8=2;
				int LA8_0 = input.LA(1);
				if ( (LA8_0==COMMA) ) {
					alt8=1;
				}

				switch (alt8) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:117:44: COMMA create_definition[table]
					{
					match(input,COMMA,FOLLOW_COMMA_in_create_definition_list323); 
					pushFollow(FOLLOW_create_definition_in_create_definition_list325);
					create_definition(table);
					state._fsp--;

					}
					break;

				default :
					break loop8;
				}
			}

			match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_create_definition_list332); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "create_definition_list"



	// $ANTLR start "table_store"
	// org/argouml/language/sql/reveng/SqlServer.g:121:1: table_store : misc_store ;
	public final void table_store() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:121:13: ( misc_store )
			// org/argouml/language/sql/reveng/SqlServer.g:122:2: misc_store
			{
			pushFollow(FOLLOW_misc_store_in_table_store344);
			misc_store();
			state._fsp--;

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "table_store"



	// $ANTLR start "misc_store"
	// org/argouml/language/sql/reveng/SqlServer.g:126:1: misc_store : 'ON' ( '[' 'PRIMARY' ']' ) ;
	public final void misc_store() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:126:12: ( 'ON' ( '[' 'PRIMARY' ']' ) )
			// org/argouml/language/sql/reveng/SqlServer.g:127:2: 'ON' ( '[' 'PRIMARY' ']' )
			{
			match(input,52,FOLLOW_52_in_misc_store356); 
			// org/argouml/language/sql/reveng/SqlServer.g:128:2: ( '[' 'PRIMARY' ']' )
			// org/argouml/language/sql/reveng/SqlServer.g:129:3: '[' 'PRIMARY' ']'
			{
			match(input,68,FOLLOW_68_in_misc_store364); 
			match(input,56,FOLLOW_56_in_misc_store366); 
			match(input,69,FOLLOW_69_in_misc_store368); 
			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "misc_store"



	// $ANTLR start "create_definition"
	// org/argouml/language/sql/reveng/SqlServer.g:132:1: create_definition[TableDefinition table] : ( constraint_def[table] | column_name data_type_def[col] );
	public final void create_definition(TableDefinition table) throws RecognitionException {
		String column_name3 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:132:42: ( constraint_def[table] | column_name data_type_def[col] )
			int alt9=2;
			int LA9_0 = input.LA(1);
			if ( (LA9_0==30||LA9_0==33||LA9_0==38||LA9_0==56||LA9_0==64) ) {
				alt9=1;
			}
			else if ( (LA9_0==68) ) {
				alt9=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 9, 0, input);
				throw nvae;
			}

			switch (alt9) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:133:9: constraint_def[table]
					{
					pushFollow(FOLLOW_constraint_def_in_create_definition389);
					constraint_def(table);
					state._fsp--;

					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:135:10: column_name data_type_def[col]
					{
					pushFollow(FOLLOW_column_name_in_create_definition411);
					column_name3=column_name();
					state._fsp--;


					         	ColumnDefinition col = ColumnDefinition.findOrCreateColumnDefinition(table, column_name3);
					         
					pushFollow(FOLLOW_data_type_def_in_create_definition415);
					data_type_def(col);
					state._fsp--;

					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "create_definition"



	// $ANTLR start "constraint_def"
	// org/argouml/language/sql/reveng/SqlServer.g:141:1: constraint_def[TableDefinition table] returns [String constrName] : ( 'CONSTRAINT' symbol )? ( constraint_unique | constraint_fk[table, constrName] | constraint_pk | constraint_df[table] ) ;
	public final String constraint_def(TableDefinition table) throws RecognitionException {
		String constrName = null;


		String symbol4 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:141:68: ( ( 'CONSTRAINT' symbol )? ( constraint_unique | constraint_fk[table, constrName] | constraint_pk | constraint_df[table] ) )
			// org/argouml/language/sql/reveng/SqlServer.g:142:3: ( 'CONSTRAINT' symbol )? ( constraint_unique | constraint_fk[table, constrName] | constraint_pk | constraint_df[table] )
			{
			// org/argouml/language/sql/reveng/SqlServer.g:142:3: ( 'CONSTRAINT' symbol )?
			int alt10=2;
			int LA10_0 = input.LA(1);
			if ( (LA10_0==30) ) {
				alt10=1;
			}
			switch (alt10) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:142:4: 'CONSTRAINT' symbol
					{
					match(input,30,FOLLOW_30_in_constraint_def445); 
					pushFollow(FOLLOW_symbol_in_constraint_def447);
					symbol4=symbol();
					state._fsp--;


						 		constrName =  symbol4;
						 	
					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:148:3: ( constraint_unique | constraint_fk[table, constrName] | constraint_pk | constraint_df[table] )
			int alt11=4;
			switch ( input.LA(1) ) {
			case 64:
				{
				alt11=1;
				}
				break;
			case 38:
				{
				alt11=2;
				}
				break;
			case 56:
				{
				alt11=3;
				}
				break;
			case 33:
				{
				alt11=4;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 11, 0, input);
				throw nvae;
			}
			switch (alt11) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:149:3: constraint_unique
					{
					pushFollow(FOLLOW_constraint_unique_in_constraint_def470);
					constraint_unique();
					state._fsp--;

					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:150:5: constraint_fk[table, constrName]
					{
					pushFollow(FOLLOW_constraint_fk_in_constraint_def477);
					constraint_fk(table, constrName);
					state._fsp--;

					}
					break;
				case 3 :
					// org/argouml/language/sql/reveng/SqlServer.g:151:5: constraint_pk
					{
					pushFollow(FOLLOW_constraint_pk_in_constraint_def484);
					constraint_pk();
					state._fsp--;

					}
					break;
				case 4 :
					// org/argouml/language/sql/reveng/SqlServer.g:152:5: constraint_df[table]
					{
					pushFollow(FOLLOW_constraint_df_in_constraint_def491);
					constraint_df(table);
					state._fsp--;

					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return constrName;
	}
	// $ANTLR end "constraint_def"



	// $ANTLR start "constraint_df"
	// org/argouml/language/sql/reveng/SqlServer.g:158:1: constraint_df[TableDefinition table] : 'DEFAULT' default_statement[col1] 'FOR' column_name ;
	public final void constraint_df(TableDefinition table) throws RecognitionException {
		String column_name5 =null;


			ColumnDefinition col1 = new ColumnDefinition();

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:161:3: ( 'DEFAULT' default_statement[col1] 'FOR' column_name )
			// org/argouml/language/sql/reveng/SqlServer.g:162:2: 'DEFAULT' default_statement[col1] 'FOR' column_name
			{
			match(input,33,FOLLOW_33_in_constraint_df518); 
			pushFollow(FOLLOW_default_statement_in_constraint_df520);
			default_statement(col1);
			state._fsp--;

			match(input,37,FOLLOW_37_in_constraint_df524); 
			pushFollow(FOLLOW_column_name_in_constraint_df526);
			column_name5=column_name();
			state._fsp--;


					ColumnDefinition col = ColumnDefinition.findOrCreateColumnDefinition(table, column_name5);
					col.setDefaultValue(col1.getDefaultValue());
				
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "constraint_df"



	// $ANTLR start "constraint_unique"
	// org/argouml/language/sql/reveng/SqlServer.g:171:1: constraint_unique : 'UNIQUE' ( 'INDEX' | 'KEY' )? ( index_name )? ( index_type )? columns_list_name ;
	public final void constraint_unique() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:171:19: ( 'UNIQUE' ( 'INDEX' | 'KEY' )? ( index_name )? ( index_type )? columns_list_name )
			// org/argouml/language/sql/reveng/SqlServer.g:172:2: 'UNIQUE' ( 'INDEX' | 'KEY' )? ( index_name )? ( index_type )? columns_list_name
			{
			match(input,64,FOLLOW_64_in_constraint_unique543); 
			// org/argouml/language/sql/reveng/SqlServer.g:172:11: ( 'INDEX' | 'KEY' )?
			int alt12=2;
			int LA12_0 = input.LA(1);
			if ( ((LA12_0 >= 43 && LA12_0 <= 44)) ) {
				alt12=1;
			}
			switch (alt12) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:
					{
					if ( (input.LA(1) >= 43 && input.LA(1) <= 44) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:172:30: ( index_name )?
			int alt13=2;
			int LA13_0 = input.LA(1);
			if ( (LA13_0==LEFT_PAREN) ) {
				int LA13_1 = input.LA(2);
				if ( (LA13_1==68) ) {
					int LA13_4 = input.LA(3);
					if ( (LA13_4==ID) ) {
						int LA13_5 = input.LA(4);
						if ( (LA13_5==69) ) {
							int LA13_6 = input.LA(5);
							if ( (LA13_6==RIGHT_PAREN) ) {
								int LA13_7 = input.LA(6);
								if ( (LA13_7==LEFT_PAREN||LA13_7==26||LA13_7==41) ) {
									alt13=1;
								}
							}
							else if ( (LA13_6==LEFT_PAREN||LA13_6==26||LA13_6==41) ) {
								alt13=1;
							}
						}
					}
				}
			}
			else if ( (LA13_0==68) ) {
				alt13=1;
			}
			switch (alt13) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:172:31: index_name
					{
					pushFollow(FOLLOW_index_name_in_constraint_unique555);
					index_name();
					state._fsp--;

					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:172:44: ( index_type )?
			int alt14=2;
			int LA14_0 = input.LA(1);
			if ( (LA14_0==26||LA14_0==41) ) {
				alt14=1;
			}
			switch (alt14) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:172:45: index_type
					{
					pushFollow(FOLLOW_index_type_in_constraint_unique560);
					index_type();
					state._fsp--;

					}
					break;

			}

			pushFollow(FOLLOW_columns_list_name_in_constraint_unique565);
			columns_list_name();
			state._fsp--;

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "constraint_unique"



	// $ANTLR start "constraint_fk"
	// org/argouml/language/sql/reveng/SqlServer.g:174:1: constraint_fk[TableDefinition table, String constrName] : 'FOREIGN' 'KEY' ( symbol )? columns_list_name reference_definition[fk] ;
	public final void constraint_fk(TableDefinition table, String constrName) throws RecognitionException {
		List<String> columns_list_name6 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:174:58: ( 'FOREIGN' 'KEY' ( symbol )? columns_list_name reference_definition[fk] )
			// org/argouml/language/sql/reveng/SqlServer.g:175:2: 'FOREIGN' 'KEY' ( symbol )? columns_list_name reference_definition[fk]
			{
			match(input,38,FOLLOW_38_in_constraint_fk576); 
			match(input,44,FOLLOW_44_in_constraint_fk578); 
			// org/argouml/language/sql/reveng/SqlServer.g:175:18: ( symbol )?
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0==68) ) {
				alt15=1;
			}
			switch (alt15) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:175:19: symbol
					{
					pushFollow(FOLLOW_symbol_in_constraint_fk581);
					symbol();
					state._fsp--;

					}
					break;

			}


					ForeignKeyDefinition fk = new ForeignKeyDefinition(table);
					fk.setForeignKeyName(constrName);
				
			pushFollow(FOLLOW_columns_list_name_in_constraint_fk589);
			columns_list_name6=columns_list_name();
			state._fsp--;


					for(String colName : columns_list_name6) {
						fk.addColumnDefinition(colName);
					}
				
			pushFollow(FOLLOW_reference_definition_in_constraint_fk595);
			reference_definition(fk);
			state._fsp--;

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "constraint_fk"



	// $ANTLR start "constraint_pk"
	// org/argouml/language/sql/reveng/SqlServer.g:189:1: constraint_pk : 'PRIMARY' 'KEY' ( 'CLUSTERED' | 'NONCLUSTERED' )? columns_list_name_order ( pk_with_option )? ( misc_store )? ;
	public final void constraint_pk() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:189:15: ( 'PRIMARY' 'KEY' ( 'CLUSTERED' | 'NONCLUSTERED' )? columns_list_name_order ( pk_with_option )? ( misc_store )? )
			// org/argouml/language/sql/reveng/SqlServer.g:190:2: 'PRIMARY' 'KEY' ( 'CLUSTERED' | 'NONCLUSTERED' )? columns_list_name_order ( pk_with_option )? ( misc_store )?
			{
			match(input,56,FOLLOW_56_in_constraint_pk606); 
			match(input,44,FOLLOW_44_in_constraint_pk608); 
			// org/argouml/language/sql/reveng/SqlServer.g:191:2: ( 'CLUSTERED' | 'NONCLUSTERED' )?
			int alt16=2;
			int LA16_0 = input.LA(1);
			if ( (LA16_0==29||LA16_0==47) ) {
				alt16=1;
			}
			switch (alt16) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:
					{
					if ( input.LA(1)==29||input.LA(1)==47 ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;

			}

			pushFollow(FOLLOW_columns_list_name_order_in_constraint_pk625);
			columns_list_name_order();
			state._fsp--;

			// org/argouml/language/sql/reveng/SqlServer.g:193:2: ( pk_with_option )?
			int alt17=2;
			int LA17_0 = input.LA(1);
			if ( (LA17_0==67) ) {
				alt17=1;
			}
			switch (alt17) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:193:3: pk_with_option
					{
					pushFollow(FOLLOW_pk_with_option_in_constraint_pk629);
					pk_with_option();
					state._fsp--;

					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:194:2: ( misc_store )?
			int alt18=2;
			int LA18_0 = input.LA(1);
			if ( (LA18_0==52) ) {
				alt18=1;
			}
			switch (alt18) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:194:3: misc_store
					{
					pushFollow(FOLLOW_misc_store_in_constraint_pk635);
					misc_store();
					state._fsp--;

					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "constraint_pk"



	// $ANTLR start "pk_with_option"
	// org/argouml/language/sql/reveng/SqlServer.g:197:1: pk_with_option : 'WITH' LEFT_PAREN index_option ( COMMA index_option )* RIGHT_PAREN ;
	public final void pk_with_option() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:197:16: ( 'WITH' LEFT_PAREN index_option ( COMMA index_option )* RIGHT_PAREN )
			// org/argouml/language/sql/reveng/SqlServer.g:198:2: 'WITH' LEFT_PAREN index_option ( COMMA index_option )* RIGHT_PAREN
			{
			match(input,67,FOLLOW_67_in_pk_with_option647); 
			match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_pk_with_option649); 
			pushFollow(FOLLOW_index_option_in_pk_with_option651);
			index_option();
			state._fsp--;

			// org/argouml/language/sql/reveng/SqlServer.g:198:33: ( COMMA index_option )*
			loop19:
			while (true) {
				int alt19=2;
				int LA19_0 = input.LA(1);
				if ( (LA19_0==COMMA) ) {
					alt19=1;
				}

				switch (alt19) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:198:34: COMMA index_option
					{
					match(input,COMMA,FOLLOW_COMMA_in_pk_with_option654); 
					pushFollow(FOLLOW_index_option_in_pk_with_option656);
					index_option();
					state._fsp--;

					}
					break;

				default :
					break loop19;
				}
			}

			match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_pk_with_option660); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "pk_with_option"



	// $ANTLR start "index_option"
	// org/argouml/language/sql/reveng/SqlServer.g:201:1: index_option : ( 'PAD_INDEX' '=' ( 'ON' | 'OFF' ) | 'FILLFACTOR' '=' ( ID | NUMBER | text_quoted ) | 'IGNORE_DUP_KEY' '=' ( 'ON' | 'OFF' ) | 'STATISTICS_NORECOMPUTE' '=' ( 'ON' | 'OFF' ) | 'ALLOW_ROW_LOCKS' '=' ( 'ON' | 'OFF' ) | 'ALLOW_PAGE_LOCKS' '=' ( 'ON' | 'OFF' ) | 'DATA_COMPRESSION' '=' ( 'NONE' | 'ROW' | 'PAGE' ) );
	public final void index_option() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:201:14: ( 'PAD_INDEX' '=' ( 'ON' | 'OFF' ) | 'FILLFACTOR' '=' ( ID | NUMBER | text_quoted ) | 'IGNORE_DUP_KEY' '=' ( 'ON' | 'OFF' ) | 'STATISTICS_NORECOMPUTE' '=' ( 'ON' | 'OFF' ) | 'ALLOW_ROW_LOCKS' '=' ( 'ON' | 'OFF' ) | 'ALLOW_PAGE_LOCKS' '=' ( 'ON' | 'OFF' ) | 'DATA_COMPRESSION' '=' ( 'NONE' | 'ROW' | 'PAGE' ) )
			int alt21=7;
			switch ( input.LA(1) ) {
			case 53:
				{
				alt21=1;
				}
				break;
			case 36:
				{
				alt21=2;
				}
				break;
			case 42:
				{
				alt21=3;
				}
				break;
			case 62:
				{
				alt21=4;
				}
				break;
			case 21:
				{
				alt21=5;
				}
				break;
			case 20:
				{
				alt21=6;
				}
				break;
			case 32:
				{
				alt21=7;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 21, 0, input);
				throw nvae;
			}
			switch (alt21) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:202:2: 'PAD_INDEX' '=' ( 'ON' | 'OFF' )
					{
					match(input,53,FOLLOW_53_in_index_option670); 
					match(input,17,FOLLOW_17_in_index_option672); 
					if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:203:5: 'FILLFACTOR' '=' ( ID | NUMBER | text_quoted )
					{
					match(input,36,FOLLOW_36_in_index_option687); 
					match(input,17,FOLLOW_17_in_index_option690); 
					// org/argouml/language/sql/reveng/SqlServer.g:203:23: ( ID | NUMBER | text_quoted )
					int alt20=3;
					switch ( input.LA(1) ) {
					case ID:
						{
						alt20=1;
						}
						break;
					case NUMBER:
						{
						alt20=2;
						}
						break;
					case QUOTED_TEXT:
						{
						alt20=3;
						}
						break;
					default:
						NoViableAltException nvae =
							new NoViableAltException("", 20, 0, input);
						throw nvae;
					}
					switch (alt20) {
						case 1 :
							// org/argouml/language/sql/reveng/SqlServer.g:203:25: ID
							{
							match(input,ID,FOLLOW_ID_in_index_option694); 
							}
							break;
						case 2 :
							// org/argouml/language/sql/reveng/SqlServer.g:203:30: NUMBER
							{
							match(input,NUMBER,FOLLOW_NUMBER_in_index_option698); 
							}
							break;
						case 3 :
							// org/argouml/language/sql/reveng/SqlServer.g:203:39: text_quoted
							{
							pushFollow(FOLLOW_text_quoted_in_index_option702);
							text_quoted();
							state._fsp--;

							}
							break;

					}

					}
					break;
				case 3 :
					// org/argouml/language/sql/reveng/SqlServer.g:204:5: 'IGNORE_DUP_KEY' '=' ( 'ON' | 'OFF' )
					{
					match(input,42,FOLLOW_42_in_index_option710); 
					match(input,17,FOLLOW_17_in_index_option712); 
					if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;
				case 4 :
					// org/argouml/language/sql/reveng/SqlServer.g:205:5: 'STATISTICS_NORECOMPUTE' '=' ( 'ON' | 'OFF' )
					{
					match(input,62,FOLLOW_62_in_index_option727); 
					match(input,17,FOLLOW_17_in_index_option729); 
					if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;
				case 5 :
					// org/argouml/language/sql/reveng/SqlServer.g:206:5: 'ALLOW_ROW_LOCKS' '=' ( 'ON' | 'OFF' )
					{
					match(input,21,FOLLOW_21_in_index_option744); 
					match(input,17,FOLLOW_17_in_index_option746); 
					if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;
				case 6 :
					// org/argouml/language/sql/reveng/SqlServer.g:207:5: 'ALLOW_PAGE_LOCKS' '=' ( 'ON' | 'OFF' )
					{
					match(input,20,FOLLOW_20_in_index_option761); 
					match(input,17,FOLLOW_17_in_index_option763); 
					if ( (input.LA(1) >= 51 && input.LA(1) <= 52) ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;
				case 7 :
					// org/argouml/language/sql/reveng/SqlServer.g:208:5: 'DATA_COMPRESSION' '=' ( 'NONE' | 'ROW' | 'PAGE' )
					{
					match(input,32,FOLLOW_32_in_index_option778); 
					match(input,17,FOLLOW_17_in_index_option780); 
					if ( input.LA(1)==48||input.LA(1)==54||input.LA(1)==60 ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "index_option"



	// $ANTLR start "reference_definition"
	// org/argouml/language/sql/reveng/SqlServer.g:211:1: reference_definition[ForeignKeyDefinition fk] : 'REFERENCES' name_with_esc DOT table_name columns_list_name ( 'MATCH' ( 'FULL' | 'PARTIAL' ) )? ( 'ON' ( 'DELETE' | 'UPDATE' ) reference_option )? ;
	public final void reference_definition(ForeignKeyDefinition fk) throws RecognitionException {
		String table_name7 =null;
		List<String> columns_list_name8 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:211:48: ( 'REFERENCES' name_with_esc DOT table_name columns_list_name ( 'MATCH' ( 'FULL' | 'PARTIAL' ) )? ( 'ON' ( 'DELETE' | 'UPDATE' ) reference_option )? )
			// org/argouml/language/sql/reveng/SqlServer.g:212:2: 'REFERENCES' name_with_esc DOT table_name columns_list_name ( 'MATCH' ( 'FULL' | 'PARTIAL' ) )? ( 'ON' ( 'DELETE' | 'UPDATE' ) reference_option )?
			{
			match(input,58,FOLLOW_58_in_reference_definition806); 
			pushFollow(FOLLOW_name_with_esc_in_reference_definition810);
			name_with_esc();
			state._fsp--;

			match(input,DOT,FOLLOW_DOT_in_reference_definition812); 
			pushFollow(FOLLOW_table_name_in_reference_definition814);
			table_name7=table_name();
			state._fsp--;


					TableDefinition tableRef = getModeller().getTableFromName(table_name7);
					fk.setReferencesTable(tableRef);
					
				
			pushFollow(FOLLOW_columns_list_name_in_reference_definition820);
			columns_list_name8=columns_list_name();
			state._fsp--;


					for(String colName : columns_list_name8) {
						fk.addReferencesColumn(colName);
					}
				
			// org/argouml/language/sql/reveng/SqlServer.g:226:2: ( 'MATCH' ( 'FULL' | 'PARTIAL' ) )?
			int alt22=2;
			int LA22_0 = input.LA(1);
			if ( (LA22_0==45) ) {
				alt22=1;
			}
			switch (alt22) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:226:3: 'MATCH' ( 'FULL' | 'PARTIAL' )
					{
					match(input,45,FOLLOW_45_in_reference_definition829); 
					if ( input.LA(1)==39||input.LA(1)==55 ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:227:2: ( 'ON' ( 'DELETE' | 'UPDATE' ) reference_option )?
			int alt23=2;
			int LA23_0 = input.LA(1);
			if ( (LA23_0==52) ) {
				alt23=1;
			}
			switch (alt23) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:227:3: 'ON' ( 'DELETE' | 'UPDATE' ) reference_option
					{
					match(input,52,FOLLOW_52_in_reference_definition843); 
					if ( input.LA(1)==34||input.LA(1)==65 ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					pushFollow(FOLLOW_reference_option_in_reference_definition853);
					reference_option();
					state._fsp--;

					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "reference_definition"



	// $ANTLR start "reference_option"
	// org/argouml/language/sql/reveng/SqlServer.g:230:1: reference_option : ( 'RESTRICT' | 'CASCADE' | 'SET' 'NULL' | 'NO' 'ACTION' | 'SET' 'DEFAULT' );
	public final void reference_option() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:230:18: ( 'RESTRICT' | 'CASCADE' | 'SET' 'NULL' | 'NO' 'ACTION' | 'SET' 'DEFAULT' )
			int alt24=5;
			switch ( input.LA(1) ) {
			case 59:
				{
				alt24=1;
				}
				break;
			case 27:
				{
				alt24=2;
				}
				break;
			case 61:
				{
				int LA24_3 = input.LA(2);
				if ( (LA24_3==50) ) {
					alt24=3;
				}
				else if ( (LA24_3==33) ) {
					alt24=5;
				}

				else {
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 24, 3, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

				}
				break;
			case 46:
				{
				alt24=4;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 24, 0, input);
				throw nvae;
			}
			switch (alt24) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:231:2: 'RESTRICT'
					{
					match(input,59,FOLLOW_59_in_reference_option866); 
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:231:15: 'CASCADE'
					{
					match(input,27,FOLLOW_27_in_reference_option870); 
					}
					break;
				case 3 :
					// org/argouml/language/sql/reveng/SqlServer.g:231:27: 'SET' 'NULL'
					{
					match(input,61,FOLLOW_61_in_reference_option874); 
					match(input,50,FOLLOW_50_in_reference_option876); 
					}
					break;
				case 4 :
					// org/argouml/language/sql/reveng/SqlServer.g:231:42: 'NO' 'ACTION'
					{
					match(input,46,FOLLOW_46_in_reference_option880); 
					match(input,18,FOLLOW_18_in_reference_option882); 
					}
					break;
				case 5 :
					// org/argouml/language/sql/reveng/SqlServer.g:231:58: 'SET' 'DEFAULT'
					{
					match(input,61,FOLLOW_61_in_reference_option886); 
					match(input,33,FOLLOW_33_in_reference_option888); 
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "reference_option"



	// $ANTLR start "columns_list_name_order"
	// org/argouml/language/sql/reveng/SqlServer.g:234:1: columns_list_name_order returns [List<String> listColumn] : LEFT_PAREN c1= column_name ( 'ASC' | 'DESC' )? ( COMMA c2= column_name ( 'ASC' | 'DESC' )? )* RIGHT_PAREN ;
	public final List<String> columns_list_name_order() throws RecognitionException {
		List<String> listColumn = null;


		String c1 =null;
		String c2 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:234:58: ( LEFT_PAREN c1= column_name ( 'ASC' | 'DESC' )? ( COMMA c2= column_name ( 'ASC' | 'DESC' )? )* RIGHT_PAREN )
			// org/argouml/language/sql/reveng/SqlServer.g:236:2: LEFT_PAREN c1= column_name ( 'ASC' | 'DESC' )? ( COMMA c2= column_name ( 'ASC' | 'DESC' )? )* RIGHT_PAREN
			{
			match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_columns_list_name_order902); 
			pushFollow(FOLLOW_column_name_in_columns_list_name_order906);
			c1=column_name();
			state._fsp--;

			// org/argouml/language/sql/reveng/SqlServer.g:236:28: ( 'ASC' | 'DESC' )?
			int alt25=2;
			int LA25_0 = input.LA(1);
			if ( (LA25_0==25||LA25_0==35) ) {
				alt25=1;
			}
			switch (alt25) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:
					{
					if ( input.LA(1)==25||input.LA(1)==35 ) {
						input.consume();
						state.errorRecovery=false;
					}
					else {
						MismatchedSetException mse = new MismatchedSetException(null,input);
						throw mse;
					}
					}
					break;

			}


					listColumn = new ArrayList<String>();
					listColumn.add(c1);
				
			// org/argouml/language/sql/reveng/SqlServer.g:241:2: ( COMMA c2= column_name ( 'ASC' | 'DESC' )? )*
			loop27:
			while (true) {
				int alt27=2;
				int LA27_0 = input.LA(1);
				if ( (LA27_0==COMMA) ) {
					alt27=1;
				}

				switch (alt27) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:242:3: COMMA c2= column_name ( 'ASC' | 'DESC' )?
					{
					match(input,COMMA,FOLLOW_COMMA_in_columns_list_name_order925); 
					pushFollow(FOLLOW_column_name_in_columns_list_name_order929);
					c2=column_name();
					state._fsp--;

					// org/argouml/language/sql/reveng/SqlServer.g:242:24: ( 'ASC' | 'DESC' )?
					int alt26=2;
					int LA26_0 = input.LA(1);
					if ( (LA26_0==25||LA26_0==35) ) {
						alt26=1;
					}
					switch (alt26) {
						case 1 :
							// org/argouml/language/sql/reveng/SqlServer.g:
							{
							if ( input.LA(1)==25||input.LA(1)==35 ) {
								input.consume();
								state.errorRecovery=false;
							}
							else {
								MismatchedSetException mse = new MismatchedSetException(null,input);
								throw mse;
							}
							}
							break;

					}


								listColumn.add(c2);
							
					}
					break;

				default :
					break loop27;
				}
			}

			match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_columns_list_name_order945); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return listColumn;
	}
	// $ANTLR end "columns_list_name_order"



	// $ANTLR start "columns_list_name"
	// org/argouml/language/sql/reveng/SqlServer.g:249:1: columns_list_name returns [List<String> listColumn] : LEFT_PAREN c1= column_name ( COMMA c2= column_name )* RIGHT_PAREN ;
	public final List<String> columns_list_name() throws RecognitionException {
		List<String> listColumn = null;


		String c1 =null;
		String c2 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:249:52: ( LEFT_PAREN c1= column_name ( COMMA c2= column_name )* RIGHT_PAREN )
			// org/argouml/language/sql/reveng/SqlServer.g:251:2: LEFT_PAREN c1= column_name ( COMMA c2= column_name )* RIGHT_PAREN
			{
			match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_columns_list_name962); 
			pushFollow(FOLLOW_column_name_in_columns_list_name966);
			c1=column_name();
			state._fsp--;


					listColumn = new ArrayList<String>();
					listColumn.add(c1);
				
			// org/argouml/language/sql/reveng/SqlServer.g:256:2: ( COMMA c2= column_name )*
			loop28:
			while (true) {
				int alt28=2;
				int LA28_0 = input.LA(1);
				if ( (LA28_0==COMMA) ) {
					alt28=1;
				}

				switch (alt28) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:257:3: COMMA c2= column_name
					{
					match(input,COMMA,FOLLOW_COMMA_in_columns_list_name978); 
					pushFollow(FOLLOW_column_name_in_columns_list_name982);
					c2=column_name();
					state._fsp--;


								listColumn.add(c2);
							
					}
					break;

				default :
					break loop28;
				}
			}

			match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_columns_list_name990); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return listColumn;
	}
	// $ANTLR end "columns_list_name"



	// $ANTLR start "column_name"
	// org/argouml/language/sql/reveng/SqlServer.g:263:1: column_name returns [String cn] : name_with_esc ;
	public final String column_name() throws RecognitionException {
		String cn = null;


		String name_with_esc9 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:263:33: ( name_with_esc )
			// org/argouml/language/sql/reveng/SqlServer.g:264:2: name_with_esc
			{
			pushFollow(FOLLOW_name_with_esc_in_column_name1005);
			name_with_esc9=name_with_esc();
			state._fsp--;

			cn = name_with_esc9;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return cn;
	}
	// $ANTLR end "column_name"



	// $ANTLR start "table_name"
	// org/argouml/language/sql/reveng/SqlServer.g:267:1: table_name returns [String name] : name_with_esc ;
	public final String table_name() throws RecognitionException {
		String name = null;


		String name_with_esc10 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:267:34: ( name_with_esc )
			// org/argouml/language/sql/reveng/SqlServer.g:268:5: name_with_esc
			{
			pushFollow(FOLLOW_name_with_esc_in_table_name1028);
			name_with_esc10=name_with_esc();
			state._fsp--;

			name = name_with_esc10;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
	// $ANTLR end "table_name"



	// $ANTLR start "data_type_def"
	// org/argouml/language/sql/reveng/SqlServer.g:271:1: data_type_def[ColumnDefinition col] : data_type ( data_length )? ( 'NOT' 'NULL' | 'NULL' )? ( 'DEFAULT' default_statement[col] )? ;
	public final void data_type_def(ColumnDefinition col) throws RecognitionException {
		String data_type11 =null;
		ParserRuleReturnScope data_length12 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:271:38: ( data_type ( data_length )? ( 'NOT' 'NULL' | 'NULL' )? ( 'DEFAULT' default_statement[col] )? )
			// org/argouml/language/sql/reveng/SqlServer.g:272:5: data_type ( data_length )? ( 'NOT' 'NULL' | 'NULL' )? ( 'DEFAULT' default_statement[col] )?
			{
			pushFollow(FOLLOW_data_type_in_data_type_def1045);
			data_type11=data_type();
			state._fsp--;

			col.setDatatype(data_type11);
			// org/argouml/language/sql/reveng/SqlServer.g:273:6: ( data_length )?
			int alt29=2;
			int LA29_0 = input.LA(1);
			if ( (LA29_0==LEFT_PAREN) ) {
				alt29=1;
			}
			switch (alt29) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:273:7: data_length
					{
					pushFollow(FOLLOW_data_length_in_data_type_def1056);
					data_length12=data_length();
					state._fsp--;

					}
					break;

			}


			    		col.setLength((data_length12!=null?((SqlServerParser.data_length_return)data_length12).len:null));
			    		col.setNbDecimal((data_length12!=null?((SqlServerParser.data_length_return)data_length12).decimal:null));//can be null
			    	
			// org/argouml/language/sql/reveng/SqlServer.g:277:6: ( 'NOT' 'NULL' | 'NULL' )?
			int alt30=3;
			int LA30_0 = input.LA(1);
			if ( (LA30_0==49) ) {
				alt30=1;
			}
			else if ( (LA30_0==50) ) {
				alt30=2;
			}
			switch (alt30) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:277:8: 'NOT' 'NULL'
					{
					match(input,49,FOLLOW_49_in_data_type_def1069); 
					match(input,50,FOLLOW_50_in_data_type_def1071); 

					   	 	col.setNullable(false);
					   	 	
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:280:9: 'NULL'
					{
					match(input,50,FOLLOW_50_in_data_type_def1084); 

					   	 	col.setNullable(true);
					   	 	
					}
					break;

			}

			// org/argouml/language/sql/reveng/SqlServer.g:284:6: ( 'DEFAULT' default_statement[col] )?
			int alt31=2;
			int LA31_0 = input.LA(1);
			if ( (LA31_0==33) ) {
				alt31=1;
			}
			switch (alt31) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:284:8: 'DEFAULT' default_statement[col]
					{
					match(input,33,FOLLOW_33_in_data_type_def1103); 
					pushFollow(FOLLOW_default_statement_in_data_type_def1105);
					default_statement(col);
					state._fsp--;

					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "data_type_def"



	// $ANTLR start "default_statement"
	// org/argouml/language/sql/reveng/SqlServer.g:288:1: default_statement[ColumnDefinition col] : ( 'NULL' | '(' defaultValue[col] ')' );
	public final void default_statement(ColumnDefinition col) throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:288:41: ( 'NULL' | '(' defaultValue[col] ')' )
			int alt32=2;
			int LA32_0 = input.LA(1);
			if ( (LA32_0==50) ) {
				alt32=1;
			}
			else if ( (LA32_0==LEFT_PAREN) ) {
				alt32=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 32, 0, input);
				throw nvae;
			}

			switch (alt32) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:289:2: 'NULL'
					{
					match(input,50,FOLLOW_50_in_default_statement1125); 

							col.setDefaultValue("NULL");
						
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:293:4: '(' defaultValue[col] ')'
					{
					match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_default_statement1134); 
					pushFollow(FOLLOW_defaultValue_in_default_statement1136);
					defaultValue(col);
					state._fsp--;

					match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_default_statement1139); 
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "default_statement"



	// $ANTLR start "defaultValue"
	// org/argouml/language/sql/reveng/SqlServer.g:297:1: defaultValue[ColumnDefinition col] : ( text_quoted_keep | '(' NUMBER ')' );
	public final void defaultValue(ColumnDefinition col) throws RecognitionException {
		Token NUMBER14=null;
		String text_quoted_keep13 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:297:36: ( text_quoted_keep | '(' NUMBER ')' )
			int alt33=2;
			int LA33_0 = input.LA(1);
			if ( (LA33_0==QUOTED_TEXT) ) {
				alt33=1;
			}
			else if ( (LA33_0==LEFT_PAREN) ) {
				alt33=2;
			}

			else {
				NoViableAltException nvae =
					new NoViableAltException("", 33, 0, input);
				throw nvae;
			}

			switch (alt33) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:298:2: text_quoted_keep
					{
					pushFollow(FOLLOW_text_quoted_keep_in_defaultValue1152);
					text_quoted_keep13=text_quoted_keep();
					state._fsp--;


							col.setDefaultValue(text_quoted_keep13);
						
					}
					break;
				case 2 :
					// org/argouml/language/sql/reveng/SqlServer.g:302:2: '(' NUMBER ')'
					{
					match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defaultValue1160); 
					NUMBER14=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_defaultValue1162); 
					match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defaultValue1164); 
					 
							col.setDefaultValue((NUMBER14!=null?NUMBER14.getText():null));
						
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "defaultValue"


	public static class data_length_return extends ParserRuleReturnScope {
		public Integer len;
		public Integer decimal;
	};


	// $ANTLR start "data_length"
	// org/argouml/language/sql/reveng/SqlServer.g:307:1: data_length returns [Integer len, Integer decimal] : LEFT_PAREN i1= NUMBER ( COMMA i2= NUMBER )? RIGHT_PAREN ;
	public final SqlServerParser.data_length_return data_length() throws RecognitionException {
		SqlServerParser.data_length_return retval = new SqlServerParser.data_length_return();
		retval.start = input.LT(1);

		Token i1=null;
		Token i2=null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:307:52: ( LEFT_PAREN i1= NUMBER ( COMMA i2= NUMBER )? RIGHT_PAREN )
			// org/argouml/language/sql/reveng/SqlServer.g:308:6: LEFT_PAREN i1= NUMBER ( COMMA i2= NUMBER )? RIGHT_PAREN
			{
			match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_data_length1184); 
			i1=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_data_length1188); 
			// org/argouml/language/sql/reveng/SqlServer.g:308:27: ( COMMA i2= NUMBER )?
			int alt34=2;
			int LA34_0 = input.LA(1);
			if ( (LA34_0==COMMA) ) {
				alt34=1;
			}
			switch (alt34) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:308:28: COMMA i2= NUMBER
					{
					match(input,COMMA,FOLLOW_COMMA_in_data_length1191); 
					i2=(Token)match(input,NUMBER,FOLLOW_NUMBER_in_data_length1195); 
					retval.decimal = Integer.valueOf((i2!=null?i2.getText():null));
					}
					break;

			}

			match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_data_length1202); 
			retval.len = Integer.valueOf((i1!=null?i1.getText():null));
			}

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

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
	// $ANTLR end "data_length"



	// $ANTLR start "text_quoted"
	// org/argouml/language/sql/reveng/SqlServer.g:311:1: text_quoted returns [String value] : QUOTED_TEXT ;
	public final String text_quoted() throws RecognitionException {
		String value = null;


		Token QUOTED_TEXT15=null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:311:36: ( QUOTED_TEXT )
			// org/argouml/language/sql/reveng/SqlServer.g:312:2: QUOTED_TEXT
			{

					int iStartToken = input.LT(1).getTokenIndex();
				
			QUOTED_TEXT15=(Token)match(input,QUOTED_TEXT,FOLLOW_QUOTED_TEXT_in_text_quoted1223); 

					value = (QUOTED_TEXT15!=null?QUOTED_TEXT15.getText():null);
					value = value.substring(1);
					value = value.substring(0, value.length() -1 );
					value = value.replaceAll("''","'");
				
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return value;
	}
	// $ANTLR end "text_quoted"



	// $ANTLR start "text_quoted_keep"
	// org/argouml/language/sql/reveng/SqlServer.g:324:1: text_quoted_keep returns [String value] : QUOTED_TEXT ;
	public final String text_quoted_keep() throws RecognitionException {
		String value = null;


		Token QUOTED_TEXT16=null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:324:41: ( QUOTED_TEXT )
			// org/argouml/language/sql/reveng/SqlServer.g:325:2: QUOTED_TEXT
			{

					int iStartToken = input.LT(1).getTokenIndex();
				
			QUOTED_TEXT16=(Token)match(input,QUOTED_TEXT,FOLLOW_QUOTED_TEXT_in_text_quoted_keep1246); 

					value = (QUOTED_TEXT16!=null?QUOTED_TEXT16.getText():null);
				
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return value;
	}
	// $ANTLR end "text_quoted_keep"



	// $ANTLR start "schema"
	// org/argouml/language/sql/reveng/SqlServer.g:334:1: schema : ID ;
	public final void schema() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:334:8: ( ID )
			// org/argouml/language/sql/reveng/SqlServer.g:334:10: ID
			{
			match(input,ID,FOLLOW_ID_in_schema1258); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "schema"



	// $ANTLR start "table"
	// org/argouml/language/sql/reveng/SqlServer.g:335:1: table : ID ;
	public final void table() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:335:7: ( ID )
			// org/argouml/language/sql/reveng/SqlServer.g:335:9: ID
			{
			match(input,ID,FOLLOW_ID_in_table1265); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "table"



	// $ANTLR start "data_type"
	// org/argouml/language/sql/reveng/SqlServer.g:337:1: data_type returns [String name] : name_with_esc ;
	public final String data_type() throws RecognitionException {
		String name = null;


		String name_with_esc17 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:337:33: ( name_with_esc )
			// org/argouml/language/sql/reveng/SqlServer.g:338:2: name_with_esc
			{
			pushFollow(FOLLOW_name_with_esc_in_data_type1279);
			name_with_esc17=name_with_esc();
			state._fsp--;


			 	name = name_with_esc17; 
			 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
	// $ANTLR end "data_type"



	// $ANTLR start "index_name"
	// org/argouml/language/sql/reveng/SqlServer.g:342:1: index_name returns [String name] : ( LEFT_PAREN )? name_with_esc ( RIGHT_PAREN )? ;
	public final String index_name() throws RecognitionException {
		String name = null;


		String name_with_esc18 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:342:34: ( ( LEFT_PAREN )? name_with_esc ( RIGHT_PAREN )? )
			// org/argouml/language/sql/reveng/SqlServer.g:343:2: ( LEFT_PAREN )? name_with_esc ( RIGHT_PAREN )?
			{
			// org/argouml/language/sql/reveng/SqlServer.g:343:2: ( LEFT_PAREN )?
			int alt35=2;
			int LA35_0 = input.LA(1);
			if ( (LA35_0==LEFT_PAREN) ) {
				alt35=1;
			}
			switch (alt35) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:343:3: LEFT_PAREN
					{
					match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_index_name1295); 
					}
					break;

			}

			pushFollow(FOLLOW_name_with_esc_in_index_name1299);
			name_with_esc18=name_with_esc();
			state._fsp--;

			name = name_with_esc18; 
			// org/argouml/language/sql/reveng/SqlServer.g:343:62: ( RIGHT_PAREN )?
			int alt36=2;
			int LA36_0 = input.LA(1);
			if ( (LA36_0==RIGHT_PAREN) ) {
				alt36=1;
			}
			switch (alt36) {
				case 1 :
					// org/argouml/language/sql/reveng/SqlServer.g:343:63: RIGHT_PAREN
					{
					match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_index_name1304); 
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
	// $ANTLR end "index_name"



	// $ANTLR start "index_type"
	// org/argouml/language/sql/reveng/SqlServer.g:345:1: index_type : ( 'BTREE' | 'HASH' );
	public final void index_type() throws RecognitionException {
		try {
			// org/argouml/language/sql/reveng/SqlServer.g:345:12: ( 'BTREE' | 'HASH' )
			// org/argouml/language/sql/reveng/SqlServer.g:
			{
			if ( input.LA(1)==26||input.LA(1)==41 ) {
				input.consume();
				state.errorRecovery=false;
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
	}
	// $ANTLR end "index_type"



	// $ANTLR start "symbol"
	// org/argouml/language/sql/reveng/SqlServer.g:347:1: symbol returns [String name] : name_with_esc ;
	public final String symbol() throws RecognitionException {
		String name = null;


		String name_with_esc19 =null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:347:30: ( name_with_esc )
			// org/argouml/language/sql/reveng/SqlServer.g:348:2: name_with_esc
			{
			pushFollow(FOLLOW_name_with_esc_in_symbol1333);
			name_with_esc19=name_with_esc();
			state._fsp--;

			name = name_with_esc19; 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
	// $ANTLR end "symbol"



	// $ANTLR start "name_with_esc"
	// org/argouml/language/sql/reveng/SqlServer.g:351:1: name_with_esc returns [String name] : '[' ID ']' ;
	public final String name_with_esc() throws RecognitionException {
		String name = null;


		Token ID20=null;

		try {
			// org/argouml/language/sql/reveng/SqlServer.g:351:37: ( '[' ID ']' )
			// org/argouml/language/sql/reveng/SqlServer.g:352:2: '[' ID ']'
			{
			match(input,68,FOLLOW_68_in_name_with_esc1351); 
			ID20=(Token)match(input,ID,FOLLOW_ID_in_name_with_esc1353); 
			match(input,69,FOLLOW_69_in_name_with_esc1355); 
			name = (ID20!=null?ID20.getText():null); 
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
	// $ANTLR end "name_with_esc"

	// Delegated rules



	public static final BitSet FOLLOW_66_in_dump_read55 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_name_with_esc_in_dump_read57 = new BitSet(new long[]{0x2000010080404402L});
	public static final BitSet FOLLOW_instr_in_dump_read64 = new BitSet(new long[]{0x2000010080404402L});
	public static final BitSet FOLLOW_dumpComment_in_instr84 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_40_in_instr90 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_set_instr_in_instr96 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_create_table_statement_in_instr101 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_alter_table_statement_in_instr106 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_61_in_set_instr118 = new BitSet(new long[]{0x0200000001800000L});
	public static final BitSet FOLLOW_set_in_set_instr121 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_set_instr143 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_SL_COMMENT_in_dumpComment164 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_ML_COMMENT_in_dumpComment169 = new BitSet(new long[]{0x0000000000010002L});
	public static final BitSet FOLLOW_16_in_dumpComment172 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_31_in_create_table_statement186 = new BitSet(new long[]{0x8000000000000000L});
	public static final BitSet FOLLOW_63_in_create_table_statement188 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_name_with_esc_in_create_table_statement193 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_DOT_in_create_table_statement195 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_table_name_in_create_table_statement197 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_create_definition_list_in_create_table_statement221 = new BitSet(new long[]{0x0010000000000000L});
	public static final BitSet FOLLOW_table_store_in_create_table_statement237 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_22_in_alter_table_statement248 = new BitSet(new long[]{0x8000000000000000L});
	public static final BitSet FOLLOW_63_in_alter_table_statement250 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_name_with_esc_in_alter_table_statement254 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_DOT_in_alter_table_statement256 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_table_name_in_alter_table_statement258 = new BitSet(new long[]{0x0000000010080000L,0x0000000000000008L});
	public static final BitSet FOLLOW_67_in_alter_table_statement265 = new BitSet(new long[]{0x0000000010000000L});
	public static final BitSet FOLLOW_28_in_alter_table_statement267 = new BitSet(new long[]{0x0000000010080000L});
	public static final BitSet FOLLOW_19_in_alter_table_statement280 = new BitSet(new long[]{0x0100004240000000L,0x0000000000000001L});
	public static final BitSet FOLLOW_constraint_def_in_alter_table_statement282 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_28_in_alter_table_statement289 = new BitSet(new long[]{0x0000000040000000L});
	public static final BitSet FOLLOW_30_in_alter_table_statement291 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000010L});
	public static final BitSet FOLLOW_symbol_in_alter_table_statement294 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_create_definition_list317 = new BitSet(new long[]{0x0100004240000000L,0x0000000000000011L});
	public static final BitSet FOLLOW_create_definition_in_create_definition_list319 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_COMMA_in_create_definition_list323 = new BitSet(new long[]{0x0100004240000000L,0x0000000000000011L});
	public static final BitSet FOLLOW_create_definition_in_create_definition_list325 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_create_definition_list332 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_misc_store_in_table_store344 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_52_in_misc_store356 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_68_in_misc_store364 = new BitSet(new long[]{0x0100000000000000L});
	public static final BitSet FOLLOW_56_in_misc_store366 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
	public static final BitSet FOLLOW_69_in_misc_store368 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_constraint_def_in_create_definition389 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_column_name_in_create_definition411 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_data_type_def_in_create_definition415 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_30_in_constraint_def445 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_symbol_in_constraint_def447 = new BitSet(new long[]{0x0100004200000000L,0x0000000000000001L});
	public static final BitSet FOLLOW_constraint_unique_in_constraint_def470 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_constraint_fk_in_constraint_def477 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_constraint_pk_in_constraint_def484 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_constraint_df_in_constraint_def491 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_33_in_constraint_df518 = new BitSet(new long[]{0x0004000000000100L});
	public static final BitSet FOLLOW_default_statement_in_constraint_df520 = new BitSet(new long[]{0x0000002000000000L});
	public static final BitSet FOLLOW_37_in_constraint_df524 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_column_name_in_constraint_df526 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_64_in_constraint_unique543 = new BitSet(new long[]{0x00001A0004000100L,0x0000000000000010L});
	public static final BitSet FOLLOW_index_name_in_constraint_unique555 = new BitSet(new long[]{0x0000020004000100L});
	public static final BitSet FOLLOW_index_type_in_constraint_unique560 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_columns_list_name_in_constraint_unique565 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_38_in_constraint_fk576 = new BitSet(new long[]{0x0000100000000000L});
	public static final BitSet FOLLOW_44_in_constraint_fk578 = new BitSet(new long[]{0x0000000000000100L,0x0000000000000010L});
	public static final BitSet FOLLOW_symbol_in_constraint_fk581 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_columns_list_name_in_constraint_fk589 = new BitSet(new long[]{0x0400000000000000L});
	public static final BitSet FOLLOW_reference_definition_in_constraint_fk595 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_56_in_constraint_pk606 = new BitSet(new long[]{0x0000100000000000L});
	public static final BitSet FOLLOW_44_in_constraint_pk608 = new BitSet(new long[]{0x0000800020000100L});
	public static final BitSet FOLLOW_columns_list_name_order_in_constraint_pk625 = new BitSet(new long[]{0x0010000000000002L,0x0000000000000008L});
	public static final BitSet FOLLOW_pk_with_option_in_constraint_pk629 = new BitSet(new long[]{0x0010000000000002L});
	public static final BitSet FOLLOW_misc_store_in_constraint_pk635 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_67_in_pk_with_option647 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_pk_with_option649 = new BitSet(new long[]{0x4020041100300000L});
	public static final BitSet FOLLOW_index_option_in_pk_with_option651 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_COMMA_in_pk_with_option654 = new BitSet(new long[]{0x4020041100300000L});
	public static final BitSet FOLLOW_index_option_in_pk_with_option656 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_pk_with_option660 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_53_in_index_option670 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option672 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_index_option674 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_36_in_index_option687 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option690 = new BitSet(new long[]{0x0000000000001880L});
	public static final BitSet FOLLOW_ID_in_index_option694 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_NUMBER_in_index_option698 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_text_quoted_in_index_option702 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_42_in_index_option710 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option712 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_index_option714 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_62_in_index_option727 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option729 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_index_option731 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_21_in_index_option744 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option746 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_index_option748 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_20_in_index_option761 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option763 = new BitSet(new long[]{0x0018000000000000L});
	public static final BitSet FOLLOW_set_in_index_option765 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_32_in_index_option778 = new BitSet(new long[]{0x0000000000020000L});
	public static final BitSet FOLLOW_17_in_index_option780 = new BitSet(new long[]{0x1041000000000000L});
	public static final BitSet FOLLOW_set_in_index_option782 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_58_in_reference_definition806 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_name_with_esc_in_reference_definition810 = new BitSet(new long[]{0x0000000000000040L});
	public static final BitSet FOLLOW_DOT_in_reference_definition812 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_table_name_in_reference_definition814 = new BitSet(new long[]{0x0000000000000100L});
	public static final BitSet FOLLOW_columns_list_name_in_reference_definition820 = new BitSet(new long[]{0x0010200000000002L});
	public static final BitSet FOLLOW_45_in_reference_definition829 = new BitSet(new long[]{0x0080008000000000L});
	public static final BitSet FOLLOW_set_in_reference_definition831 = new BitSet(new long[]{0x0010000000000002L});
	public static final BitSet FOLLOW_52_in_reference_definition843 = new BitSet(new long[]{0x0000000400000000L,0x0000000000000002L});
	public static final BitSet FOLLOW_set_in_reference_definition845 = new BitSet(new long[]{0x2800400008000000L});
	public static final BitSet FOLLOW_reference_option_in_reference_definition853 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_59_in_reference_option866 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_27_in_reference_option870 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_61_in_reference_option874 = new BitSet(new long[]{0x0004000000000000L});
	public static final BitSet FOLLOW_50_in_reference_option876 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_46_in_reference_option880 = new BitSet(new long[]{0x0000000000040000L});
	public static final BitSet FOLLOW_18_in_reference_option882 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_61_in_reference_option886 = new BitSet(new long[]{0x0000000200000000L});
	public static final BitSet FOLLOW_33_in_reference_option888 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_columns_list_name_order902 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_column_name_in_columns_list_name_order906 = new BitSet(new long[]{0x0000000802002010L});
	public static final BitSet FOLLOW_COMMA_in_columns_list_name_order925 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_column_name_in_columns_list_name_order929 = new BitSet(new long[]{0x0000000802002010L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_columns_list_name_order945 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_columns_list_name962 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_column_name_in_columns_list_name966 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_COMMA_in_columns_list_name978 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_column_name_in_columns_list_name982 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_columns_list_name990 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_name_with_esc_in_column_name1005 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_name_with_esc_in_table_name1028 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_data_type_in_data_type_def1045 = new BitSet(new long[]{0x0006000200000102L});
	public static final BitSet FOLLOW_data_length_in_data_type_def1056 = new BitSet(new long[]{0x0006000200000002L});
	public static final BitSet FOLLOW_49_in_data_type_def1069 = new BitSet(new long[]{0x0004000000000000L});
	public static final BitSet FOLLOW_50_in_data_type_def1071 = new BitSet(new long[]{0x0000000200000002L});
	public static final BitSet FOLLOW_50_in_data_type_def1084 = new BitSet(new long[]{0x0000000200000002L});
	public static final BitSet FOLLOW_33_in_data_type_def1103 = new BitSet(new long[]{0x0004000000000100L});
	public static final BitSet FOLLOW_default_statement_in_data_type_def1105 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_50_in_default_statement1125 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_default_statement1134 = new BitSet(new long[]{0x0000000000001100L});
	public static final BitSet FOLLOW_defaultValue_in_default_statement1136 = new BitSet(new long[]{0x0000000000002000L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_default_statement1139 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_text_quoted_keep_in_defaultValue1152 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_defaultValue1160 = new BitSet(new long[]{0x0000000000000800L});
	public static final BitSet FOLLOW_NUMBER_in_defaultValue1162 = new BitSet(new long[]{0x0000000000002000L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_defaultValue1164 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_data_length1184 = new BitSet(new long[]{0x0000000000000800L});
	public static final BitSet FOLLOW_NUMBER_in_data_length1188 = new BitSet(new long[]{0x0000000000002010L});
	public static final BitSet FOLLOW_COMMA_in_data_length1191 = new BitSet(new long[]{0x0000000000000800L});
	public static final BitSet FOLLOW_NUMBER_in_data_length1195 = new BitSet(new long[]{0x0000000000002000L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_data_length1202 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_QUOTED_TEXT_in_text_quoted1223 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_QUOTED_TEXT_in_text_quoted_keep1246 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_ID_in_schema1258 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_ID_in_table1265 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_name_with_esc_in_data_type1279 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_LEFT_PAREN_in_index_name1295 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000010L});
	public static final BitSet FOLLOW_name_with_esc_in_index_name1299 = new BitSet(new long[]{0x0000000000002002L});
	public static final BitSet FOLLOW_RIGHT_PAREN_in_index_name1304 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_name_with_esc_in_symbol1333 = new BitSet(new long[]{0x0000000000000002L});
	public static final BitSet FOLLOW_68_in_name_with_esc1351 = new BitSet(new long[]{0x0000000000000080L});
	public static final BitSet FOLLOW_ID_in_name_with_esc1353 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000020L});
	public static final BitSet FOLLOW_69_in_name_with_esc1355 = new BitSet(new long[]{0x0000000000000002L});
}