package com.irtsaintexupery.xtext.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.emf.common.util.Enumerator;
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.services.PseimGrammarAccess;



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

@SuppressWarnings("all")
public class InternalPseimParser extends AbstractInternalAntlrParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_STRING", "RULE_INT", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'model'", "'{'", "'}'", "'component'", "'('", "','", "')'", "'->'", "'.'", "'IntegerProperty'", "'key'", "'value'", "'StringProperty'", "'BooleanProperty'", "'ReferenceProperty'", "'ref'", "'-'", "'unspec'", "'in'", "'out'", "'inout'"
    };
    public static final int RULE_STRING=5;
    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 T__30=30;
    public static final int T__31=31;
    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 T__26=26;
    public static final int T__27=27;
    public static final int T__28=28;
    public static final int RULE_INT=6;
    public static final int T__29=29;
    public static final int T__22=22;
    public static final int RULE_ML_COMMENT=7;
    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__20=20;
    public static final int T__21=21;

    // delegates
    // delegators


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

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



     	private PseimGrammarAccess grammarAccess;

        public InternalPseimParser(TokenStream input, PseimGrammarAccess grammarAccess) {
            this(input);
            this.grammarAccess = grammarAccess;
            registerRules(grammarAccess.getGrammar());
        }

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

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




    // $ANTLR start "entryRuleModel"
    // InternalPseim.g:65:1: entryRuleModel returns [EObject current=null] : iv_ruleModel= ruleModel EOF ;
    public final EObject entryRuleModel() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleModel = null;


        try {
            // InternalPseim.g:65:46: (iv_ruleModel= ruleModel EOF )
            // InternalPseim.g:66:2: iv_ruleModel= ruleModel EOF
            {
             newCompositeNode(grammarAccess.getModelRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleModel=ruleModel();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleModel"
    // InternalPseim.g:72:1: ruleModel returns [EObject current=null] : (otherlv_0= 'model' ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )? ) ;
    public final EObject ruleModel() throws RecognitionException {
        EObject current = null;

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

        EObject lv_modelElements_3_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:78:2: ( (otherlv_0= 'model' ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )? ) )
            // InternalPseim.g:79:2: (otherlv_0= 'model' ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )? )
            {
            // InternalPseim.g:79:2: (otherlv_0= 'model' ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )? )
            // InternalPseim.g:80:3: otherlv_0= 'model' ( (lv_name_1_0= ruleEString ) ) (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )?
            {
            otherlv_0=(Token)match(input,11,FOLLOW_3); 

            			newLeafNode(otherlv_0, grammarAccess.getModelAccess().getModelKeyword_0());
            		
            // InternalPseim.g:84:3: ( (lv_name_1_0= ruleEString ) )
            // InternalPseim.g:85:4: (lv_name_1_0= ruleEString )
            {
            // InternalPseim.g:85:4: (lv_name_1_0= ruleEString )
            // InternalPseim.g:86:5: lv_name_1_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getModelAccess().getNameEStringParserRuleCall_1_0());
            				
            pushFollow(FOLLOW_4);
            lv_name_1_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getModelRule());
            					}
            					set(
            						current,
            						"name",
            						lv_name_1_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            // InternalPseim.g:103:3: (otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}' )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==12) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // InternalPseim.g:104:4: otherlv_2= '{' ( (lv_modelElements_3_0= ruleGraphElement ) )* otherlv_4= '}'
                    {
                    otherlv_2=(Token)match(input,12,FOLLOW_5); 

                    				newLeafNode(otherlv_2, grammarAccess.getModelAccess().getLeftCurlyBracketKeyword_2_0());
                    			
                    // InternalPseim.g:108:4: ( (lv_modelElements_3_0= ruleGraphElement ) )*
                    loop1:
                    do {
                        int alt1=2;
                        int LA1_0 = input.LA(1);

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


                        switch (alt1) {
                    	case 1 :
                    	    // InternalPseim.g:109:5: (lv_modelElements_3_0= ruleGraphElement )
                    	    {
                    	    // InternalPseim.g:109:5: (lv_modelElements_3_0= ruleGraphElement )
                    	    // InternalPseim.g:110:6: lv_modelElements_3_0= ruleGraphElement
                    	    {

                    	    						newCompositeNode(grammarAccess.getModelAccess().getModelElementsGraphElementParserRuleCall_2_1_0());
                    	    					
                    	    pushFollow(FOLLOW_5);
                    	    lv_modelElements_3_0=ruleGraphElement();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getModelRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"modelElements",
                    	    							lv_modelElements_3_0,
                    	    							"com.irtsaintexupery.xtext.Pseim.GraphElement");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

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

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

                    				newLeafNode(otherlv_4, grammarAccess.getModelAccess().getRightCurlyBracketKeyword_2_2());
                    			

                    }
                    break;

            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleComponent"
    // InternalPseim.g:136:1: entryRuleComponent returns [EObject current=null] : iv_ruleComponent= ruleComponent EOF ;
    public final EObject entryRuleComponent() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleComponent = null;


        try {
            // InternalPseim.g:136:50: (iv_ruleComponent= ruleComponent EOF )
            // InternalPseim.g:137:2: iv_ruleComponent= ruleComponent EOF
            {
             newCompositeNode(grammarAccess.getComponentRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleComponent=ruleComponent();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleComponent"
    // InternalPseim.g:143:1: ruleComponent returns [EObject current=null] : (otherlv_0= 'component' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '(' ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )? otherlv_6= ')' (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )? ) ;
    public final EObject ruleComponent() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token lv_name_1_0=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        Token otherlv_6=null;
        Token otherlv_7=null;
        Token otherlv_9=null;
        EObject lv_content_3_0 = null;

        EObject lv_content_5_0 = null;

        EObject lv_content_8_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:149:2: ( (otherlv_0= 'component' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '(' ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )? otherlv_6= ')' (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )? ) )
            // InternalPseim.g:150:2: (otherlv_0= 'component' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '(' ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )? otherlv_6= ')' (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )? )
            {
            // InternalPseim.g:150:2: (otherlv_0= 'component' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '(' ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )? otherlv_6= ')' (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )? )
            // InternalPseim.g:151:3: otherlv_0= 'component' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '(' ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )? otherlv_6= ')' (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )?
            {
            otherlv_0=(Token)match(input,14,FOLLOW_6); 

            			newLeafNode(otherlv_0, grammarAccess.getComponentAccess().getComponentKeyword_0());
            		
            // InternalPseim.g:155:3: ( (lv_name_1_0= RULE_ID ) )
            // InternalPseim.g:156:4: (lv_name_1_0= RULE_ID )
            {
            // InternalPseim.g:156:4: (lv_name_1_0= RULE_ID )
            // InternalPseim.g:157:5: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_7); 

            					newLeafNode(lv_name_1_0, grammarAccess.getComponentAccess().getNameIDTerminalRuleCall_1_0());
            				

            					if (current==null) {
            						current = createModelElement(grammarAccess.getComponentRule());
            					}
            					setWithLastConsumed(
            						current,
            						"name",
            						lv_name_1_0,
            						"org.eclipse.xtext.common.Terminals.ID");
            				

            }


            }

            otherlv_2=(Token)match(input,15,FOLLOW_8); 

            			newLeafNode(otherlv_2, grammarAccess.getComponentAccess().getLeftParenthesisKeyword_2());
            		
            // InternalPseim.g:177:3: ( ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )* )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( ((LA4_0>=28 && LA4_0<=31)) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // InternalPseim.g:178:4: ( (lv_content_3_0= rulePort ) ) (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )*
                    {
                    // InternalPseim.g:178:4: ( (lv_content_3_0= rulePort ) )
                    // InternalPseim.g:179:5: (lv_content_3_0= rulePort )
                    {
                    // InternalPseim.g:179:5: (lv_content_3_0= rulePort )
                    // InternalPseim.g:180:6: lv_content_3_0= rulePort
                    {

                    						newCompositeNode(grammarAccess.getComponentAccess().getContentPortParserRuleCall_3_0_0());
                    					
                    pushFollow(FOLLOW_9);
                    lv_content_3_0=rulePort();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getComponentRule());
                    						}
                    						add(
                    							current,
                    							"content",
                    							lv_content_3_0,
                    							"com.irtsaintexupery.xtext.Pseim.Port");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }

                    // InternalPseim.g:197:4: (otherlv_4= ',' ( (lv_content_5_0= rulePort ) ) )*
                    loop3:
                    do {
                        int alt3=2;
                        int LA3_0 = input.LA(1);

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


                        switch (alt3) {
                    	case 1 :
                    	    // InternalPseim.g:198:5: otherlv_4= ',' ( (lv_content_5_0= rulePort ) )
                    	    {
                    	    otherlv_4=(Token)match(input,16,FOLLOW_10); 

                    	    					newLeafNode(otherlv_4, grammarAccess.getComponentAccess().getCommaKeyword_3_1_0());
                    	    				
                    	    // InternalPseim.g:202:5: ( (lv_content_5_0= rulePort ) )
                    	    // InternalPseim.g:203:6: (lv_content_5_0= rulePort )
                    	    {
                    	    // InternalPseim.g:203:6: (lv_content_5_0= rulePort )
                    	    // InternalPseim.g:204:7: lv_content_5_0= rulePort
                    	    {

                    	    							newCompositeNode(grammarAccess.getComponentAccess().getContentPortParserRuleCall_3_1_1_0());
                    	    						
                    	    pushFollow(FOLLOW_9);
                    	    lv_content_5_0=rulePort();

                    	    state._fsp--;


                    	    							if (current==null) {
                    	    								current = createModelElementForParent(grammarAccess.getComponentRule());
                    	    							}
                    	    							add(
                    	    								current,
                    	    								"content",
                    	    								lv_content_5_0,
                    	    								"com.irtsaintexupery.xtext.Pseim.Port");
                    	    							afterParserOrEnumRuleCall();
                    	    						

                    	    }


                    	    }


                    	    }
                    	    break;

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


                    }
                    break;

            }

            otherlv_6=(Token)match(input,17,FOLLOW_4); 

            			newLeafNode(otherlv_6, grammarAccess.getComponentAccess().getRightParenthesisKeyword_4());
            		
            // InternalPseim.g:227:3: (otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}' )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==12) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // InternalPseim.g:228:4: otherlv_7= '{' ( (lv_content_8_0= ruleGraphElement ) )* otherlv_9= '}'
                    {
                    otherlv_7=(Token)match(input,12,FOLLOW_5); 

                    				newLeafNode(otherlv_7, grammarAccess.getComponentAccess().getLeftCurlyBracketKeyword_5_0());
                    			
                    // InternalPseim.g:232:4: ( (lv_content_8_0= ruleGraphElement ) )*
                    loop5:
                    do {
                        int alt5=2;
                        int LA5_0 = input.LA(1);

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


                        switch (alt5) {
                    	case 1 :
                    	    // InternalPseim.g:233:5: (lv_content_8_0= ruleGraphElement )
                    	    {
                    	    // InternalPseim.g:233:5: (lv_content_8_0= ruleGraphElement )
                    	    // InternalPseim.g:234:6: lv_content_8_0= ruleGraphElement
                    	    {

                    	    						newCompositeNode(grammarAccess.getComponentAccess().getContentGraphElementParserRuleCall_5_1_0());
                    	    					
                    	    pushFollow(FOLLOW_5);
                    	    lv_content_8_0=ruleGraphElement();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getComponentRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"content",
                    	    							lv_content_8_0,
                    	    							"com.irtsaintexupery.xtext.Pseim.GraphElement");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

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

                    otherlv_9=(Token)match(input,13,FOLLOW_2); 

                    				newLeafNode(otherlv_9, grammarAccess.getComponentAccess().getRightCurlyBracketKeyword_5_2());
                    			

                    }
                    break;

            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRulePort"
    // InternalPseim.g:260:1: entryRulePort returns [EObject current=null] : iv_rulePort= rulePort EOF ;
    public final EObject entryRulePort() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePort = null;


        try {
            // InternalPseim.g:260:45: (iv_rulePort= rulePort EOF )
            // InternalPseim.g:261:2: iv_rulePort= rulePort EOF
            {
             newCompositeNode(grammarAccess.getPortRule()); 
            pushFollow(FOLLOW_1);
            iv_rulePort=rulePort();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "rulePort"
    // InternalPseim.g:267:1: rulePort returns [EObject current=null] : ( ( (lv_direction_0_0= rulePortDirection ) ) ( (lv_name_1_0= RULE_ID ) ) ) ;
    public final EObject rulePort() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Enumerator lv_direction_0_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:273:2: ( ( ( (lv_direction_0_0= rulePortDirection ) ) ( (lv_name_1_0= RULE_ID ) ) ) )
            // InternalPseim.g:274:2: ( ( (lv_direction_0_0= rulePortDirection ) ) ( (lv_name_1_0= RULE_ID ) ) )
            {
            // InternalPseim.g:274:2: ( ( (lv_direction_0_0= rulePortDirection ) ) ( (lv_name_1_0= RULE_ID ) ) )
            // InternalPseim.g:275:3: ( (lv_direction_0_0= rulePortDirection ) ) ( (lv_name_1_0= RULE_ID ) )
            {
            // InternalPseim.g:275:3: ( (lv_direction_0_0= rulePortDirection ) )
            // InternalPseim.g:276:4: (lv_direction_0_0= rulePortDirection )
            {
            // InternalPseim.g:276:4: (lv_direction_0_0= rulePortDirection )
            // InternalPseim.g:277:5: lv_direction_0_0= rulePortDirection
            {

            					newCompositeNode(grammarAccess.getPortAccess().getDirectionPortDirectionEnumRuleCall_0_0());
            				
            pushFollow(FOLLOW_6);
            lv_direction_0_0=rulePortDirection();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getPortRule());
            					}
            					set(
            						current,
            						"direction",
            						lv_direction_0_0,
            						"com.irtsaintexupery.xtext.Pseim.PortDirection");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            // InternalPseim.g:294:3: ( (lv_name_1_0= RULE_ID ) )
            // InternalPseim.g:295:4: (lv_name_1_0= RULE_ID )
            {
            // InternalPseim.g:295:4: (lv_name_1_0= RULE_ID )
            // InternalPseim.g:296:5: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2); 

            					newLeafNode(lv_name_1_0, grammarAccess.getPortAccess().getNameIDTerminalRuleCall_1_0());
            				

            					if (current==null) {
            						current = createModelElement(grammarAccess.getPortRule());
            					}
            					setWithLastConsumed(
            						current,
            						"name",
            						lv_name_1_0,
            						"org.eclipse.xtext.common.Terminals.ID");
            				

            }


            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleLink"
    // InternalPseim.g:316:1: entryRuleLink returns [EObject current=null] : iv_ruleLink= ruleLink EOF ;
    public final EObject entryRuleLink() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleLink = null;


        try {
            // InternalPseim.g:316:45: (iv_ruleLink= ruleLink EOF )
            // InternalPseim.g:317:2: iv_ruleLink= ruleLink EOF
            {
             newCompositeNode(grammarAccess.getLinkRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleLink=ruleLink();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleLink"
    // InternalPseim.g:323:1: ruleLink returns [EObject current=null] : ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( ( ruleQualifiedID ) ) ) ;
    public final EObject ruleLink() throws RecognitionException {
        EObject current = null;

        Token otherlv_1=null;


        	enterRule();

        try {
            // InternalPseim.g:329:2: ( ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( ( ruleQualifiedID ) ) ) )
            // InternalPseim.g:330:2: ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( ( ruleQualifiedID ) ) )
            {
            // InternalPseim.g:330:2: ( ( ( ruleQualifiedID ) ) otherlv_1= '->' ( ( ruleQualifiedID ) ) )
            // InternalPseim.g:331:3: ( ( ruleQualifiedID ) ) otherlv_1= '->' ( ( ruleQualifiedID ) )
            {
            // InternalPseim.g:331:3: ( ( ruleQualifiedID ) )
            // InternalPseim.g:332:4: ( ruleQualifiedID )
            {
            // InternalPseim.g:332:4: ( ruleQualifiedID )
            // InternalPseim.g:333:5: ruleQualifiedID
            {

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

            					newCompositeNode(grammarAccess.getLinkAccess().getSrcPortCrossReference_0_0());
            				
            pushFollow(FOLLOW_11);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }

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

            			newLeafNode(otherlv_1, grammarAccess.getLinkAccess().getHyphenMinusGreaterThanSignKeyword_1());
            		
            // InternalPseim.g:351:3: ( ( ruleQualifiedID ) )
            // InternalPseim.g:352:4: ( ruleQualifiedID )
            {
            // InternalPseim.g:352:4: ( ruleQualifiedID )
            // InternalPseim.g:353:5: ruleQualifiedID
            {

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

            					newCompositeNode(grammarAccess.getLinkAccess().getDstPortCrossReference_2_0());
            				
            pushFollow(FOLLOW_2);
            ruleQualifiedID();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleGraphElement"
    // InternalPseim.g:371:1: entryRuleGraphElement returns [EObject current=null] : iv_ruleGraphElement= ruleGraphElement EOF ;
    public final EObject entryRuleGraphElement() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleGraphElement = null;


        try {
            // InternalPseim.g:371:53: (iv_ruleGraphElement= ruleGraphElement EOF )
            // InternalPseim.g:372:2: iv_ruleGraphElement= ruleGraphElement EOF
            {
             newCompositeNode(grammarAccess.getGraphElementRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleGraphElement=ruleGraphElement();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleGraphElement"
    // InternalPseim.g:378:1: ruleGraphElement returns [EObject current=null] : (this_Component_0= ruleComponent | this_Link_1= ruleLink ) ;
    public final EObject ruleGraphElement() throws RecognitionException {
        EObject current = null;

        EObject this_Component_0 = null;

        EObject this_Link_1 = null;



        	enterRule();

        try {
            // InternalPseim.g:384:2: ( (this_Component_0= ruleComponent | this_Link_1= ruleLink ) )
            // InternalPseim.g:385:2: (this_Component_0= ruleComponent | this_Link_1= ruleLink )
            {
            // InternalPseim.g:385:2: (this_Component_0= ruleComponent | this_Link_1= ruleLink )
            int alt7=2;
            int LA7_0 = input.LA(1);

            if ( (LA7_0==14) ) {
                alt7=1;
            }
            else if ( (LA7_0==RULE_ID) ) {
                alt7=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 7, 0, input);

                throw nvae;
            }
            switch (alt7) {
                case 1 :
                    // InternalPseim.g:386:3: this_Component_0= ruleComponent
                    {

                    			newCompositeNode(grammarAccess.getGraphElementAccess().getComponentParserRuleCall_0());
                    		
                    pushFollow(FOLLOW_2);
                    this_Component_0=ruleComponent();

                    state._fsp--;


                    			current = this_Component_0;
                    			afterParserOrEnumRuleCall();
                    		

                    }
                    break;
                case 2 :
                    // InternalPseim.g:395:3: this_Link_1= ruleLink
                    {

                    			newCompositeNode(grammarAccess.getGraphElementAccess().getLinkParserRuleCall_1());
                    		
                    pushFollow(FOLLOW_2);
                    this_Link_1=ruleLink();

                    state._fsp--;


                    			current = this_Link_1;
                    			afterParserOrEnumRuleCall();
                    		

                    }
                    break;

            }


            }


            	leaveRule();

        }

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


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

        AntlrDatatypeRuleToken iv_ruleQualifiedID = null;


        try {
            // InternalPseim.g:407:51: (iv_ruleQualifiedID= ruleQualifiedID EOF )
            // InternalPseim.g:408: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"
    // InternalPseim.g:414: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 {
            // InternalPseim.g:420:2: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) )
            // InternalPseim.g:421:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            {
            // InternalPseim.g:421:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            // InternalPseim.g:422:3: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )*
            {
            this_ID_0=(Token)match(input,RULE_ID,FOLLOW_13); 

            			current.merge(this_ID_0);
            		

            			newLeafNode(this_ID_0, grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0());
            		
            // InternalPseim.g:429:3: (kw= '.' this_ID_2= RULE_ID )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

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


                switch (alt8) {
            	case 1 :
            	    // InternalPseim.g:430:4: kw= '.' this_ID_2= RULE_ID
            	    {
            	    kw=(Token)match(input,19,FOLLOW_6); 

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

            	    				current.merge(this_ID_2);
            	    			

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

            	    }
            	    break;

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


            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleEString"
    // InternalPseim.g:447:1: entryRuleEString returns [String current=null] : iv_ruleEString= ruleEString EOF ;
    public final String entryRuleEString() throws RecognitionException {
        String current = null;

        AntlrDatatypeRuleToken iv_ruleEString = null;


        try {
            // InternalPseim.g:447:47: (iv_ruleEString= ruleEString EOF )
            // InternalPseim.g:448:2: iv_ruleEString= ruleEString EOF
            {
             newCompositeNode(grammarAccess.getEStringRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleEString=ruleEString();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleEString"
    // InternalPseim.g:454:1: ruleEString returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID ) ;
    public final AntlrDatatypeRuleToken ruleEString() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token this_STRING_0=null;
        Token this_ID_1=null;


        	enterRule();

        try {
            // InternalPseim.g:460:2: ( (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID ) )
            // InternalPseim.g:461:2: (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID )
            {
            // InternalPseim.g:461:2: (this_STRING_0= RULE_STRING | this_ID_1= RULE_ID )
            int alt9=2;
            int LA9_0 = input.LA(1);

            if ( (LA9_0==RULE_STRING) ) {
                alt9=1;
            }
            else if ( (LA9_0==RULE_ID) ) {
                alt9=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                throw nvae;
            }
            switch (alt9) {
                case 1 :
                    // InternalPseim.g:462:3: this_STRING_0= RULE_STRING
                    {
                    this_STRING_0=(Token)match(input,RULE_STRING,FOLLOW_2); 

                    			current.merge(this_STRING_0);
                    		

                    			newLeafNode(this_STRING_0, grammarAccess.getEStringAccess().getSTRINGTerminalRuleCall_0());
                    		

                    }
                    break;
                case 2 :
                    // InternalPseim.g:470:3: this_ID_1= RULE_ID
                    {
                    this_ID_1=(Token)match(input,RULE_ID,FOLLOW_2); 

                    			current.merge(this_ID_1);
                    		

                    			newLeafNode(this_ID_1, grammarAccess.getEStringAccess().getIDTerminalRuleCall_1());
                    		

                    }
                    break;

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleIntegerProperty"
    // InternalPseim.g:481:1: entryRuleIntegerProperty returns [EObject current=null] : iv_ruleIntegerProperty= ruleIntegerProperty EOF ;
    public final EObject entryRuleIntegerProperty() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleIntegerProperty = null;


        try {
            // InternalPseim.g:481:56: (iv_ruleIntegerProperty= ruleIntegerProperty EOF )
            // InternalPseim.g:482:2: iv_ruleIntegerProperty= ruleIntegerProperty EOF
            {
             newCompositeNode(grammarAccess.getIntegerPropertyRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleIntegerProperty=ruleIntegerProperty();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleIntegerProperty"
    // InternalPseim.g:488:1: ruleIntegerProperty returns [EObject current=null] : (otherlv_0= 'IntegerProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEInt ) ) otherlv_6= '}' ) ;
    public final EObject ruleIntegerProperty() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_1=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        Token otherlv_6=null;
        AntlrDatatypeRuleToken lv_key_3_0 = null;

        AntlrDatatypeRuleToken lv_value_5_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:494:2: ( (otherlv_0= 'IntegerProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEInt ) ) otherlv_6= '}' ) )
            // InternalPseim.g:495:2: (otherlv_0= 'IntegerProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEInt ) ) otherlv_6= '}' )
            {
            // InternalPseim.g:495:2: (otherlv_0= 'IntegerProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEInt ) ) otherlv_6= '}' )
            // InternalPseim.g:496:3: otherlv_0= 'IntegerProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEInt ) ) otherlv_6= '}'
            {
            otherlv_0=(Token)match(input,20,FOLLOW_14); 

            			newLeafNode(otherlv_0, grammarAccess.getIntegerPropertyAccess().getIntegerPropertyKeyword_0());
            		
            otherlv_1=(Token)match(input,12,FOLLOW_15); 

            			newLeafNode(otherlv_1, grammarAccess.getIntegerPropertyAccess().getLeftCurlyBracketKeyword_1());
            		
            otherlv_2=(Token)match(input,21,FOLLOW_3); 

            			newLeafNode(otherlv_2, grammarAccess.getIntegerPropertyAccess().getKeyKeyword_2());
            		
            // InternalPseim.g:508:3: ( (lv_key_3_0= ruleEString ) )
            // InternalPseim.g:509:4: (lv_key_3_0= ruleEString )
            {
            // InternalPseim.g:509:4: (lv_key_3_0= ruleEString )
            // InternalPseim.g:510:5: lv_key_3_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getIntegerPropertyAccess().getKeyEStringParserRuleCall_3_0());
            				
            pushFollow(FOLLOW_16);
            lv_key_3_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getIntegerPropertyRule());
            					}
            					set(
            						current,
            						"key",
            						lv_key_3_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_4=(Token)match(input,22,FOLLOW_17); 

            			newLeafNode(otherlv_4, grammarAccess.getIntegerPropertyAccess().getValueKeyword_4());
            		
            // InternalPseim.g:531:3: ( (lv_value_5_0= ruleEInt ) )
            // InternalPseim.g:532:4: (lv_value_5_0= ruleEInt )
            {
            // InternalPseim.g:532:4: (lv_value_5_0= ruleEInt )
            // InternalPseim.g:533:5: lv_value_5_0= ruleEInt
            {

            					newCompositeNode(grammarAccess.getIntegerPropertyAccess().getValueEIntParserRuleCall_5_0());
            				
            pushFollow(FOLLOW_18);
            lv_value_5_0=ruleEInt();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getIntegerPropertyRule());
            					}
            					set(
            						current,
            						"value",
            						lv_value_5_0,
            						"com.irtsaintexupery.xtext.Pseim.EInt");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_6=(Token)match(input,13,FOLLOW_2); 

            			newLeafNode(otherlv_6, grammarAccess.getIntegerPropertyAccess().getRightCurlyBracketKeyword_6());
            		

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleStringProperty"
    // InternalPseim.g:558:1: entryRuleStringProperty returns [EObject current=null] : iv_ruleStringProperty= ruleStringProperty EOF ;
    public final EObject entryRuleStringProperty() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleStringProperty = null;


        try {
            // InternalPseim.g:558:55: (iv_ruleStringProperty= ruleStringProperty EOF )
            // InternalPseim.g:559:2: iv_ruleStringProperty= ruleStringProperty EOF
            {
             newCompositeNode(grammarAccess.getStringPropertyRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleStringProperty=ruleStringProperty();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleStringProperty"
    // InternalPseim.g:565:1: ruleStringProperty returns [EObject current=null] : (otherlv_0= 'StringProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEString ) ) otherlv_6= '}' ) ;
    public final EObject ruleStringProperty() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_1=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        Token otherlv_6=null;
        AntlrDatatypeRuleToken lv_key_3_0 = null;

        AntlrDatatypeRuleToken lv_value_5_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:571:2: ( (otherlv_0= 'StringProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEString ) ) otherlv_6= '}' ) )
            // InternalPseim.g:572:2: (otherlv_0= 'StringProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEString ) ) otherlv_6= '}' )
            {
            // InternalPseim.g:572:2: (otherlv_0= 'StringProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEString ) ) otherlv_6= '}' )
            // InternalPseim.g:573:3: otherlv_0= 'StringProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'value' ( (lv_value_5_0= ruleEString ) ) otherlv_6= '}'
            {
            otherlv_0=(Token)match(input,23,FOLLOW_14); 

            			newLeafNode(otherlv_0, grammarAccess.getStringPropertyAccess().getStringPropertyKeyword_0());
            		
            otherlv_1=(Token)match(input,12,FOLLOW_15); 

            			newLeafNode(otherlv_1, grammarAccess.getStringPropertyAccess().getLeftCurlyBracketKeyword_1());
            		
            otherlv_2=(Token)match(input,21,FOLLOW_3); 

            			newLeafNode(otherlv_2, grammarAccess.getStringPropertyAccess().getKeyKeyword_2());
            		
            // InternalPseim.g:585:3: ( (lv_key_3_0= ruleEString ) )
            // InternalPseim.g:586:4: (lv_key_3_0= ruleEString )
            {
            // InternalPseim.g:586:4: (lv_key_3_0= ruleEString )
            // InternalPseim.g:587:5: lv_key_3_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getStringPropertyAccess().getKeyEStringParserRuleCall_3_0());
            				
            pushFollow(FOLLOW_16);
            lv_key_3_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getStringPropertyRule());
            					}
            					set(
            						current,
            						"key",
            						lv_key_3_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_4=(Token)match(input,22,FOLLOW_3); 

            			newLeafNode(otherlv_4, grammarAccess.getStringPropertyAccess().getValueKeyword_4());
            		
            // InternalPseim.g:608:3: ( (lv_value_5_0= ruleEString ) )
            // InternalPseim.g:609:4: (lv_value_5_0= ruleEString )
            {
            // InternalPseim.g:609:4: (lv_value_5_0= ruleEString )
            // InternalPseim.g:610:5: lv_value_5_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getStringPropertyAccess().getValueEStringParserRuleCall_5_0());
            				
            pushFollow(FOLLOW_18);
            lv_value_5_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getStringPropertyRule());
            					}
            					set(
            						current,
            						"value",
            						lv_value_5_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_6=(Token)match(input,13,FOLLOW_2); 

            			newLeafNode(otherlv_6, grammarAccess.getStringPropertyAccess().getRightCurlyBracketKeyword_6());
            		

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleBooleanProperty"
    // InternalPseim.g:635:1: entryRuleBooleanProperty returns [EObject current=null] : iv_ruleBooleanProperty= ruleBooleanProperty EOF ;
    public final EObject entryRuleBooleanProperty() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleBooleanProperty = null;


        try {
            // InternalPseim.g:635:56: (iv_ruleBooleanProperty= ruleBooleanProperty EOF )
            // InternalPseim.g:636:2: iv_ruleBooleanProperty= ruleBooleanProperty EOF
            {
             newCompositeNode(grammarAccess.getBooleanPropertyRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleBooleanProperty=ruleBooleanProperty();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleBooleanProperty"
    // InternalPseim.g:642:1: ruleBooleanProperty returns [EObject current=null] : ( ( (lv_value_0_0= 'value' ) ) otherlv_1= 'BooleanProperty' otherlv_2= '{' otherlv_3= 'key' ( (lv_key_4_0= ruleEString ) ) otherlv_5= '}' ) ;
    public final EObject ruleBooleanProperty() throws RecognitionException {
        EObject current = null;

        Token lv_value_0_0=null;
        Token otherlv_1=null;
        Token otherlv_2=null;
        Token otherlv_3=null;
        Token otherlv_5=null;
        AntlrDatatypeRuleToken lv_key_4_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:648:2: ( ( ( (lv_value_0_0= 'value' ) ) otherlv_1= 'BooleanProperty' otherlv_2= '{' otherlv_3= 'key' ( (lv_key_4_0= ruleEString ) ) otherlv_5= '}' ) )
            // InternalPseim.g:649:2: ( ( (lv_value_0_0= 'value' ) ) otherlv_1= 'BooleanProperty' otherlv_2= '{' otherlv_3= 'key' ( (lv_key_4_0= ruleEString ) ) otherlv_5= '}' )
            {
            // InternalPseim.g:649:2: ( ( (lv_value_0_0= 'value' ) ) otherlv_1= 'BooleanProperty' otherlv_2= '{' otherlv_3= 'key' ( (lv_key_4_0= ruleEString ) ) otherlv_5= '}' )
            // InternalPseim.g:650:3: ( (lv_value_0_0= 'value' ) ) otherlv_1= 'BooleanProperty' otherlv_2= '{' otherlv_3= 'key' ( (lv_key_4_0= ruleEString ) ) otherlv_5= '}'
            {
            // InternalPseim.g:650:3: ( (lv_value_0_0= 'value' ) )
            // InternalPseim.g:651:4: (lv_value_0_0= 'value' )
            {
            // InternalPseim.g:651:4: (lv_value_0_0= 'value' )
            // InternalPseim.g:652:5: lv_value_0_0= 'value'
            {
            lv_value_0_0=(Token)match(input,22,FOLLOW_19); 

            					newLeafNode(lv_value_0_0, grammarAccess.getBooleanPropertyAccess().getValueValueKeyword_0_0());
            				

            					if (current==null) {
            						current = createModelElement(grammarAccess.getBooleanPropertyRule());
            					}
            					setWithLastConsumed(current, "value", true, "value");
            				

            }


            }

            otherlv_1=(Token)match(input,24,FOLLOW_14); 

            			newLeafNode(otherlv_1, grammarAccess.getBooleanPropertyAccess().getBooleanPropertyKeyword_1());
            		
            otherlv_2=(Token)match(input,12,FOLLOW_15); 

            			newLeafNode(otherlv_2, grammarAccess.getBooleanPropertyAccess().getLeftCurlyBracketKeyword_2());
            		
            otherlv_3=(Token)match(input,21,FOLLOW_3); 

            			newLeafNode(otherlv_3, grammarAccess.getBooleanPropertyAccess().getKeyKeyword_3());
            		
            // InternalPseim.g:676:3: ( (lv_key_4_0= ruleEString ) )
            // InternalPseim.g:677:4: (lv_key_4_0= ruleEString )
            {
            // InternalPseim.g:677:4: (lv_key_4_0= ruleEString )
            // InternalPseim.g:678:5: lv_key_4_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getBooleanPropertyAccess().getKeyEStringParserRuleCall_4_0());
            				
            pushFollow(FOLLOW_18);
            lv_key_4_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getBooleanPropertyRule());
            					}
            					set(
            						current,
            						"key",
            						lv_key_4_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_5=(Token)match(input,13,FOLLOW_2); 

            			newLeafNode(otherlv_5, grammarAccess.getBooleanPropertyAccess().getRightCurlyBracketKeyword_5());
            		

            }


            }


            	leaveRule();

        }

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


    // $ANTLR start "entryRuleReferenceProperty"
    // InternalPseim.g:703:1: entryRuleReferenceProperty returns [EObject current=null] : iv_ruleReferenceProperty= ruleReferenceProperty EOF ;
    public final EObject entryRuleReferenceProperty() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleReferenceProperty = null;


        try {
            // InternalPseim.g:703:58: (iv_ruleReferenceProperty= ruleReferenceProperty EOF )
            // InternalPseim.g:704:2: iv_ruleReferenceProperty= ruleReferenceProperty EOF
            {
             newCompositeNode(grammarAccess.getReferencePropertyRule()); 
            pushFollow(FOLLOW_1);
            iv_ruleReferenceProperty=ruleReferenceProperty();

            state._fsp--;

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

            }

        }

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


    // $ANTLR start "ruleReferenceProperty"
    // InternalPseim.g:710:1: ruleReferenceProperty returns [EObject current=null] : (otherlv_0= 'ReferenceProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'ref' ( ( ruleEString ) ) otherlv_6= '}' ) ;
    public final EObject ruleReferenceProperty() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        Token otherlv_1=null;
        Token otherlv_2=null;
        Token otherlv_4=null;
        Token otherlv_6=null;
        AntlrDatatypeRuleToken lv_key_3_0 = null;



        	enterRule();

        try {
            // InternalPseim.g:716:2: ( (otherlv_0= 'ReferenceProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'ref' ( ( ruleEString ) ) otherlv_6= '}' ) )
            // InternalPseim.g:717:2: (otherlv_0= 'ReferenceProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'ref' ( ( ruleEString ) ) otherlv_6= '}' )
            {
            // InternalPseim.g:717:2: (otherlv_0= 'ReferenceProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'ref' ( ( ruleEString ) ) otherlv_6= '}' )
            // InternalPseim.g:718:3: otherlv_0= 'ReferenceProperty' otherlv_1= '{' otherlv_2= 'key' ( (lv_key_3_0= ruleEString ) ) otherlv_4= 'ref' ( ( ruleEString ) ) otherlv_6= '}'
            {
            otherlv_0=(Token)match(input,25,FOLLOW_14); 

            			newLeafNode(otherlv_0, grammarAccess.getReferencePropertyAccess().getReferencePropertyKeyword_0());
            		
            otherlv_1=(Token)match(input,12,FOLLOW_15); 

            			newLeafNode(otherlv_1, grammarAccess.getReferencePropertyAccess().getLeftCurlyBracketKeyword_1());
            		
            otherlv_2=(Token)match(input,21,FOLLOW_3); 

            			newLeafNode(otherlv_2, grammarAccess.getReferencePropertyAccess().getKeyKeyword_2());
            		
            // InternalPseim.g:730:3: ( (lv_key_3_0= ruleEString ) )
            // InternalPseim.g:731:4: (lv_key_3_0= ruleEString )
            {
            // InternalPseim.g:731:4: (lv_key_3_0= ruleEString )
            // InternalPseim.g:732:5: lv_key_3_0= ruleEString
            {

            					newCompositeNode(grammarAccess.getReferencePropertyAccess().getKeyEStringParserRuleCall_3_0());
            				
            pushFollow(FOLLOW_20);
            lv_key_3_0=ruleEString();

            state._fsp--;


            					if (current==null) {
            						current = createModelElementForParent(grammarAccess.getReferencePropertyRule());
            					}
            					set(
            						current,
            						"key",
            						lv_key_3_0,
            						"com.irtsaintexupery.xtext.Pseim.EString");
            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_4=(Token)match(input,26,FOLLOW_3); 

            			newLeafNode(otherlv_4, grammarAccess.getReferencePropertyAccess().getRefKeyword_4());
            		
            // InternalPseim.g:753:3: ( ( ruleEString ) )
            // InternalPseim.g:754:4: ( ruleEString )
            {
            // InternalPseim.g:754:4: ( ruleEString )
            // InternalPseim.g:755:5: ruleEString
            {

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

            					newCompositeNode(grammarAccess.getReferencePropertyAccess().getRefPropertyHolderCrossReference_5_0());
            				
            pushFollow(FOLLOW_18);
            ruleEString();

            state._fsp--;


            					afterParserOrEnumRuleCall();
            				

            }


            }

            otherlv_6=(Token)match(input,13,FOLLOW_2); 

            			newLeafNode(otherlv_6, grammarAccess.getReferencePropertyAccess().getRightCurlyBracketKeyword_6());
            		

            }


            }


            	leaveRule();

        }

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


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

        AntlrDatatypeRuleToken iv_ruleEInt = null;


        try {
            // InternalPseim.g:777:44: (iv_ruleEInt= ruleEInt EOF )
            // InternalPseim.g:778: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"
    // InternalPseim.g:784: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 {
            // InternalPseim.g:790:2: ( ( (kw= '-' )? this_INT_1= RULE_INT ) )
            // InternalPseim.g:791:2: ( (kw= '-' )? this_INT_1= RULE_INT )
            {
            // InternalPseim.g:791:2: ( (kw= '-' )? this_INT_1= RULE_INT )
            // InternalPseim.g:792:3: (kw= '-' )? this_INT_1= RULE_INT
            {
            // InternalPseim.g:792:3: (kw= '-' )?
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==27) ) {
                alt10=1;
            }
            switch (alt10) {
                case 1 :
                    // InternalPseim.g:793:4: kw= '-'
                    {
                    kw=(Token)match(input,27,FOLLOW_21); 

                    				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 "rulePortDirection"
    // InternalPseim.g:810:1: rulePortDirection returns [Enumerator current=null] : ( (enumLiteral_0= 'unspec' ) | (enumLiteral_1= 'in' ) | (enumLiteral_2= 'out' ) | (enumLiteral_3= 'inout' ) ) ;
    public final Enumerator rulePortDirection() throws RecognitionException {
        Enumerator current = null;

        Token enumLiteral_0=null;
        Token enumLiteral_1=null;
        Token enumLiteral_2=null;
        Token enumLiteral_3=null;


        	enterRule();

        try {
            // InternalPseim.g:816:2: ( ( (enumLiteral_0= 'unspec' ) | (enumLiteral_1= 'in' ) | (enumLiteral_2= 'out' ) | (enumLiteral_3= 'inout' ) ) )
            // InternalPseim.g:817:2: ( (enumLiteral_0= 'unspec' ) | (enumLiteral_1= 'in' ) | (enumLiteral_2= 'out' ) | (enumLiteral_3= 'inout' ) )
            {
            // InternalPseim.g:817:2: ( (enumLiteral_0= 'unspec' ) | (enumLiteral_1= 'in' ) | (enumLiteral_2= 'out' ) | (enumLiteral_3= 'inout' ) )
            int alt11=4;
            switch ( input.LA(1) ) {
            case 28:
                {
                alt11=1;
                }
                break;
            case 29:
                {
                alt11=2;
                }
                break;
            case 30:
                {
                alt11=3;
                }
                break;
            case 31:
                {
                alt11=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 11, 0, input);

                throw nvae;
            }

            switch (alt11) {
                case 1 :
                    // InternalPseim.g:818:3: (enumLiteral_0= 'unspec' )
                    {
                    // InternalPseim.g:818:3: (enumLiteral_0= 'unspec' )
                    // InternalPseim.g:819:4: enumLiteral_0= 'unspec'
                    {
                    enumLiteral_0=(Token)match(input,28,FOLLOW_2); 

                    				current = grammarAccess.getPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                    				newLeafNode(enumLiteral_0, grammarAccess.getPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0());
                    			

                    }


                    }
                    break;
                case 2 :
                    // InternalPseim.g:826:3: (enumLiteral_1= 'in' )
                    {
                    // InternalPseim.g:826:3: (enumLiteral_1= 'in' )
                    // InternalPseim.g:827:4: enumLiteral_1= 'in'
                    {
                    enumLiteral_1=(Token)match(input,29,FOLLOW_2); 

                    				current = grammarAccess.getPortDirectionAccess().getINEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                    				newLeafNode(enumLiteral_1, grammarAccess.getPortDirectionAccess().getINEnumLiteralDeclaration_1());
                    			

                    }


                    }
                    break;
                case 3 :
                    // InternalPseim.g:834:3: (enumLiteral_2= 'out' )
                    {
                    // InternalPseim.g:834:3: (enumLiteral_2= 'out' )
                    // InternalPseim.g:835:4: enumLiteral_2= 'out'
                    {
                    enumLiteral_2=(Token)match(input,30,FOLLOW_2); 

                    				current = grammarAccess.getPortDirectionAccess().getOUTEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
                    				newLeafNode(enumLiteral_2, grammarAccess.getPortDirectionAccess().getOUTEnumLiteralDeclaration_2());
                    			

                    }


                    }
                    break;
                case 4 :
                    // InternalPseim.g:842:3: (enumLiteral_3= 'inout' )
                    {
                    // InternalPseim.g:842:3: (enumLiteral_3= 'inout' )
                    // InternalPseim.g:843:4: enumLiteral_3= 'inout'
                    {
                    enumLiteral_3=(Token)match(input,31,FOLLOW_2); 

                    				current = grammarAccess.getPortDirectionAccess().getINOUTEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
                    				newLeafNode(enumLiteral_3, grammarAccess.getPortDirectionAccess().getINOUTEnumLiteralDeclaration_3());
                    			

                    }


                    }
                    break;

            }


            }


            	leaveRule();

        }

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

    // 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[]{0x0000000000000030L});
    public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000001002L});
    public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000006010L});
    public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x00000000F0020000L});
    public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000030000L});
    public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x00000000F0000000L});
    public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000004010L});
    public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000080002L});
    public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000200000L});
    public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000008000040L});
    public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000000000040L});

}