public final EObject ruleGeneratedMetamodel() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_2=null;
        Token otherlv_3=null;
        AntlrDatatypeRuleToken lv_name_1_0 = null;

        AntlrDatatypeRuleToken lv_alias_4_0 = null;



        	enterRule();

        try {
            // InternalXtext.g:392:2: ( (otherlv_0= 'generate' ( (lv_name_1_0= ruleValidID ) ) ( (otherlv_2= RULE_STRING ) ) (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )? ) )
            // InternalXtext.g:393:2: (otherlv_0= 'generate' ( (lv_name_1_0= ruleValidID ) ) ( (otherlv_2= RULE_STRING ) ) (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )? )
            {
            // InternalXtext.g:393:2: (otherlv_0= 'generate' ( (lv_name_1_0= ruleValidID ) ) ( (otherlv_2= RULE_STRING ) ) (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )? )
            // InternalXtext.g:394:3: otherlv_0= 'generate' ( (lv_name_1_0= ruleValidID ) ) ( (otherlv_2= RULE_STRING ) ) (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )?
            {
            otherlv_0=(Token)match(input,18,FollowSets000.FOLLOW_3); 

            			newLeafNode(otherlv_0, grammarAccess.getGeneratedMetamodelAccess().getGenerateKeyword_0());
            		
            // InternalXtext.g:398:3: ( (lv_name_1_0= ruleValidID ) )
            // InternalXtext.g:399:4: (lv_name_1_0= ruleValidID )
            {
            // InternalXtext.g:399:4: (lv_name_1_0= ruleValidID )
            // InternalXtext.g:400:5: lv_name_1_0= ruleValidID
            {

            					newCompositeNode(grammarAccess.getGeneratedMetamodelAccess().getNameValidIDParserRuleCall_1_0());
            				
            pushFollow(FollowSets000.FOLLOW_11);
            lv_name_1_0=ruleValidID();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getGeneratedMetamodelRule());
            					}
            					set(
            						current,
            						"name",
            						lv_name_1_0,
            						"org.eclipse.xtext.Xtext.ValidID");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            // InternalXtext.g:417:3: ( (otherlv_2= RULE_STRING ) )
            // InternalXtext.g:418:4: (otherlv_2= RULE_STRING )
            {
            // InternalXtext.g:418:4: (otherlv_2= RULE_STRING )
            // InternalXtext.g:419:5: otherlv_2= RULE_STRING
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getGeneratedMetamodelRule());
            					}
            				
            otherlv_2=(Token)match(input,RULE_STRING,FollowSets000.FOLLOW_12); 

            					newLeafNode(otherlv_2, grammarAccess.getGeneratedMetamodelAccess().getEPackageEPackageCrossReference_2_0());
            				

            }


            }

            // InternalXtext.g:430:3: (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==19) ) {
                alt11=1;
            }
            switch (alt11) {
                case 1 :
                    // InternalXtext.g:431:4: otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) )
                    {
                    otherlv_3=(Token)match(input,19,FollowSets000.FOLLOW_3); 

                    				newLeafNode(otherlv_3, grammarAccess.getGeneratedMetamodelAccess().getAsKeyword_3_0());
                    			
                    // InternalXtext.g:435:4: ( (lv_alias_4_0= ruleValidID ) )
                    // InternalXtext.g:436:5: (lv_alias_4_0= ruleValidID )
                    {
                    // InternalXtext.g:436:5: (lv_alias_4_0= ruleValidID )
                    // InternalXtext.g:437:6: lv_alias_4_0= ruleValidID
                    {

                    						newCompositeNode(grammarAccess.getGeneratedMetamodelAccess().getAliasValidIDParserRuleCall_3_1_0());
                    					
                    pushFollow(FollowSets000.FOLLOW_2);
                    lv_alias_4_0=ruleValidID();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getGeneratedMetamodelRule());
                    						}
                    						set(
                    							current,
                    							"alias",
                    							lv_alias_4_0,
                    							"org.eclipse.xtext.Xtext.ValidID");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }


                    }
                    break;

            }


            }


            }


            	leaveRule();

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
public final EObject ruleGeneratedMetamodel ( ) throws RecognitionException { EObject current = null ; Token otherlv_0 = null ; Token otherlv_2 = null ; Token otherlv_3 = null ; AntlrDatatypeRuleToken lv_name_1_0 = null ; AntlrDatatypeRuleToken lv_alias_4_0 = null ; enterRule ( ) ; try { { { otherlv_0 = ( Token ) match ( input , 18 , FollowSets000 . FOLLOW_3 ) ; newLeafNode ( otherlv_0 , grammarAccess . getGeneratedMetamodelAccess ( ) . getGenerateKeyword_0 ( ) ) ; { { newCompositeNode ( grammarAccess . getGeneratedMetamodelAccess ( ) . getNameValidIDParserRuleCall_1_0 ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_11 ) ; lv_name_1_0 = ruleValidID ( ) ; state . _fsp -- ; if ( current == null ) { current = createModelElementForParent ( grammarAccess . getGeneratedMetamodelRule ( ) ) ; } set ( current , "name" , lv_name_1_0 , "org.eclipse.xtext.Xtext.ValidID" ) ; afterParserOrEnumRuleCall ( ) ; } } { { if ( current == null ) { current = createModelElement ( grammarAccess . getGeneratedMetamodelRule ( ) ) ; } otherlv_2 = ( Token ) match ( input , RULE_STRING , FollowSets000 . FOLLOW_12 ) ; newLeafNode ( otherlv_2 , grammarAccess . getGeneratedMetamodelAccess ( ) . getEPackageEPackageCrossReference_2_0 ( ) ) ; } } int alt11 = 2 ; int LA11_0 = input . LA ( 1 ) ; if ( ( LA11_0 == 19 ) ) { alt11 = 1 ; } switch ( alt11 ) { case 1 : { otherlv_3 = ( Token ) match ( input , 19 , FollowSets000 . FOLLOW_3 ) ; newLeafNode ( otherlv_3 , grammarAccess . getGeneratedMetamodelAccess ( ) . getAsKeyword_3_0 ( ) ) ; { { newCompositeNode ( grammarAccess . getGeneratedMetamodelAccess ( ) . getAliasValidIDParserRuleCall_3_1_0 ( ) ) ; pushFollow ( FollowSets000 . FOLLOW_2 ) ; lv_alias_4_0 = ruleValidID ( ) ; state . _fsp -- ; if ( current == null ) { current = createModelElementForParent ( grammarAccess . getGeneratedMetamodelRule ( ) ) ; } set ( current , "alias" , lv_alias_4_0 , "org.eclipse.xtext.Xtext.ValidID" ) ; afterParserOrEnumRuleCall ( ) ; } } } break ; } } } leaveRule ( ) ; } catch ( RecognitionException re ) { recover ( input , re ) ; appendSkippedTokens ( ) ; } finally { } return current ; }
InternalXtext.g:386:1: ruleGeneratedMetamodel returns [EObject current=null] : (otherlv_0= 'generate' ( (lv_name_1_0= ruleValidID ) ) ( (otherlv_2= RULE_STRING ) ) (otherlv_3= 'as' ( (lv_alias_4_0= ruleValidID ) ) )? ) ;