package com.irtsaintexupery.xtext.pseim.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 com.irtsaintexupery.xtext.pseim.services.MappingGrammarAccess;



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

@SuppressWarnings("all")
public class InternalMappingParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'transform'", "'using'", "'{'", "'multiplicity'", "'components'", "'ports'", "'}'", "'->'", "','", "'-'", "'.'"
    };
    public static final int RULE_STRING=6;
    public static final int RULE_SL_COMMENT=8;
    public static final int T__19=19;
    public static final int T__15=15;
    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__11=11;
    public static final int T__12=12;
    public static final int T__13=13;
    public static final int T__14=14;
    public static final int EOF=-1;
    public static final int RULE_ID=4;
    public static final int RULE_WS=9;
    public static final int RULE_ANY_OTHER=10;
    public static final int RULE_INT=5;
    public static final int RULE_ML_COMMENT=7;
    public static final int T__20=20;
    public static final int T__21=21;

    // delegates
    // delegators


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

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



     	private MappingGrammarAccess grammarAccess;

        public InternalMappingParser(TokenStream input, MappingGrammarAccess grammarAccess) {
            this(input);
            this.grammarAccess = grammarAccess;
            registerRules(grammarAccess.getGrammar());
        }

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

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




    // $ANTLR start "entryRulePatternApplication"
    // InternalMapping.g:64:1: entryRulePatternApplication returns [EObject current=null] : iv_rulePatternApplication= rulePatternApplication EOF ;
    public final EObject entryRulePatternApplication() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePatternApplication = null;


        try {
            // InternalMapping.g:64:59: (iv_rulePatternApplication= rulePatternApplication EOF )
            // InternalMapping.g:65:2: iv_rulePatternApplication= rulePatternApplication EOF
            {
             newCompositeNode(grammarAccess.getPatternApplicationRule()); 
            pushFollow(FOLLOW_1);
            iv_rulePatternApplication=rulePatternApplication();

            state._fsp--;

             current =iv_rulePatternApplication; 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "rulePatternApplication"
    // InternalMapping.g:71:1: rulePatternApplication returns [EObject current=null] : (otherlv_0= 'transform' ( (otherlv_1= RULE_ID ) ) otherlv_2= 'using' ( (otherlv_3= RULE_ID ) ) otherlv_4= '{' (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )? (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )? (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )? otherlv_14= '}' ) ;
    public final EObject rulePatternApplication() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_1=null;
        Token otherlv_2=null;
        Token otherlv_3=null;
        Token otherlv_4=null;
        Token otherlv_5=null;
        Token otherlv_8=null;
        Token otherlv_11=null;
        Token otherlv_14=null;
        EObject lv_cardinalityValues_6_0 = null;

        EObject lv_cardinalityValues_7_0 = null;

        EObject lv_modelElement_9_0 = null;

        EObject lv_modelElement_10_0 = null;

        EObject lv_portMapping_12_0 = null;

        EObject lv_portMapping_13_0 = null;



        	enterRule();

        try {
            // InternalMapping.g:77:2: ( (otherlv_0= 'transform' ( (otherlv_1= RULE_ID ) ) otherlv_2= 'using' ( (otherlv_3= RULE_ID ) ) otherlv_4= '{' (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )? (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )? (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )? otherlv_14= '}' ) )
            // InternalMapping.g:78:2: (otherlv_0= 'transform' ( (otherlv_1= RULE_ID ) ) otherlv_2= 'using' ( (otherlv_3= RULE_ID ) ) otherlv_4= '{' (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )? (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )? (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )? otherlv_14= '}' )
            {
            // InternalMapping.g:78:2: (otherlv_0= 'transform' ( (otherlv_1= RULE_ID ) ) otherlv_2= 'using' ( (otherlv_3= RULE_ID ) ) otherlv_4= '{' (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )? (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )? (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )? otherlv_14= '}' )
            // InternalMapping.g:79:3: otherlv_0= 'transform' ( (otherlv_1= RULE_ID ) ) otherlv_2= 'using' ( (otherlv_3= RULE_ID ) ) otherlv_4= '{' (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )? (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )? (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )? otherlv_14= '}'
            {
            otherlv_0=(Token)match(input,11,FOLLOW_3); 

            			newLeafNode(otherlv_0, grammarAccess.getPatternApplicationAccess().getTransformKeyword_0());
            		
            // InternalMapping.g:83:3: ( (otherlv_1= RULE_ID ) )
            // InternalMapping.g:84:4: (otherlv_1= RULE_ID )
            {
            // InternalMapping.g:84:4: (otherlv_1= RULE_ID )
            // InternalMapping.g:85:5: otherlv_1= RULE_ID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getPatternApplicationRule());
            					}
            				
            otherlv_1=(Token)match(input,RULE_ID,FOLLOW_4); 

            					newLeafNode(otherlv_1, grammarAccess.getPatternApplicationAccess().getModelModelCrossReference_1_0());
            				

            }


            }

            otherlv_2=(Token)match(input,12,FOLLOW_3); 

            			newLeafNode(otherlv_2, grammarAccess.getPatternApplicationAccess().getUsingKeyword_2());
            		
            // InternalMapping.g:100:3: ( (otherlv_3= RULE_ID ) )
            // InternalMapping.g:101:4: (otherlv_3= RULE_ID )
            {
            // InternalMapping.g:101:4: (otherlv_3= RULE_ID )
            // InternalMapping.g:102:5: otherlv_3= RULE_ID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getPatternApplicationRule());
            					}
            				
            otherlv_3=(Token)match(input,RULE_ID,FOLLOW_5); 

            					newLeafNode(otherlv_3, grammarAccess.getPatternApplicationAccess().getPatternPatternCrossReference_3_0());
            				

            }


            }

            otherlv_4=(Token)match(input,13,FOLLOW_6); 

            			newLeafNode(otherlv_4, grammarAccess.getPatternApplicationAccess().getLeftCurlyBracketKeyword_4());
            		
            // InternalMapping.g:117:3: (otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )* )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==14) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // InternalMapping.g:118:4: otherlv_5= 'multiplicity' ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) ) ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )*
                    {
                    otherlv_5=(Token)match(input,14,FOLLOW_3); 

                    				newLeafNode(otherlv_5, grammarAccess.getPatternApplicationAccess().getMultiplicityKeyword_5_0());
                    			
                    // InternalMapping.g:122:4: ( (lv_cardinalityValues_6_0= ruleCardinalityValue ) )
                    // InternalMapping.g:123:5: (lv_cardinalityValues_6_0= ruleCardinalityValue )
                    {
                    // InternalMapping.g:123:5: (lv_cardinalityValues_6_0= ruleCardinalityValue )
                    // InternalMapping.g:124:6: lv_cardinalityValues_6_0= ruleCardinalityValue
                    {

                    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getCardinalityValuesCardinalityValueParserRuleCall_5_1_0());
                    					
                    pushFollow(FOLLOW_7);
                    lv_cardinalityValues_6_0=ruleCardinalityValue();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    						}
                    						add(
                    							current,
                    							"cardinalityValues",
                    							lv_cardinalityValues_6_0,
                    							"com.irtsaintexupery.xtext.pseim.Mapping.CardinalityValue");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }

                    // InternalMapping.g:141:4: ( (lv_cardinalityValues_7_0= ruleCardinalityValue ) )*
                    loop1:
                    do {
                        int alt1=2;
                        int LA1_0 = input.LA(1);

                        if ( (LA1_0==RULE_ID) ) {
                            alt1=1;
                        }


                        switch (alt1) {
                    	case 1 :
                    	    // InternalMapping.g:142:5: (lv_cardinalityValues_7_0= ruleCardinalityValue )
                    	    {
                    	    // InternalMapping.g:142:5: (lv_cardinalityValues_7_0= ruleCardinalityValue )
                    	    // InternalMapping.g:143:6: lv_cardinalityValues_7_0= ruleCardinalityValue
                    	    {

                    	    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getCardinalityValuesCardinalityValueParserRuleCall_5_2_0());
                    	    					
                    	    pushFollow(FOLLOW_7);
                    	    lv_cardinalityValues_7_0=ruleCardinalityValue();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"cardinalityValues",
                    	    							lv_cardinalityValues_7_0,
                    	    							"com.irtsaintexupery.xtext.pseim.Mapping.CardinalityValue");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

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


                    }
                    break;

            }

            // InternalMapping.g:161:3: (otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )* )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==15) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // InternalMapping.g:162:4: otherlv_8= 'components' ( (lv_modelElement_9_0= ruleGraphElementMapping ) ) ( (lv_modelElement_10_0= ruleGraphElementMapping ) )*
                    {
                    otherlv_8=(Token)match(input,15,FOLLOW_3); 

                    				newLeafNode(otherlv_8, grammarAccess.getPatternApplicationAccess().getComponentsKeyword_6_0());
                    			
                    // InternalMapping.g:166:4: ( (lv_modelElement_9_0= ruleGraphElementMapping ) )
                    // InternalMapping.g:167:5: (lv_modelElement_9_0= ruleGraphElementMapping )
                    {
                    // InternalMapping.g:167:5: (lv_modelElement_9_0= ruleGraphElementMapping )
                    // InternalMapping.g:168:6: lv_modelElement_9_0= ruleGraphElementMapping
                    {

                    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getModelElementGraphElementMappingParserRuleCall_6_1_0());
                    					
                    pushFollow(FOLLOW_8);
                    lv_modelElement_9_0=ruleGraphElementMapping();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    						}
                    						add(
                    							current,
                    							"modelElement",
                    							lv_modelElement_9_0,
                    							"com.irtsaintexupery.xtext.pseim.Mapping.GraphElementMapping");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }

                    // InternalMapping.g:185:4: ( (lv_modelElement_10_0= ruleGraphElementMapping ) )*
                    loop3:
                    do {
                        int alt3=2;
                        int LA3_0 = input.LA(1);

                        if ( (LA3_0==RULE_ID) ) {
                            alt3=1;
                        }


                        switch (alt3) {
                    	case 1 :
                    	    // InternalMapping.g:186:5: (lv_modelElement_10_0= ruleGraphElementMapping )
                    	    {
                    	    // InternalMapping.g:186:5: (lv_modelElement_10_0= ruleGraphElementMapping )
                    	    // InternalMapping.g:187:6: lv_modelElement_10_0= ruleGraphElementMapping
                    	    {

                    	    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getModelElementGraphElementMappingParserRuleCall_6_2_0());
                    	    					
                    	    pushFollow(FOLLOW_8);
                    	    lv_modelElement_10_0=ruleGraphElementMapping();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"modelElement",
                    	    							lv_modelElement_10_0,
                    	    							"com.irtsaintexupery.xtext.pseim.Mapping.GraphElementMapping");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

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


                    }
                    break;

            }

            // InternalMapping.g:205:3: (otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )* )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==16) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // InternalMapping.g:206:4: otherlv_11= 'ports' ( (lv_portMapping_12_0= rulePortMapping ) ) ( (lv_portMapping_13_0= rulePortMapping ) )*
                    {
                    otherlv_11=(Token)match(input,16,FOLLOW_3); 

                    				newLeafNode(otherlv_11, grammarAccess.getPatternApplicationAccess().getPortsKeyword_7_0());
                    			
                    // InternalMapping.g:210:4: ( (lv_portMapping_12_0= rulePortMapping ) )
                    // InternalMapping.g:211:5: (lv_portMapping_12_0= rulePortMapping )
                    {
                    // InternalMapping.g:211:5: (lv_portMapping_12_0= rulePortMapping )
                    // InternalMapping.g:212:6: lv_portMapping_12_0= rulePortMapping
                    {

                    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getPortMappingPortMappingParserRuleCall_7_1_0());
                    					
                    pushFollow(FOLLOW_9);
                    lv_portMapping_12_0=rulePortMapping();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    						}
                    						add(
                    							current,
                    							"portMapping",
                    							lv_portMapping_12_0,
                    							"com.irtsaintexupery.xtext.pseim.Mapping.PortMapping");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }

                    // InternalMapping.g:229:4: ( (lv_portMapping_13_0= rulePortMapping ) )*
                    loop5:
                    do {
                        int alt5=2;
                        int LA5_0 = input.LA(1);

                        if ( (LA5_0==RULE_ID) ) {
                            alt5=1;
                        }


                        switch (alt5) {
                    	case 1 :
                    	    // InternalMapping.g:230:5: (lv_portMapping_13_0= rulePortMapping )
                    	    {
                    	    // InternalMapping.g:230:5: (lv_portMapping_13_0= rulePortMapping )
                    	    // InternalMapping.g:231:6: lv_portMapping_13_0= rulePortMapping
                    	    {

                    	    						newCompositeNode(grammarAccess.getPatternApplicationAccess().getPortMappingPortMappingParserRuleCall_7_2_0());
                    	    					
                    	    pushFollow(FOLLOW_9);
                    	    lv_portMapping_13_0=rulePortMapping();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getPatternApplicationRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"portMapping",
                    	    							lv_portMapping_13_0,
                    	    							"com.irtsaintexupery.xtext.pseim.Mapping.PortMapping");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

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


                    }
                    break;

            }

            otherlv_14=(Token)match(input,17,FOLLOW_2); 

            			newLeafNode(otherlv_14, grammarAccess.getPatternApplicationAccess().getRightCurlyBracketKeyword_8());
            		

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleCardinalityValue"
    // InternalMapping.g:257:1: entryRuleCardinalityValue returns [EObject current=null] : iv_ruleCardinalityValue= ruleCardinalityValue EOF ;
    public final EObject entryRuleCardinalityValue() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleCardinalityValue = null;


        try {
            // InternalMapping.g:257:57: (iv_ruleCardinalityValue= ruleCardinalityValue EOF )
            // InternalMapping.g:258:2: iv_ruleCardinalityValue= ruleCardinalityValue EOF
            {
             newCompositeNode(grammarAccess.getCardinalityValueRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleCardinalityValue=ruleCardinalityValue();

            state._fsp--;

             current =iv_ruleCardinalityValue; 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "ruleCardinalityValue"
    // InternalMapping.g:264:1: ruleCardinalityValue returns [EObject current=null] : ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( (lv_value_2_0= ruleEInt ) ) ) ;
    public final EObject ruleCardinalityValue() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;
        AntlrDatatypeRuleToken lv_value_2_0 = null;



        	enterRule();

        try {
            // InternalMapping.g:270:2: ( ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( (lv_value_2_0= ruleEInt ) ) ) )
            // InternalMapping.g:271:2: ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( (lv_value_2_0= ruleEInt ) ) )
            {
            // InternalMapping.g:271:2: ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( (lv_value_2_0= ruleEInt ) ) )
            // InternalMapping.g:272:3: ( ( ruleQualifiedID ) ) otherlv_1= '->' ( (lv_value_2_0= ruleEInt ) )
            {
            // InternalMapping.g:272:3: ( ( ruleQualifiedID ) )
            // InternalMapping.g:273:4: ( ruleQualifiedID )
            {
            // InternalMapping.g:273:4: ( ruleQualifiedID )
            // InternalMapping.g:274:5: ruleQualifiedID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getCardinalityValueRule());
            					}
            				

            					newCompositeNode(grammarAccess.getCardinalityValueAccess().getCardinalityElementCardinalityElementCrossReference_0_0());
            				
            pushFollow(FOLLOW_10);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_1=(Token)match(input,18,FOLLOW_11); 

            			newLeafNode(otherlv_1, grammarAccess.getCardinalityValueAccess().getHyphenMinusGreaterThanSignKeyword_1());
            		
            // InternalMapping.g:292:3: ( (lv_value_2_0= ruleEInt ) )
            // InternalMapping.g:293:4: (lv_value_2_0= ruleEInt )
            {
            // InternalMapping.g:293:4: (lv_value_2_0= ruleEInt )
            // InternalMapping.g:294:5: lv_value_2_0= ruleEInt
            {

            					newCompositeNode(grammarAccess.getCardinalityValueAccess().getValueEIntParserRuleCall_2_0());
            				
            pushFollow(FOLLOW_2);
            lv_value_2_0=ruleEInt();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getCardinalityValueRule());
            					}
            					set(
            						current,
            						"value",
            						lv_value_2_0,
            						"com.irtsaintexupery.xtext.pseim.Mapping.EInt");
            					afterParserOrEnumRuleCall();
            				

            }


            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRulePortMapping"
    // InternalMapping.g:315:1: entryRulePortMapping returns [EObject current=null] : iv_rulePortMapping= rulePortMapping EOF ;
    public final EObject entryRulePortMapping() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePortMapping = null;


        try {
            // InternalMapping.g:315:52: (iv_rulePortMapping= rulePortMapping EOF )
            // InternalMapping.g:316:2: iv_rulePortMapping= rulePortMapping EOF
            {
             newCompositeNode(grammarAccess.getPortMappingRule()); 
            pushFollow(FOLLOW_1);
            iv_rulePortMapping=rulePortMapping();

            state._fsp--;

             current =iv_rulePortMapping; 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "rulePortMapping"
    // InternalMapping.g:322:1: rulePortMapping returns [EObject current=null] : ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) ) ;
    public final EObject rulePortMapping() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;
        Token otherlv_3=null;


        	enterRule();

        try {
            // InternalMapping.g:328:2: ( ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) ) )
            // InternalMapping.g:329:2: ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) )
            {
            // InternalMapping.g:329:2: ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) )
            // InternalMapping.g:330:3: ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) )
            {
            // InternalMapping.g:330:3: ( ( ruleQualifiedID ) )
            // InternalMapping.g:331:4: ( ruleQualifiedID )
            {
            // InternalMapping.g:331:4: ( ruleQualifiedID )
            // InternalMapping.g:332:5: ruleQualifiedID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getPortMappingRule());
            					}
            				

            					newCompositeNode(grammarAccess.getPortMappingAccess().getModelPortBorderElementCrossReference_0_0());
            				
            pushFollow(FOLLOW_12);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }

            // InternalMapping.g:346:3: (otherlv_1= ',' ( ( ruleQualifiedID ) ) )*
            loop7:
            do {
                int alt7=2;
                int LA7_0 = input.LA(1);

                if ( (LA7_0==19) ) {
                    alt7=1;
                }


                switch (alt7) {
            	case 1 :
            	    // InternalMapping.g:347:4: otherlv_1= ',' ( ( ruleQualifiedID ) )
            	    {
            	    otherlv_1=(Token)match(input,19,FOLLOW_3); 

            	    				newLeafNode(otherlv_1, grammarAccess.getPortMappingAccess().getCommaKeyword_1_0());
            	    			
            	    // InternalMapping.g:351:4: ( ( ruleQualifiedID ) )
            	    // InternalMapping.g:352:5: ( ruleQualifiedID )
            	    {
            	    // InternalMapping.g:352:5: ( ruleQualifiedID )
            	    // InternalMapping.g:353:6: ruleQualifiedID
            	    {

            	    						if (current==null) {
            	    							current = createModelElement(grammarAccess.getPortMappingRule());
            	    						}
            	    					

            	    						newCompositeNode(grammarAccess.getPortMappingAccess().getModelPortBorderElementCrossReference_1_1_0());
            	    					
            	    pushFollow(FOLLOW_12);
            	    ruleQualifiedID();

            	    state._fsp--;


            	    						afterParserOrEnumRuleCall();
            	    					

            	    }


            	    }


            	    }
            	    break;

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

            otherlv_3=(Token)match(input,18,FOLLOW_3); 

            			newLeafNode(otherlv_3, grammarAccess.getPortMappingAccess().getHyphenMinusGreaterThanSignKeyword_2());
            		
            // InternalMapping.g:372:3: ( ( ruleQualifiedID ) )
            // InternalMapping.g:373:4: ( ruleQualifiedID )
            {
            // InternalMapping.g:373:4: ( ruleQualifiedID )
            // InternalMapping.g:374:5: ruleQualifiedID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getPortMappingRule());
            					}
            				

            					newCompositeNode(grammarAccess.getPortMappingAccess().getPatternPortBorderElementCrossReference_3_0());
            				
            pushFollow(FOLLOW_2);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleGraphElementMapping"
    // InternalMapping.g:392:1: entryRuleGraphElementMapping returns [EObject current=null] : iv_ruleGraphElementMapping= ruleGraphElementMapping EOF ;
    public final EObject entryRuleGraphElementMapping() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleGraphElementMapping = null;


        try {
            // InternalMapping.g:392:60: (iv_ruleGraphElementMapping= ruleGraphElementMapping EOF )
            // InternalMapping.g:393:2: iv_ruleGraphElementMapping= ruleGraphElementMapping EOF
            {
             newCompositeNode(grammarAccess.getGraphElementMappingRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleGraphElementMapping=ruleGraphElementMapping();

            state._fsp--;

             current =iv_ruleGraphElementMapping; 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "ruleGraphElementMapping"
    // InternalMapping.g:399:1: ruleGraphElementMapping returns [EObject current=null] : ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) ) ;
    public final EObject ruleGraphElementMapping() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;
        Token otherlv_3=null;


        	enterRule();

        try {
            // InternalMapping.g:405:2: ( ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) ) )
            // InternalMapping.g:406:2: ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) )
            {
            // InternalMapping.g:406:2: ( ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) ) )
            // InternalMapping.g:407:3: ( ( ruleQualifiedID ) ) (otherlv_1= ',' ( ( ruleQualifiedID ) ) )* otherlv_3= '->' ( ( ruleQualifiedID ) )
            {
            // InternalMapping.g:407:3: ( ( ruleQualifiedID ) )
            // InternalMapping.g:408:4: ( ruleQualifiedID )
            {
            // InternalMapping.g:408:4: ( ruleQualifiedID )
            // InternalMapping.g:409:5: ruleQualifiedID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getGraphElementMappingRule());
            					}
            				

            					newCompositeNode(grammarAccess.getGraphElementMappingAccess().getModelGraphElementGraphElementCrossReference_0_0());
            				
            pushFollow(FOLLOW_12);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }

            // InternalMapping.g:423:3: (otherlv_1= ',' ( ( ruleQualifiedID ) ) )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

                if ( (LA8_0==19) ) {
                    alt8=1;
                }


                switch (alt8) {
            	case 1 :
            	    // InternalMapping.g:424:4: otherlv_1= ',' ( ( ruleQualifiedID ) )
            	    {
            	    otherlv_1=(Token)match(input,19,FOLLOW_3); 

            	    				newLeafNode(otherlv_1, grammarAccess.getGraphElementMappingAccess().getCommaKeyword_1_0());
            	    			
            	    // InternalMapping.g:428:4: ( ( ruleQualifiedID ) )
            	    // InternalMapping.g:429:5: ( ruleQualifiedID )
            	    {
            	    // InternalMapping.g:429:5: ( ruleQualifiedID )
            	    // InternalMapping.g:430:6: ruleQualifiedID
            	    {

            	    						if (current==null) {
            	    							current = createModelElement(grammarAccess.getGraphElementMappingRule());
            	    						}
            	    					

            	    						newCompositeNode(grammarAccess.getGraphElementMappingAccess().getModelGraphElementGraphElementCrossReference_1_1_0());
            	    					
            	    pushFollow(FOLLOW_12);
            	    ruleQualifiedID();

            	    state._fsp--;


            	    						afterParserOrEnumRuleCall();
            	    					

            	    }


            	    }


            	    }
            	    break;

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

            otherlv_3=(Token)match(input,18,FOLLOW_3); 

            			newLeafNode(otherlv_3, grammarAccess.getGraphElementMappingAccess().getHyphenMinusGreaterThanSignKeyword_2());
            		
            // InternalMapping.g:449:3: ( ( ruleQualifiedID ) )
            // InternalMapping.g:450:4: ( ruleQualifiedID )
            {
            // InternalMapping.g:450:4: ( ruleQualifiedID )
            // InternalMapping.g:451:5: ruleQualifiedID
            {

            					if (current==null) {
            						current = createModelElement(grammarAccess.getGraphElementMappingRule());
            					}
            				

            					newCompositeNode(grammarAccess.getGraphElementMappingAccess().getPatternGraphElementGraphElementCrossReference_3_0());
            				
            pushFollow(FOLLOW_2);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleEInt"
    // InternalMapping.g:469:1: entryRuleEInt returns [String current=null] : iv_ruleEInt= ruleEInt EOF ;
    public final String entryRuleEInt() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleEInt = null;


        try {
            // InternalMapping.g:469:44: (iv_ruleEInt= ruleEInt EOF )
            // InternalMapping.g:470:2: iv_ruleEInt= ruleEInt EOF
            {
             newCompositeNode(grammarAccess.getEIntRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleEInt=ruleEInt();

            state._fsp--;

             current =iv_ruleEInt.getText(); 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "ruleEInt"
    // InternalMapping.g:476:1: ruleEInt returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : ( (kw= '-' )? this_INT_1= RULE_INT ) ;
    public final AntlrDatatypeRuleToken ruleEInt() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;
        Token this_INT_1=null;


        	enterRule();

        try {
            // InternalMapping.g:482:2: ( ( (kw= '-' )? this_INT_1= RULE_INT ) )
            // InternalMapping.g:483:2: ( (kw= '-' )? this_INT_1= RULE_INT )
            {
            // InternalMapping.g:483:2: ( (kw= '-' )? this_INT_1= RULE_INT )
            // InternalMapping.g:484:3: (kw= '-' )? this_INT_1= RULE_INT
            {
            // InternalMapping.g:484:3: (kw= '-' )?
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0==20) ) {
                alt9=1;
            }
            switch (alt9) {
                case 1 :
                    // InternalMapping.g:485:4: kw= '-'
                    {
                    kw=(Token)match(input,20,FOLLOW_13); 

                    				current.merge(kw);
                    				newLeafNode(kw, grammarAccess.getEIntAccess().getHyphenMinusKeyword_0());
                    			

                    }
                    break;

            }

            this_INT_1=(Token)match(input,RULE_INT,FOLLOW_2); 

            			current.merge(this_INT_1);
            		

            			newLeafNode(this_INT_1, grammarAccess.getEIntAccess().getINTTerminalRuleCall_1());
            		

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleQualifiedID"
    // InternalMapping.g:502:1: entryRuleQualifiedID returns [String current=null] : iv_ruleQualifiedID= ruleQualifiedID EOF ;
    public final String entryRuleQualifiedID() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleQualifiedID = null;


        try {
            // InternalMapping.g:502:51: (iv_ruleQualifiedID= ruleQualifiedID EOF )
            // InternalMapping.g:503:2: iv_ruleQualifiedID= ruleQualifiedID EOF
            {
             newCompositeNode(grammarAccess.getQualifiedIDRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleQualifiedID=ruleQualifiedID();

            state._fsp--;

             current =iv_ruleQualifiedID.getText(); 
            match(input,EOF,FOLLOW_2); 

            }

        }

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


    // $ANTLR start "ruleQualifiedID"
    // InternalMapping.g:509:1: ruleQualifiedID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ;
    public final AntlrDatatypeRuleToken ruleQualifiedID() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token this_ID_0=null;
        Token kw=null;
        Token this_ID_2=null;


        	enterRule();

        try {
            // InternalMapping.g:515:2: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) )
            // InternalMapping.g:516:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            {
            // InternalMapping.g:516:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            // InternalMapping.g:517:3: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )*
            {
            this_ID_0=(Token)match(input,RULE_ID,FOLLOW_14); 

            			current.merge(this_ID_0);
            		

            			newLeafNode(this_ID_0, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0());
            		
            // InternalMapping.g:524:3: (kw= '.' this_ID_2= RULE_ID )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==21) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // InternalMapping.g:525:4: kw= '.' this_ID_2= RULE_ID
            	    {
            	    kw=(Token)match(input,21,FOLLOW_3); 

            	    				current.merge(kw);
            	    				newLeafNode(kw, grammarAccess.getQualifiedIDAccess().getFullStopKeyword_1_0());
            	    			
            	    this_ID_2=(Token)match(input,RULE_ID,FOLLOW_14); 

            	    				current.merge(this_ID_2);
            	    			

            	    				newLeafNode(this_ID_2, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_1_1());
            	    			

            	    }
            	    break;

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


            }


            }


            	leaveRule();

        }

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

    // Delegated rules


 

    public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x000000000003C000L});
    public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000038010L});
    public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000030010L});
    public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000020010L});
    public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000100020L});
    public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x00000000000C0000L});
    public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000200002L});

}