package io.sarl.lang.parser.antlr.internal;

import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
import io.sarl.lang.services.SARLGrammarAccess;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
@SuppressWarnings("all")
public class InternalSARLParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_ID", "RULE_RICH_TEXT", "RULE_RICH_TEXT_START", "RULE_RICH_TEXT_INBETWEEN", "RULE_COMMENT_RICH_TEXT_INBETWEEN", "RULE_RICH_TEXT_END", "RULE_COMMENT_RICH_TEXT_END", "RULE_HEX", "RULE_INT", "RULE_DECIMAL", "RULE_IDENTIFIER_START", "RULE_UNICODE_ESCAPE", "RULE_IDENTIFIER_PART", "RULE_HEX_DIGIT", "RULE_IN_RICH_STRING", "RULE_IDENTIFIER_PART_IMPL", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "';'", "'event'", "'<'", "','", "'>'", "'extends'", "'{'", "'}'", "'capacity'", "'agent'", "'behavior'", "'skill'", "'implements'", "'space'", "'artifact'", "'class'", "'interface'", "'enum'", "'annotation'", "'extension'", "':'", "'='", "'new'", "'('", "')'", "'throws'", "'with'", "'fires'", "'on'", "'['", "']'", "'uses'", "'requires'", "'*'", "'break'", "'continue'", "'assert'", "'assume'", "'as'", "'var'", "'val'", "'for'", "'switch'", "'default'", "'/'", "'%'", "'**'", "'!'", "'-'", "'+'", "'=>'", "'.'", "'public'", "'private'", "'protected'", "'abstract'", "'static'", "'dispatch'", "'final'", "'strictfp'", "'native'", "'volatile'", "'synchronized'", "'transient'", "'def'", "'override'", "'create'", "'AFTER'", "'BEFORE'", "'SEPARATOR'", "'import'", "'?'", "'try'", "'finally'", "'|'", "'case'", "'FOR'", "'ENDFOR'", "'IF'", "'ELSE'", "'ENDIF'", "'ELSEIF'", "'@'", "'#'", "'+='", "'-='", "'*='", "'/='", "'%='", "'>='", "'||'", "'&&'", "'=='", "'!='", "'==='", "'!=='", "'instanceof'", "'->'", "'..<'", "'..'", "'<>'", "'?:'", "'++'", "'--'", "'::'", "'?.'", "'if'", "'else'", "'while'", "'do'", "'super'", "'false'", "'true'", "'null'", "'typeof'", "'throw'", "'return'", "'catch'", "'&'"
    };
    public static final int T__144=144;
    public static final int T__143=143;
    public static final int RULE_HEX=12;
    public static final int T__50=50;
    public static final int T__140=140;
    public static final int T__142=142;
    public static final int T__141=141;
    public static final int T__59=59;
    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__51=51;
    public static final int T__137=137;
    public static final int T__52=52;
    public static final int T__136=136;
    public static final int T__53=53;
    public static final int T__139=139;
    public static final int T__54=54;
    public static final int T__138=138;
    public static final int T__133=133;
    public static final int T__132=132;
    public static final int T__60=60;
    public static final int T__135=135;
    public static final int T__61=61;
    public static final int T__134=134;
    public static final int RULE_ID=5;
    public static final int T__131=131;
    public static final int T__130=130;
    public static final int RULE_RICH_TEXT_START=7;
    public static final int RULE_INT=13;
    public static final int T__66=66;
    public static final int RULE_ML_COMMENT=21;
    public static final int T__67=67;
    public static final int T__129=129;
    public static final int T__68=68;
    public static final int T__69=69;
    public static final int T__62=62;
    public static final int T__126=126;
    public static final int T__63=63;
    public static final int T__125=125;
    public static final int T__64=64;
    public static final int T__128=128;
    public static final int T__65=65;
    public static final int T__127=127;
    public static final int RULE_UNICODE_ESCAPE=16;
    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 RULE_IDENTIFIER_PART=17;
    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__30=30;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int T__48=48;
    public static final int T__49=49;
    public static final int T__44=44;
    public static final int T__45=45;
    public static final int RULE_HEX_DIGIT=18;
    public static final int T__46=46;
    public static final int T__47=47;
    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__91=91;
    public static final int T__100=100;
    public static final int T__92=92;
    public static final int T__93=93;
    public static final int T__102=102;
    public static final int RULE_COMMENT_RICH_TEXT_END=11;
    public static final int T__94=94;
    public static final int T__101=101;
    public static final int T__90=90;
    public static final int RULE_IDENTIFIER_START=15;
    public static final int T__99=99;
    public static final int T__95=95;
    public static final int T__96=96;
    public static final int T__97=97;
    public static final int T__98=98;
    public static final int RULE_DECIMAL=14;
    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__25=25;
    public static final int T__122=122;
    public static final int T__70=70;
    public static final int T__121=121;
    public static final int T__71=71;
    public static final int T__124=124;
    public static final int T__72=72;
    public static final int T__123=123;
    public static final int T__120=120;
    public static final int RULE_STRING=4;
    public static final int RULE_SL_COMMENT=22;
    public static final int RULE_IN_RICH_STRING=19;
    public static final int T__77=77;
    public static final int T__119=119;
    public static final int RULE_COMMENT_RICH_TEXT_INBETWEEN=9;
    public static final int T__78=78;
    public static final int T__118=118;
    public static final int T__79=79;
    public static final int T__73=73;
    public static final int T__115=115;
    public static final int EOF=-1;
    public static final int T__74=74;
    public static final int T__114=114;
    public static final int T__75=75;
    public static final int T__117=117;
    public static final int T__76=76;
    public static final int T__116=116;
    public static final int T__80=80;
    public static final int T__111=111;
    public static final int T__81=81;
    public static final int T__110=110;
    public static final int T__82=82;
    public static final int T__113=113;
    public static final int RULE_RICH_TEXT=6;
    public static final int T__83=83;
    public static final int T__112=112;
    public static final int RULE_WS=23;
    public static final int RULE_RICH_TEXT_END=10;
    public static final int RULE_ANY_OTHER=24;
    public static final int RULE_RICH_TEXT_INBETWEEN=8;
    public static final int RULE_IDENTIFIER_PART_IMPL=20;
    public static final int T__88=88;
    public static final int T__108=108;
    public static final int T__89=89;
    public static final int T__107=107;
    public static final int T__109=109;
    public static final int T__84=84;
    public static final int T__104=104;
    public static final int T__85=85;
    public static final int T__103=103;
    public static final int T__86=86;
    public static final int T__106=106;
    public static final int T__87=87;
    public static final int T__105=105;

    // delegates
    // delegators


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

    public String[] getTokenNames() { return InternalSARLParser.tokenNames; }
    public String getGrammarFileName() { return "InternalSARL.g"; }



     	private SARLGrammarAccess grammarAccess;

        public InternalSARLParser(TokenStream input, SARLGrammarAccess grammarAccess) {
            this(input);
            this.grammarAccess = grammarAccess;
            registerRules(grammarAccess.getGrammar());
        }

        @Override
        protected String getFirstRuleName() {
        	return "SarlScript";
       	}

       	@Override
       	protected SARLGrammarAccess getGrammarAccess() {
       		return grammarAccess;
       	}




    // $ANTLR start "entryRuleSarlScript"
    // InternalSARL.g:84:1: entryRuleSarlScript returns [EObject current=null] : iv_ruleSarlScript= ruleSarlScript EOF ;
    public final EObject entryRuleSarlScript() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleSarlScript = null;


        try {
            // InternalSARL.g:84:51: (iv_ruleSarlScript= ruleSarlScript EOF )
            // InternalSARL.g:85:2: iv_ruleSarlScript= ruleSarlScript EOF
            {
            if ( state.backtracking==0 ) {
               newCompositeNode(grammarAccess.getSarlScriptRule()); 
            }
            pushFollow(FOLLOW_1);
            iv_ruleSarlScript=ruleSarlScript();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {
               current =iv_ruleSarlScript; 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return current;

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleSarlScript"


    // $ANTLR start "ruleSarlScript"
    // InternalSARL.g:91:1: ruleSarlScript returns [EObject current=null] : ( () (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )? ( (lv_importSection_4_0= ruleXImportSection ) )? ( (lv_xtendTypes_5_0= ruleType ) )* ) ;
    public final EObject ruleSarlScript() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;
        Token otherlv_3=null;
        AntlrDatatypeRuleToken lv_package_2_0 = null;

        EObject lv_importSection_4_0 = null;

        EObject lv_xtendTypes_5_0 = null;



        	enterRule();

        try {
            // InternalSARL.g:97:2: ( ( () (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )? ( (lv_importSection_4_0= ruleXImportSection ) )? ( (lv_xtendTypes_5_0= ruleType ) )* ) )
            // InternalSARL.g:98:2: ( () (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )? ( (lv_importSection_4_0= ruleXImportSection ) )? ( (lv_xtendTypes_5_0= ruleType ) )* )
            {
            // InternalSARL.g:98:2: ( () (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )? ( (lv_importSection_4_0= ruleXImportSection ) )? ( (lv_xtendTypes_5_0= ruleType ) )* )
            // InternalSARL.g:99:3: () (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )? ( (lv_importSection_4_0= ruleXImportSection ) )? ( (lv_xtendTypes_5_0= ruleType ) )*
            {
            // InternalSARL.g:99:3: ()
            // InternalSARL.g:100:4: 
            {
            if ( state.backtracking==0 ) {

              				current = forceCreateModelElement(
              					grammarAccess.getSarlScriptAccess().getSarlScriptAction_0(),
              					current);
              			
            }

            }

            // InternalSARL.g:106:3: (otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )? )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==25) ) {
                int LA2_1 = input.LA(2);

                if ( (LA2_1==RULE_ID||(LA2_1>=92 && LA2_1<=95)) ) {
                    alt2=1;
                }
                else if ( (LA2_1==44) ) {
                    int LA2_4 = input.LA(3);

                    if ( (LA2_4==EOF||(LA2_4>=25 && LA2_4<=27)||(LA2_4>=34 && LA2_4<=37)||(LA2_4>=39 && LA2_4<=43)||(LA2_4>=77 && LA2_4<=89)||LA2_4==96||LA2_4==108) ) {
                        alt2=1;
                    }
                    else if ( (LA2_4==44) ) {
                        int LA2_5 = input.LA(4);

                        if ( (LA2_5==RULE_ID||LA2_5==44||(LA2_5>=92 && LA2_5<=95)) ) {
                            alt2=1;
                        }
                    }
                }
            }
            switch (alt2) {
                case 1 :
                    // InternalSARL.g:107:4: otherlv_1= 'package' ( (lv_package_2_0= ruleQualifiedName ) ) (otherlv_3= ';' )?
                    {
                    otherlv_1=(Token)match(input,25,FOLLOW_3); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      				newLeafNode(otherlv_1, grammarAccess.getSarlScriptAccess().getPackageKeyword_1_0());
                      			
                    }
                    // InternalSARL.g:111:4: ( (lv_package_2_0= ruleQualifiedName ) )
                    // InternalSARL.g:112:5: (lv_package_2_0= ruleQualifiedName )
                    {
                    // InternalSARL.g:112:5: (lv_package_2_0= ruleQualifiedName )
                    // InternalSARL.g:113:6: lv_package_2_0= ruleQualifiedName
                    {
                    if ( state.backtracking==0 ) {

                      						newCompositeNode(grammarAccess.getSarlScriptAccess().getPackageQualifiedNameParserRuleCall_1_1_0());
                      					
                    }
                    pushFollow(FOLLOW_4);
                    lv_package_2_0=ruleQualifiedName();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      						if (current==null) {
                      							current = createModelElementForParent(grammarAccess.getSarlScriptRule());
                      						}
                      						set(
                      							current,
                      							"package",
                      							lv_package_2_0,
                      							"org.eclipse.xtext.xbase.Xbase.QualifiedName");
                      						afterParserOrEnumRuleCall();
                      					
                    }

                    }


                    }

                    // InternalSARL.g:130:4: (otherlv_3= ';' )?
                    int alt1=2;
                    int LA1_0 = input.LA(1);

                    if ( (LA1_0==26) ) {
                        alt1=1;
                    }
                    switch (alt1) {
                        case 1 :
                            // InternalSARL.g:131:5: otherlv_3= ';'
                            {
                            otherlv_3=(Token)match(input,26,FOLLOW_5); if (state.failed) return current;
                            if ( state.backtracking==0 ) {

                              					newLeafNode(otherlv_3, grammarAccess.getSarlScriptAccess().getSemicolonKeyword_1_2());
                              				
                            }

                            }
                            break;

                    }


                    }
                    break;

            }

            // InternalSARL.g:137:3: ( (lv_importSection_4_0= ruleXImportSection ) )?
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0==96) ) {
                alt3=1;
            }
            switch (alt3) {
                case 1 :
                    // InternalSARL.g:138:4: (lv_importSection_4_0= ruleXImportSection )
                    {
                    // InternalSARL.g:138:4: (lv_importSection_4_0= ruleXImportSection )
                    // InternalSARL.g:139:5: lv_importSection_4_0= ruleXImportSection
                    {
                    if ( state.backtracking==0 ) {

                      					newCompositeNode(grammarAccess.getSarlScriptAccess().getImportSectionXImportSectionParserRuleCall_2_0());
                      				
                    }
                    pushFollow(FOLLOW_6);
                    lv_importSection_4_0=ruleXImportSection();

                    state._fsp--;
                    if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      					if (current==null) {
                      						current = createModelElementForParent(grammarAccess.getSarlScriptRule());
                      					}
                      					set(
                      						current,
                      						"importSection",
                      						lv_importSection_4_0,
                      						"org.eclipse.xtext.xbase.Xtype.XImportSection");
                      					afterParserOrEnumRuleCall();
                      				
                    }

                    }


                    }
                    break;

            }

            // InternalSARL.g:156:3: ( (lv_xtendTypes_5_0= ruleType ) )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( (LA4_0==25||LA4_0==27||(LA4_0>=34 && LA4_0<=37)||(LA4_0>=39 && LA4_0<=44)||(LA4_0>=78 && LA4_0<=89)||LA4_0==108) ) {
                    alt4=1;
                }


                switch (alt4) {
            	case 1 :
            	    // InternalSARL.g:157:4: (lv_xtendTypes_5_0= ruleType )
            	    {
            	    // InternalSARL.g:157:4: (lv_xtendTypes_5_0= ruleType )
            	    // InternalSARL.g:158:5: lv_xtendTypes_5_0= ruleType
            	    {
            	    if ( state.backtracking==0 ) {

            	      					newCompositeNode(grammarAccess.getSarlScriptAccess().getXtendTypesTypeParserRuleCall_3_0());
            	      				
            	    }
            	    pushFollow(FOLLOW_6);
            	    lv_xtendTypes_5_0=ruleType();

            	    state._fsp--;
            	    if (state.failed) return current;
            	    if ( state.backtracking==0 ) {

            	      					if (current==null) {
            	      						current = createModelElementForParent(grammarAccess.getSarlScriptRule());
            	      					}
            	      					add(
            	      						current,
            	      						"xtendTypes",
            	      						lv_xtendTypes_5_0,
            	      						"io.sarl.lang.SARL.Type");
            	      					afterParserOrEnumRuleCall();
            	      				
            	    }

            	    }


            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
    // $ANTLR end "ruleSarlScript"


    // $ANTLR start "entryRuleType"
    // InternalSARL.g:179:1: entryRuleType returns [EObject current=null] : iv_ruleType= ruleType EOF ;
    public final EObject entryRuleType() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleType = null;


        try {
            // InternalSARL.g:179:45: (iv_ruleType= ruleType EOF )
            // InternalSARL.g:180:2: iv_ruleType= ruleType EOF
            {
            if ( state.backtracking==0 ) {
               newCompositeNode(grammarAccess.getTypeRule()); 
            }
            pushFollow(FOLLOW_1);
            iv_ruleType=ruleType();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {
               current =iv_ruleType; 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return current;

            }

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
    // $ANTLR end "entryRuleType"


    // $ANTLR start "ruleType"
    // InternalSARL.g:186:1: ruleType returns [EObject current=null] : ( () ( (lv_annotations_1_0= ruleXAnnotation ) )* ( ( () ( (lv_modifiers_3_0= ruleCommonModifier ) )* otherlv_4= 'event' ( (lv_name_5_0= ruleValidID ) ) (otherlv_6= '<' ( (lv_typeParameters_7_0= ruleJvmTypeParameter ) ) (otherlv_8= ',' ( (lv_typeParameters_9_0= ruleJvmTypeParameter ) ) )* otherlv_10= '>' )? (otherlv_11= 'extends' ( (lv_extends_12_0= ruleJvmParameterizedTypeReference ) ) )? (otherlv_13= '{' ( (lv_members_14_0= ruleEventMember ) )* otherlv_15= '}' )? ) | ( () ( (lv_modifiers_17_0= ruleCommonModifier ) )* otherlv_18= 'capacity' ( (lv_name_19_0= ruleValidID ) ) (otherlv_20= 'extends' ( (lv_extends_21_0= ruleJvmParameterizedTypeReference ) ) (otherlv_22= ',' ( (lv_extends_23_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_24= '{' ( (lv_members_25_0= ruleCapacityMember ) )* otherlv_26= '}' ) | ( () ( (lv_modifiers_28_0= ruleCommonModifier ) )* otherlv_29= 'agent' ( (lv_name_30_0= ruleValidID ) ) (otherlv_31= 'extends' ( (lv_extends_32_0= ruleJvmParameterizedTypeReference ) ) )? otherlv_33= '{' ( (lv_members_34_0= ruleAOPMember ) )* otherlv_35= '}' ) | ( () ( (lv_modifiers_37_0= ruleCommonModifier ) )* otherlv_38= 'behavior' ( (lv_name_39_0= ruleValidID ) ) (otherlv_40= 'extends' ( (lv_extends_41_0= ruleJvmParameterizedTypeReference ) ) )? otherlv_42= '{' ( (lv_members_43_0= ruleAOPMember ) )* otherlv_44= '}' ) | ( () ( (lv_modifiers_46_0= ruleCommonModifier ) )* otherlv_47= 'skill' ( (lv_name_48_0= ruleValidID ) ) ( ( ( ( ({...}? => ( ({...}? => (otherlv_50= 'extends' ( (lv_extends_51_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_52= 'implements' ( (lv_implements_53_0= ruleJvmParameterizedTypeReference ) ) (otherlv_54= ',' ( (lv_implements_55_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_56= '{' ( (lv_members_57_0= ruleAOPMember ) )* otherlv_58= '}' ) | ( () ( (lv_modifiers_60_0= ruleCommonModifier ) )* otherlv_61= 'space' ( (lv_name_62_0= ruleValidID ) ) otherlv_63= '{' otherlv_64= '}' ) | ( () ( (lv_modifiers_66_0= ruleCommonModifier ) )* otherlv_67= 'artifact' ( (lv_name_68_0= ruleValidID ) ) otherlv_69= '{' otherlv_70= '}' ) | ( () ( (lv_modifiers_72_0= ruleCommonModifier ) )* otherlv_73= 'class' ( (lv_name_74_0= ruleValidID ) ) (otherlv_75= '<' ( (lv_typeParameters_76_0= ruleJvmTypeParameter ) ) (otherlv_77= ',' ( (lv_typeParameters_78_0= ruleJvmTypeParameter ) ) )* otherlv_79= '>' )? ( ( ( ( ({...}? => ( ({...}? => (otherlv_81= 'extends' ( (lv_extends_82_0= ruleJvmParameterizedTypeReference ) ) ) ) ) ) | ({...}? => ( ({...}? => (otherlv_83= 'implements' ( (lv_implements_84_0= ruleJvmParameterizedTypeReference ) ) (otherlv_85= ',' ( (lv_implements_86_0= ruleJvmParameterizedTypeReference ) ) )* ) ) ) ) )* ) ) ) otherlv_87= '{' ( (lv_members_88_0= ruleMember ) )* otherlv_89= '}' ) | ( () ( (lv_modifiers_91_0= ruleCommonModifier ) )* otherlv_92= 'interface' ( (lv_name_93_0= ruleValidID ) ) (otherlv_94= '<' ( (lv_typeParameters_95_0= ruleJvmTypeParameter ) ) (otherlv_96= ',' ( (lv_typeParameters_97_0= ruleJvmTypeParameter ) ) )* otherlv_98= '>' )? (otherlv_99= 'extends' ( (lv_extends_100_0= ruleJvmParameterizedTypeReference ) ) (otherlv_101= ',' ( (lv_extends_102_0= ruleJvmParameterizedTypeReference ) ) )* )? otherlv_103= '{' ( (lv_members_104_0= ruleMember ) )* otherlv_105= '}' ) | ( () ( (lv_modifiers_107_0= ruleCommonModifier ) )* otherlv_108= 'enum' ( (lv_name_109_0= ruleValidID ) ) otherlv_110= '{' ( ( (lv_members_111_0= ruleXtendEnumLiteral ) ) (otherlv_112= ',' ( (lv_members_113_0= ruleXtendEnumLiteral ) ) )* )? (otherlv_114= ';' )? otherlv_115= '}' ) | ( () ( (lv_modifiers_117_0= ruleCommonModifier ) )* otherlv_118= 'annotation' ( (lv_name_119_0= ruleValidID ) ) otherlv_120= '{' ( (lv_members_121_0= ruleAnnotationField ) )* otherlv_122= '}' ) ) ) ;
    public final EObject ruleType() throws RecognitionException {
        EObject current = null;

        Token otherlv_4=null;
        Token otherlv_6=null;
        Token otherlv_8=null;
        Token otherlv_10=null;
        Token otherlv_11=null;
        Token otherlv_13=null;
        Token otherlv_15=null;
        Token otherlv_18=null;
        Token otherlv_20=null;
        Token otherlv_22=null;
        Token otherlv_24=null;
        Token otherlv_26=null;
        Token otherlv_29=null;
        Token otherlv_31=null;
        Token otherlv_33=null;
        Token otherlv_35=null;
        Token otherlv_38=null;
        Token otherlv_40=null;
        Token otherlv_42=null;
        Token otherlv_44=null;
        Token otherlv_47=null;
        Token otherlv_50=null;
        Token otherlv_52=null;
        Token otherlv_54=null;
        Token otherlv_56=null;
        Token otherlv_58=null;
        Token otherlv_61=null;
        Token otherlv_63=null;
        Token otherlv_64=null;
        Token otherlv_67=null;
        Token otherlv_69=null;
        Token otherlv_70=null;
        Token otherlv_73=null;
        Token otherlv_75=null;
        Token otherlv_77=null;
        Token otherlv_79=null;
        Token otherlv_81=null;
        Token otherlv_83=null;
        Token otherlv_85=null;
        Token otherlv_87=null;
        Token otherlv_89=null;
        Token otherlv_92=null;
        Token otherlv_94=null;
        Token otherlv_96=null;
        Token otherlv_98=null;
        Token otherlv_99=null;
        Token otherlv_101=null;
        Token otherlv_103=null;
        Token otherlv_105=null;
        Token otherlv_108=null;
        Token otherlv_110=null;
        Token otherlv_112=null;
        Token otherlv_114=null;
        Token otherlv_115=null;
        Token otherlv_118=null;
        Token otherlv_120=null;
        Token otherlv_122=null;
        EObject lv_annotations_1_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_3_0 = null;

        AntlrDatatypeRuleToken lv_name_5_0 = null;

        EObject lv_typeParameters_7_0 = null;

        EObject lv_typeParameters_9_0 = null;

        EObject lv_extends_12_0 = null;

        EObject lv_members_14_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_17_0 = null;

        AntlrDatatypeRuleToken lv_name_19_0 = null;

        EObject lv_extends_21_0 = null;

        EObject lv_extends_23_0 = null;

        EObject lv_members_25_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_28_0 = null;

        AntlrDatatypeRuleToken lv_name_30_0 = null;

        EObject lv_extends_32_0 = null;

        EObject lv_members_34_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_37_0 = null;

        AntlrDatatypeRuleToken lv_name_39_0 = null;

        EObject lv_extends_41_0 = null;

        EObject lv_members_43_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_46_0 = null;

        AntlrDatatypeRuleToken lv_name_48_0 = null;

        EObject lv_extends_51_0 = null;

        EObject lv_implements_53_0 = null;

        EObject lv_implements_55_0 = null;

        EObject lv_members_57_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_60_0 = null;

        AntlrDatatypeRuleToken lv_name_62_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_66_0 = null;

        AntlrDatatypeRuleToken lv_name_68_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_72_0 = null;

        AntlrDatatypeRuleToken lv_name_74_0 = null;

        EObject lv_typeParameters_76_0 = null;

        EObject lv_typeParameters_78_0 = null;

        EObject lv_extends_82_0 = null;

        EObject lv_implements_84_0 = null;

        EObject lv_implements_86_0 = null;

        EObject lv_members_88_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_91_0 = null;

        AntlrDatatypeRuleToken lv_name_93_0 = null;

        EObject lv_typeParameters_95_0 = null;

        EObject lv_typeParameters_97_0 = null;

        EObject lv_extends_100_0 = null;

        EObject lv_extends_102_0 = null;

        EObject lv_members_104_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_107_0 = null;

        AntlrDatatypeRuleToken lv_name_109_0 = null;

        EObject lv_members_111_0 = null;

        EObject lv_members_113_0 = null;

        AntlrDatatypeRuleToken lv_modifiers_117_0 = null;

        AntlrDatatypeRuleToken lv_name_119_0 = null;

        EObject lv_members_121_0 = null;



        	enterRule();

        try {
