package org.xtext.example.mydsl3.parser.antlr.internal; 

import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.xtext.parsetree.*;
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 org.eclipse.xtext.conversion.ValueConverterException;
import org.xtext.example.mydsl3.services.MyDslGrammarAccess;



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

@SuppressWarnings("all")
public class InternalMyDslParser 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", "'AgentInternalViewPoint'", "'{'", "'}'", "'Belief'", "';'", "'Goal'", "'Capabilities'", "'includes'", "'uses'", "'applies'", "'AgentState'", "'SemanticWebAgent'", "'contains'", "'has'", "'plays'", "'Role'", "'Plan'", "'dispatches'", "'AgentType'", "'Behaviour'", "'executes'", "'composed_of'"
    };
    public static final int RULE_ID=4;
    public static final int RULE_STRING=5;
    public static final int RULE_ANY_OTHER=10;
    public static final int RULE_INT=6;
    public static final int RULE_WS=9;
    public static final int RULE_SL_COMMENT=8;
    public static final int EOF=-1;
    public static final int RULE_ML_COMMENT=7;

        public InternalMyDslParser(TokenStream input) {
            super(input);
        }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g"; }



     	private MyDslGrammarAccess grammarAccess;
     	
        public InternalMyDslParser(TokenStream input, IAstFactory factory, MyDslGrammarAccess grammarAccess) {
            this(input);
            this.factory = factory;
            registerRules(grammarAccess.getGrammar());
            this.grammarAccess = grammarAccess;
        }
        
        @Override
        protected InputStream getTokenFile() {
        	ClassLoader classLoader = getClass().getClassLoader();
        	return classLoader.getResourceAsStream("org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.tokens");
        }
        
        @Override
        protected String getFirstRuleName() {
        	return "AgentInternalViewpoint";	
       	}
       	
       	@Override
       	protected MyDslGrammarAccess getGrammarAccess() {
       		return grammarAccess;
       	}



    // $ANTLR start entryRuleAgentInternalViewpoint
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:77:1: entryRuleAgentInternalViewpoint returns [EObject current=null] : iv_ruleAgentInternalViewpoint= ruleAgentInternalViewpoint EOF ;
    public final EObject entryRuleAgentInternalViewpoint() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAgentInternalViewpoint = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:78:2: (iv_ruleAgentInternalViewpoint= ruleAgentInternalViewpoint EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:79:2: iv_ruleAgentInternalViewpoint= ruleAgentInternalViewpoint EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAgentInternalViewpointRule(), currentNode); 
            pushFollow(FOLLOW_ruleAgentInternalViewpoint_in_entryRuleAgentInternalViewpoint75);
            iv_ruleAgentInternalViewpoint=ruleAgentInternalViewpoint();
            _fsp--;

             current =iv_ruleAgentInternalViewpoint; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAgentInternalViewpoint85); 

            }

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


    // $ANTLR start ruleAgentInternalViewpoint
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:86:1: ruleAgentInternalViewpoint returns [EObject current=null] : ( 'AgentInternalViewPoint' '{' ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) ) ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )* '}' ) ;
    public final EObject ruleAgentInternalViewpoint() throws RecognitionException {
        EObject current = null;

        EObject lv_semanticwebagent_2_0 = null;

        EObject lv_capabilities_3_0 = null;

        EObject lv_capabilities_4_0 = null;

        EObject lv_semanticwebagent_5_0 = null;

        EObject lv_belief_6_0 = null;

        EObject lv_goal_7_0 = null;

        EObject lv_capabilities_8_0 = null;

        EObject lv_agentstate_9_0 = null;

        EObject lv_semanticwebagent_10_0 = null;

        EObject lv_role_11_0 = null;

        EObject lv_plan_12_0 = null;

        EObject lv_agenttype_13_0 = null;

        EObject lv_behaviour_14_0 = null;


         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:91:6: ( ( 'AgentInternalViewPoint' '{' ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) ) ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )* '}' ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:92:1: ( 'AgentInternalViewPoint' '{' ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) ) ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )* '}' )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:92:1: ( 'AgentInternalViewPoint' '{' ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) ) ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )* '}' )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:92:3: 'AgentInternalViewPoint' '{' ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) ) ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )* '}'
            {
            match(input,11,FOLLOW_11_in_ruleAgentInternalViewpoint120); 

                    createLeafNode(grammarAccess.getAgentInternalViewpointAccess().getAgentInternalViewPointKeyword_0(), null); 
                
            match(input,12,FOLLOW_12_in_ruleAgentInternalViewpoint130); 

                    createLeafNode(grammarAccess.getAgentInternalViewpointAccess().getLeftCurlyBracketKeyword_1(), null); 
                
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:100:1: ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) )
            int alt1=2;
            switch ( input.LA(1) ) {
            case 22:
                {
                alt1=1;
                }
                break;
            case RULE_ID:
                {
                int LA1_2 = input.LA(2);

                if ( (LA1_2==12) ) {
                    int LA1_4 = input.LA(3);

                    if ( (LA1_4==23) ) {
                        alt1=1;
                    }
                    else if ( (LA1_4==13||(LA1_4>=18 && LA1_4<=20)) ) {
                        alt1=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("100:1: ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) )", 1, 4, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("100:1: ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) )", 1, 2, input);

                    throw nvae;
                }
                }
                break;
            case 17:
                {
                alt1=2;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("100:1: ( ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) ) | ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) ) )", 1, 0, input);

                throw nvae;
            }

            switch (alt1) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:100:2: ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:100:2: ( ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:100:3: ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) ) ( (lv_capabilities_3_0= ruleCapabilities ) )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:100:3: ( (lv_semanticwebagent_2_0= ruleSemanticWebAgent ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:101:1: (lv_semanticwebagent_2_0= ruleSemanticWebAgent )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:101:1: (lv_semanticwebagent_2_0= ruleSemanticWebAgent )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:102:3: lv_semanticwebagent_2_0= ruleSemanticWebAgent
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_2_0_0_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint153);
                    lv_semanticwebagent_2_0=ruleSemanticWebAgent();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		add(
                    	       			current, 
                    	       			"semanticwebagent",
                    	        		lv_semanticwebagent_2_0, 
                    	        		"SemanticWebAgent", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:124:2: ( (lv_capabilities_3_0= ruleCapabilities ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:125:1: (lv_capabilities_3_0= ruleCapabilities )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:125:1: (lv_capabilities_3_0= ruleCapabilities )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:126:3: lv_capabilities_3_0= ruleCapabilities
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_2_0_1_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint174);
                    lv_capabilities_3_0=ruleCapabilities();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		add(
                    	       			current, 
                    	       			"capabilities",
                    	        		lv_capabilities_3_0, 
                    	        		"Capabilities", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }


                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:149:6: ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:149:6: ( ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:149:7: ( (lv_capabilities_4_0= ruleCapabilities ) ) ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:149:7: ( (lv_capabilities_4_0= ruleCapabilities ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:150:1: (lv_capabilities_4_0= ruleCapabilities )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:150:1: (lv_capabilities_4_0= ruleCapabilities )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:151:3: lv_capabilities_4_0= ruleCapabilities
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_2_1_0_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint203);
                    lv_capabilities_4_0=ruleCapabilities();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		add(
                    	       			current, 
                    	       			"capabilities",
                    	        		lv_capabilities_4_0, 
                    	        		"Capabilities", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:173:2: ( (lv_semanticwebagent_5_0= ruleSemanticWebAgent ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:174:1: (lv_semanticwebagent_5_0= ruleSemanticWebAgent )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:174:1: (lv_semanticwebagent_5_0= ruleSemanticWebAgent )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:175:3: lv_semanticwebagent_5_0= ruleSemanticWebAgent
                    {
                     
                    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_2_1_1_0(), currentNode); 
                    	    
                    pushFollow(FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint224);
                    lv_semanticwebagent_5_0=ruleSemanticWebAgent();
                    _fsp--;


                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode.getParent(), current);
                    	        }
                    	        try {
                    	       		add(
                    	       			current, 
                    	       			"semanticwebagent",
                    	        		lv_semanticwebagent_5_0, 
                    	        		"SemanticWebAgent", 
                    	        		currentNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	        currentNode = currentNode.getParent();
                    	    

                    }


                    }


                    }


                    }
                    break;

            }

            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:197:4: ( ( (lv_belief_6_0= ruleBelief ) ) | ( (lv_goal_7_0= ruleGoal ) ) | ( (lv_capabilities_8_0= ruleCapabilities ) ) | ( (lv_agentstate_9_0= ruleAgentState ) ) | ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) ) | ( (lv_role_11_0= ruleRole ) ) | ( (lv_plan_12_0= rulePlan ) ) | ( (lv_agenttype_13_0= ruleAgentType ) ) | ( (lv_behaviour_14_0= ruleBehaviour ) ) )*
            loop2:
            do {
                int alt2=10;
                switch ( input.LA(1) ) {
                case 14:
                    {
                    alt2=1;
                    }
                    break;
                case 16:
                    {
                    alt2=2;
                    }
                    break;
                case 17:
                    {
                    alt2=3;
                    }
                    break;
                case RULE_ID:
                    {
                    int LA2_5 = input.LA(2);

                    if ( (LA2_5==12) ) {
                        switch ( input.LA(3) ) {
                        case 24:
                            {
                            alt2=6;
                            }
                            break;
                        case 23:
                            {
                            alt2=5;
                            }
                            break;
                        case 31:
                        case 32:
                            {
                            alt2=9;
                            }
                            break;
                        case 28:
                            {
                            alt2=7;
                            }
                            break;
                        case 13:
                        case 18:
                        case 19:
                        case 20:
                            {
                            alt2=3;
                            }
                            break;

                        }

                    }


                    }
                    break;
                case 21:
                    {
                    alt2=4;
                    }
                    break;
                case 22:
                    {
                    alt2=5;
                    }
                    break;
                case 26:
                    {
                    alt2=6;
                    }
                    break;
                case 27:
                    {
                    alt2=7;
                    }
                    break;
                case 29:
                    {
                    alt2=8;
                    }
                    break;
                case 30:
                    {
                    alt2=9;
                    }
                    break;

                }

                switch (alt2) {
            	case 1 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:197:5: ( (lv_belief_6_0= ruleBelief ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:197:5: ( (lv_belief_6_0= ruleBelief ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:198:1: (lv_belief_6_0= ruleBelief )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:198:1: (lv_belief_6_0= ruleBelief )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:199:3: lv_belief_6_0= ruleBelief
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getBeliefBeliefParserRuleCall_3_0_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleBelief_in_ruleAgentInternalViewpoint248);
            	    lv_belief_6_0=ruleBelief();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"belief",
            	    	        		lv_belief_6_0, 
            	    	        		"Belief", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 2 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:222:6: ( (lv_goal_7_0= ruleGoal ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:222:6: ( (lv_goal_7_0= ruleGoal ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:223:1: (lv_goal_7_0= ruleGoal )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:223:1: (lv_goal_7_0= ruleGoal )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:224:3: lv_goal_7_0= ruleGoal
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getGoalGoalParserRuleCall_3_1_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleGoal_in_ruleAgentInternalViewpoint275);
            	    lv_goal_7_0=ruleGoal();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"goal",
            	    	        		lv_goal_7_0, 
            	    	        		"Goal", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 3 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:247:6: ( (lv_capabilities_8_0= ruleCapabilities ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:247:6: ( (lv_capabilities_8_0= ruleCapabilities ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:248:1: (lv_capabilities_8_0= ruleCapabilities )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:248:1: (lv_capabilities_8_0= ruleCapabilities )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:249:3: lv_capabilities_8_0= ruleCapabilities
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_3_2_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint302);
            	    lv_capabilities_8_0=ruleCapabilities();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"capabilities",
            	    	        		lv_capabilities_8_0, 
            	    	        		"Capabilities", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 4 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:272:6: ( (lv_agentstate_9_0= ruleAgentState ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:272:6: ( (lv_agentstate_9_0= ruleAgentState ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:273:1: (lv_agentstate_9_0= ruleAgentState )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:273:1: (lv_agentstate_9_0= ruleAgentState )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:274:3: lv_agentstate_9_0= ruleAgentState
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getAgentstateAgentStateParserRuleCall_3_3_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleAgentState_in_ruleAgentInternalViewpoint329);
            	    lv_agentstate_9_0=ruleAgentState();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"agentstate",
            	    	        		lv_agentstate_9_0, 
            	    	        		"AgentState", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 5 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:297:6: ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:297:6: ( (lv_semanticwebagent_10_0= ruleSemanticWebAgent ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:298:1: (lv_semanticwebagent_10_0= ruleSemanticWebAgent )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:298:1: (lv_semanticwebagent_10_0= ruleSemanticWebAgent )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:299:3: lv_semanticwebagent_10_0= ruleSemanticWebAgent
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_3_4_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint356);
            	    lv_semanticwebagent_10_0=ruleSemanticWebAgent();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"semanticwebagent",
            	    	        		lv_semanticwebagent_10_0, 
            	    	        		"SemanticWebAgent", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 6 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:322:6: ( (lv_role_11_0= ruleRole ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:322:6: ( (lv_role_11_0= ruleRole ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:323:1: (lv_role_11_0= ruleRole )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:323:1: (lv_role_11_0= ruleRole )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:324:3: lv_role_11_0= ruleRole
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getRoleRoleParserRuleCall_3_5_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleRole_in_ruleAgentInternalViewpoint383);
            	    lv_role_11_0=ruleRole();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"role",
            	    	        		lv_role_11_0, 
            	    	        		"Role", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 7 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:347:6: ( (lv_plan_12_0= rulePlan ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:347:6: ( (lv_plan_12_0= rulePlan ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:348:1: (lv_plan_12_0= rulePlan )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:348:1: (lv_plan_12_0= rulePlan )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:349:3: lv_plan_12_0= rulePlan
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getPlanPlanParserRuleCall_3_6_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_rulePlan_in_ruleAgentInternalViewpoint410);
            	    lv_plan_12_0=rulePlan();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"plan",
            	    	        		lv_plan_12_0, 
            	    	        		"Plan", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 8 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:372:6: ( (lv_agenttype_13_0= ruleAgentType ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:372:6: ( (lv_agenttype_13_0= ruleAgentType ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:373:1: (lv_agenttype_13_0= ruleAgentType )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:373:1: (lv_agenttype_13_0= ruleAgentType )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:374:3: lv_agenttype_13_0= ruleAgentType
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getAgenttypeAgentTypeParserRuleCall_3_7_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleAgentType_in_ruleAgentInternalViewpoint437);
            	    lv_agenttype_13_0=ruleAgentType();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"agenttype",
            	    	        		lv_agenttype_13_0, 
            	    	        		"AgentType", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;
            	case 9 :
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:397:6: ( (lv_behaviour_14_0= ruleBehaviour ) )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:397:6: ( (lv_behaviour_14_0= ruleBehaviour ) )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:398:1: (lv_behaviour_14_0= ruleBehaviour )
            	    {
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:398:1: (lv_behaviour_14_0= ruleBehaviour )
            	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:399:3: lv_behaviour_14_0= ruleBehaviour
            	    {
            	     
            	    	        currentNode=createCompositeNode(grammarAccess.getAgentInternalViewpointAccess().getBehaviourBehaviourParserRuleCall_3_8_0(), currentNode); 
            	    	    
            	    pushFollow(FOLLOW_ruleBehaviour_in_ruleAgentInternalViewpoint464);
            	    lv_behaviour_14_0=ruleBehaviour();
            	    _fsp--;


            	    	        if (current==null) {
            	    	            current = factory.create(grammarAccess.getAgentInternalViewpointRule().getType().getClassifier());
            	    	            associateNodeWithAstElement(currentNode.getParent(), current);
            	    	        }
            	    	        try {
            	    	       		add(
            	    	       			current, 
            	    	       			"behaviour",
            	    	        		lv_behaviour_14_0, 
            	    	        		"Behaviour", 
            	    	        		currentNode);
            	    	        } catch (ValueConverterException vce) {
            	    				handleValueConverterException(vce);
            	    	        }
            	    	        currentNode = currentNode.getParent();
            	    	    

            	    }


            	    }


            	    }
            	    break;

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

            match(input,13,FOLLOW_13_in_ruleAgentInternalViewpoint476); 

                    createLeafNode(grammarAccess.getAgentInternalViewpointAccess().getRGhtCurlyBracketKeyword_4(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAgentInternalViewpoint


    // $ANTLR start entryRuleBelief
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:433:1: entryRuleBelief returns [EObject current=null] : iv_ruleBelief= ruleBelief EOF ;
    public final EObject entryRuleBelief() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleBelief = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:434:2: (iv_ruleBelief= ruleBelief EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:435:2: iv_ruleBelief= ruleBelief EOF
            {
             currentNode = createCompositeNode(grammarAccess.getBeliefRule(), currentNode); 
            pushFollow(FOLLOW_ruleBelief_in_entryRuleBelief512);
            iv_ruleBelief=ruleBelief();
            _fsp--;

             current =iv_ruleBelief; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleBelief522); 

            }

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


    // $ANTLR start ruleBelief
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:442:1: ruleBelief returns [EObject current=null] : ( 'Belief' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_dynamic_3_0= RULE_INT ) ) ';' ) ;
    public final EObject ruleBelief() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_description_2_0=null;
        Token lv_dynamic_3_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:447:6: ( ( 'Belief' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_dynamic_3_0= RULE_INT ) ) ';' ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:448:1: ( 'Belief' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_dynamic_3_0= RULE_INT ) ) ';' )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:448:1: ( 'Belief' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_dynamic_3_0= RULE_INT ) ) ';' )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:448:3: 'Belief' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_dynamic_3_0= RULE_INT ) ) ';'
            {
            match(input,14,FOLLOW_14_in_ruleBelief557); 

                    createLeafNode(grammarAccess.getBeliefAccess().getBeliefKeyword_0(), null); 
                
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:452:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:453:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:453:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:454:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBelief574); 

            			createLeafNode(grammarAccess.getBeliefAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getBeliefRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:476:2: ( (lv_description_2_0= RULE_STRING ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:477:1: (lv_description_2_0= RULE_STRING )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:477:1: (lv_description_2_0= RULE_STRING )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:478:3: lv_description_2_0= RULE_STRING
            {
            lv_description_2_0=(Token)input.LT(1);
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleBelief596); 

            			createLeafNode(grammarAccess.getBeliefAccess().getDescriptionSTRINGTerminalRuleCall_2_0(), "description"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getBeliefRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"description",
            	        		lv_description_2_0, 
            	        		"STRING", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:500:2: ( (lv_dynamic_3_0= RULE_INT ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:501:1: (lv_dynamic_3_0= RULE_INT )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:501:1: (lv_dynamic_3_0= RULE_INT )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:502:3: lv_dynamic_3_0= RULE_INT
            {
            lv_dynamic_3_0=(Token)input.LT(1);
            match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleBelief618); 

            			createLeafNode(grammarAccess.getBeliefAccess().getDynamicINTTerminalRuleCall_3_0(), "dynamic"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getBeliefRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"dynamic",
            	        		lv_dynamic_3_0, 
            	        		"INT", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,15,FOLLOW_15_in_ruleBelief633); 

                    createLeafNode(grammarAccess.getBeliefAccess().getSemColonKeyword_4(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleBelief


    // $ANTLR start entryRuleGoal
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:536:1: entryRuleGoal returns [EObject current=null] : iv_ruleGoal= ruleGoal EOF ;
    public final EObject entryRuleGoal() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleGoal = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:537:2: (iv_ruleGoal= ruleGoal EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:538:2: iv_ruleGoal= ruleGoal EOF
            {
             currentNode = createCompositeNode(grammarAccess.getGoalRule(), currentNode); 
            pushFollow(FOLLOW_ruleGoal_in_entryRuleGoal669);
            iv_ruleGoal=ruleGoal();
            _fsp--;

             current =iv_ruleGoal; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleGoal679); 

            }

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


    // $ANTLR start ruleGoal
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:545:1: ruleGoal returns [EObject current=null] : ( 'Goal' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_recur_3_0= RULE_INT ) ) ';' ) ;
    public final EObject ruleGoal() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_description_2_0=null;
        Token lv_recur_3_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:550:6: ( ( 'Goal' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_recur_3_0= RULE_INT ) ) ';' ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:551:1: ( 'Goal' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_recur_3_0= RULE_INT ) ) ';' )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:551:1: ( 'Goal' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_recur_3_0= RULE_INT ) ) ';' )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:551:3: 'Goal' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_recur_3_0= RULE_INT ) ) ';'
            {
            match(input,16,FOLLOW_16_in_ruleGoal714); 

                    createLeafNode(grammarAccess.getGoalAccess().getGoalKeyword_0(), null); 
                
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:555:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:556:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:556:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:557:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleGoal731); 

            			createLeafNode(grammarAccess.getGoalAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getGoalRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:579:2: ( (lv_description_2_0= RULE_STRING ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:580:1: (lv_description_2_0= RULE_STRING )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:580:1: (lv_description_2_0= RULE_STRING )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:581:3: lv_description_2_0= RULE_STRING
            {
            lv_description_2_0=(Token)input.LT(1);
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleGoal753); 

            			createLeafNode(grammarAccess.getGoalAccess().getDescriptionSTRINGTerminalRuleCall_2_0(), "description"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getGoalRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"description",
            	        		lv_description_2_0, 
            	        		"STRING", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:603:2: ( (lv_recur_3_0= RULE_INT ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:604:1: (lv_recur_3_0= RULE_INT )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:604:1: (lv_recur_3_0= RULE_INT )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:605:3: lv_recur_3_0= RULE_INT
            {
            lv_recur_3_0=(Token)input.LT(1);
            match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleGoal775); 

            			createLeafNode(grammarAccess.getGoalAccess().getRecurINTTerminalRuleCall_3_0(), "recur"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getGoalRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"recur",
            	        		lv_recur_3_0, 
            	        		"INT", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,15,FOLLOW_15_in_ruleGoal790); 

                    createLeafNode(grammarAccess.getGoalAccess().getSemColonKeyword_4(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleGoal


    // $ANTLR start entryRuleCapabilities
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:639:1: entryRuleCapabilities returns [EObject current=null] : iv_ruleCapabilities= ruleCapabilities EOF ;
    public final EObject entryRuleCapabilities() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleCapabilities = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:640:2: (iv_ruleCapabilities= ruleCapabilities EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:641:2: iv_ruleCapabilities= ruleCapabilities EOF
            {
             currentNode = createCompositeNode(grammarAccess.getCapabilitiesRule(), currentNode); 
            pushFollow(FOLLOW_ruleCapabilities_in_entryRuleCapabilities826);
            iv_ruleCapabilities=ruleCapabilities();
            _fsp--;

             current =iv_ruleCapabilities; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleCapabilities836); 

            }

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


    // $ANTLR start ruleCapabilities
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:648:1: ruleCapabilities returns [EObject current=null] : ( ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' ) ) ;
    public final EObject ruleCapabilities() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_description_2_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:653:6: ( ( ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' ) ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:654:1: ( ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' ) )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:654:1: ( ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' ) )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==17) ) {
                alt4=1;
            }
            else if ( (LA4_0==RULE_ID) ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("654:1: ( ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' ) )", 4, 0, input);

                throw nvae;
            }
            switch (alt4) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:654:2: ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:654:2: ( 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:654:4: 'Capabilities' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ';'
                    {
                    match(input,17,FOLLOW_17_in_ruleCapabilities872); 

                            createLeafNode(grammarAccess.getCapabilitiesAccess().getCapabilitiesKeyword_0_0(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:658:1: ( (lv_name_1_0= RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:659:1: (lv_name_1_0= RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:659:1: (lv_name_1_0= RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:660:3: lv_name_1_0= RULE_ID
                    {
                    lv_name_1_0=(Token)input.LT(1);
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCapabilities889); 

                    			createLeafNode(grammarAccess.getCapabilitiesAccess().getNameIDTerminalRuleCall_0_1_0(), "name"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"name",
                    	        		lv_name_1_0, 
                    	        		"ID", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:682:2: ( (lv_description_2_0= RULE_STRING ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:683:1: (lv_description_2_0= RULE_STRING )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:683:1: (lv_description_2_0= RULE_STRING )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:684:3: lv_description_2_0= RULE_STRING
                    {
                    lv_description_2_0=(Token)input.LT(1);
                    match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleCapabilities911); 

                    			createLeafNode(grammarAccess.getCapabilitiesAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0(), "description"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"description",
                    	        		lv_description_2_0, 
                    	        		"STRING", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleCapabilities926); 

                            createLeafNode(grammarAccess.getCapabilitiesAccess().getSemColonKeyword_0_3(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:711:6: ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:711:6: ( ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:711:7: ( ( RULE_ID ) ) '{' ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )* '}'
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:711:7: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:712:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:712:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:713:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCapabilities952); 

                    		createLeafNode(grammarAccess.getCapabilitiesAccess().getCapCapabilitiesCrossReference_1_0_0(), "cap"); 
                    	

                    }


                    }

                    match(input,12,FOLLOW_12_in_ruleCapabilities962); 

                            createLeafNode(grammarAccess.getCapabilitiesAccess().getLeftCurlyBracketKeyword_1_1(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:729:1: ( ( 'includes' ( ( RULE_ID ) ) ';' ) | ( 'uses' ( ( RULE_ID ) ) ';' ) | ( 'applies' ( ( RULE_ID ) ) ';' ) )*
                    loop3:
                    do {
                        int alt3=4;
                        switch ( input.LA(1) ) {
                        case 18:
                            {
                            alt3=1;
                            }
                            break;
                        case 19:
                            {
                            alt3=2;
                            }
                            break;
                        case 20:
                            {
                            alt3=3;
                            }
                            break;

                        }

                        switch (alt3) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:729:2: ( 'includes' ( ( RULE_ID ) ) ';' )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:729:2: ( 'includes' ( ( RULE_ID ) ) ';' )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:729:4: 'includes' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,18,FOLLOW_18_in_ruleCapabilities974); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getIncludesKeyword_1_2_0_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:733:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:734:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:734:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:735:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCapabilities992); 

                    	    		createLeafNode(grammarAccess.getCapabilitiesAccess().getBeliefBeliefCrossReference_1_2_0_1_0(), "belief"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleCapabilities1002); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_0_2(), null); 
                    	        

                    	    }


                    	    }
                    	    break;
                    	case 2 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:752:6: ( 'uses' ( ( RULE_ID ) ) ';' )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:752:6: ( 'uses' ( ( RULE_ID ) ) ';' )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:752:8: 'uses' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,19,FOLLOW_19_in_ruleCapabilities1020); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getUsesKeyword_1_2_1_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:756:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:757:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:757:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:758:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCapabilities1038); 

                    	    		createLeafNode(grammarAccess.getCapabilitiesAccess().getGoalGoalCrossReference_1_2_1_1_0(), "goal"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleCapabilities1048); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_1_2(), null); 
                    	        

                    	    }


                    	    }
                    	    break;
                    	case 3 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:775:6: ( 'applies' ( ( RULE_ID ) ) ';' )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:775:6: ( 'applies' ( ( RULE_ID ) ) ';' )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:775:8: 'applies' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,20,FOLLOW_20_in_ruleCapabilities1066); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getAppliesKeyword_1_2_2_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:779:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:780:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:780:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:781:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getCapabilitiesRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleCapabilities1084); 

                    	    		createLeafNode(grammarAccess.getCapabilitiesAccess().getPlanPlanCrossReference_1_2_2_1_0(), "plan"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleCapabilities1094); 

                    	            createLeafNode(grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_2_2(), null); 
                    	        

                    	    }


                    	    }
                    	    break;

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

                    match(input,13,FOLLOW_13_in_ruleCapabilities1107); 

                            createLeafNode(grammarAccess.getCapabilitiesAccess().getRGhtCurlyBracketKeyword_1_3(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleCapabilities


    // $ANTLR start entryRuleAgentState
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:809:1: entryRuleAgentState returns [EObject current=null] : iv_ruleAgentState= ruleAgentState EOF ;
    public final EObject entryRuleAgentState() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAgentState = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:810:2: (iv_ruleAgentState= ruleAgentState EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:811:2: iv_ruleAgentState= ruleAgentState EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAgentStateRule(), currentNode); 
            pushFollow(FOLLOW_ruleAgentState_in_entryRuleAgentState1144);
            iv_ruleAgentState=ruleAgentState();
            _fsp--;

             current =iv_ruleAgentState; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAgentState1154); 

            }

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


    // $ANTLR start ruleAgentState
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:818:1: ruleAgentState returns [EObject current=null] : ( 'AgentState' ( (lv_name_1_0= RULE_ID ) ) ';' ) ;
    public final EObject ruleAgentState() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:823:6: ( ( 'AgentState' ( (lv_name_1_0= RULE_ID ) ) ';' ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:824:1: ( 'AgentState' ( (lv_name_1_0= RULE_ID ) ) ';' )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:824:1: ( 'AgentState' ( (lv_name_1_0= RULE_ID ) ) ';' )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:824:3: 'AgentState' ( (lv_name_1_0= RULE_ID ) ) ';'
            {
            match(input,21,FOLLOW_21_in_ruleAgentState1189); 

                    createLeafNode(grammarAccess.getAgentStateAccess().getAgentStateKeyword_0(), null); 
                
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:828:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:829:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:829:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:830:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAgentState1206); 

            			createLeafNode(grammarAccess.getAgentStateAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getAgentStateRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,15,FOLLOW_15_in_ruleAgentState1221); 

                    createLeafNode(grammarAccess.getAgentStateAccess().getSemColonKeyword_2(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAgentState


    // $ANTLR start entryRuleSemanticWebAgent
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:864:1: entryRuleSemanticWebAgent returns [EObject current=null] : iv_ruleSemanticWebAgent= ruleSemanticWebAgent EOF ;
    public final EObject entryRuleSemanticWebAgent() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleSemanticWebAgent = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:865:2: (iv_ruleSemanticWebAgent= ruleSemanticWebAgent EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:866:2: iv_ruleSemanticWebAgent= ruleSemanticWebAgent EOF
            {
             currentNode = createCompositeNode(grammarAccess.getSemanticWebAgentRule(), currentNode); 
            pushFollow(FOLLOW_ruleSemanticWebAgent_in_entryRuleSemanticWebAgent1257);
            iv_ruleSemanticWebAgent=ruleSemanticWebAgent();
            _fsp--;

             current =iv_ruleSemanticWebAgent; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleSemanticWebAgent1267); 

            }

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


    // $ANTLR start ruleSemanticWebAgent
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:873:1: ruleSemanticWebAgent returns [EObject current=null] : ( ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' ) ) ;
    public final EObject ruleSemanticWebAgent() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_description_2_0=null;
        Token lv_properties_3_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:878:6: ( ( ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' ) ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:879:1: ( ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' ) )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:879:1: ( ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' ) )
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( (LA8_0==22) ) {
                alt8=1;
            }
            else if ( (LA8_0==RULE_ID) ) {
                alt8=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("879:1: ( ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' ) | ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' ) )", 8, 0, input);

                throw nvae;
            }
            switch (alt8) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:879:2: ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:879:2: ( 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:879:4: 'SemanticWebAgent' ( (lv_name_1_0= RULE_ID ) ) ( (lv_description_2_0= RULE_STRING ) ) ( (lv_properties_3_0= RULE_STRING ) ) ';'
                    {
                    match(input,22,FOLLOW_22_in_ruleSemanticWebAgent1303); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemanticWebAgentKeyword_0_0(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:883:1: ( (lv_name_1_0= RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:884:1: (lv_name_1_0= RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:884:1: (lv_name_1_0= RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:885:3: lv_name_1_0= RULE_ID
                    {
                    lv_name_1_0=(Token)input.LT(1);
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1320); 

                    			createLeafNode(grammarAccess.getSemanticWebAgentAccess().getNameIDTerminalRuleCall_0_1_0(), "name"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"name",
                    	        		lv_name_1_0, 
                    	        		"ID", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:907:2: ( (lv_description_2_0= RULE_STRING ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:908:1: (lv_description_2_0= RULE_STRING )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:908:1: (lv_description_2_0= RULE_STRING )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:909:3: lv_description_2_0= RULE_STRING
                    {
                    lv_description_2_0=(Token)input.LT(1);
                    match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleSemanticWebAgent1342); 

                    			createLeafNode(grammarAccess.getSemanticWebAgentAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0(), "description"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"description",
                    	        		lv_description_2_0, 
                    	        		"STRING", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:931:2: ( (lv_properties_3_0= RULE_STRING ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:932:1: (lv_properties_3_0= RULE_STRING )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:932:1: (lv_properties_3_0= RULE_STRING )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:933:3: lv_properties_3_0= RULE_STRING
                    {
                    lv_properties_3_0=(Token)input.LT(1);
                    match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleSemanticWebAgent1364); 

                    			createLeafNode(grammarAccess.getSemanticWebAgentAccess().getPropertiesSTRINGTerminalRuleCall_0_3_0(), "properties"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"properties",
                    	        		lv_properties_3_0, 
                    	        		"STRING", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1379); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_0_4(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:960:6: ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:960:6: ( ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:960:7: ( ( RULE_ID ) ) ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* ) '}'
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:960:7: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:961:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:961:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:962:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1405); 

                    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemanticwebagentSemanticWebAgentCrossReference_1_0_0(), "semanticwebagent"); 
                    	

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:974:2: ( '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )* )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:974:4: '{' 'contains' ( ( RULE_ID ) ) ';' ( 'includes' ( ( RULE_ID ) ) ';' )* 'includes' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )? 'plays' ( ( RULE_ID ) ) ';' ( 'plays' ( ( RULE_ID ) ) ';' )*
                    {
                    match(input,12,FOLLOW_12_in_ruleSemanticWebAgent1416); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getLeftCurlyBracketKeyword_1_1_0(), null); 
                        
                    match(input,23,FOLLOW_23_in_ruleSemanticWebAgent1426); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getContainsKeyword_1_1_1(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:982:1: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:983:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:983:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:984:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1444); 

                    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getAgentstateAgentStateCrossReference_1_1_2_0(), "agentstate"); 
                    	

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1454); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_3(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1000:1: ( 'includes' ( ( RULE_ID ) ) ';' )*
                    loop5:
                    do {
                        int alt5=2;
                        int LA5_0 = input.LA(1);

                        if ( (LA5_0==18) ) {
                            int LA5_1 = input.LA(2);

                            if ( (LA5_1==RULE_ID) ) {
                                int LA5_2 = input.LA(3);

                                if ( (LA5_2==15) ) {
                                    int LA5_3 = input.LA(4);

                                    if ( (LA5_3==18) ) {
                                        alt5=1;
                                    }


                                }


                            }


                        }


                        switch (alt5) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1000:3: 'includes' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,18,FOLLOW_18_in_ruleSemanticWebAgent1465); 

                    	            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getIncludesKeyword_1_1_4_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1004:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1005:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1005:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1006:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1483); 

                    	    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_4_1_0(), "cap"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1493); 

                    	            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_4_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    match(input,18,FOLLOW_18_in_ruleSemanticWebAgent1505); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getIncludesKeyword_1_1_5(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1026:1: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1027:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1027:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1028:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1523); 

                    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_6_0(), "cap"); 
                    	

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1533); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_7(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1044:1: ( 'has' ( ( RULE_ID ) ) ';' )?
                    int alt6=2;
                    int LA6_0 = input.LA(1);

                    if ( (LA6_0==24) ) {
                        alt6=1;
                    }
                    switch (alt6) {
                        case 1 :
                            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1044:3: 'has' ( ( RULE_ID ) ) ';'
                            {
                            match(input,24,FOLLOW_24_in_ruleSemanticWebAgent1544); 

                                    createLeafNode(grammarAccess.getSemanticWebAgentAccess().getHasKeyword_1_1_8_0(), null); 
                                
                            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1048:1: ( ( RULE_ID ) )
                            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1049:1: ( RULE_ID )
                            {
                            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1049:1: ( RULE_ID )
                            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1050:3: RULE_ID
                            {

                            			if (current==null) {
                            	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                            	            associateNodeWithAstElement(currentNode, current);
                            	        }
                                    
                            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1562); 

                            		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getAgenttypeAgentTypeCrossReference_1_1_8_1_0(), "agenttype"); 
                            	

                            }


                            }

                            match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1572); 

                                    createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_8_2(), null); 
                                

                            }
                            break;

                    }

                    match(input,25,FOLLOW_25_in_ruleSemanticWebAgent1584); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getPlaysKeyword_1_1_9(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1070:1: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1071:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1071:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1072:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1602); 

                    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_10_0(), "role"); 
                    	

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1612); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_11(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1088:1: ( 'plays' ( ( RULE_ID ) ) ';' )*
                    loop7:
                    do {
                        int alt7=2;
                        int LA7_0 = input.LA(1);

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


                        switch (alt7) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1088:3: 'plays' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,25,FOLLOW_25_in_ruleSemanticWebAgent1623); 

                    	            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getPlaysKeyword_1_1_12_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1092:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1093:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1093:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1094:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getSemanticWebAgentRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSemanticWebAgent1641); 

                    	    		createLeafNode(grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_12_1_0(), "role"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleSemanticWebAgent1651); 

                    	            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_12_2(), null); 
                    	        

                    	    }
                    	    break;

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


                    }

                    match(input,13,FOLLOW_13_in_ruleSemanticWebAgent1664); 

                            createLeafNode(grammarAccess.getSemanticWebAgentAccess().getRGhtCurlyBracketKeyword_1_2(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleSemanticWebAgent


    // $ANTLR start entryRuleRole
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1122:1: entryRuleRole returns [EObject current=null] : iv_ruleRole= ruleRole EOF ;
    public final EObject entryRuleRole() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleRole = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1123:2: (iv_ruleRole= ruleRole EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1124:2: iv_ruleRole= ruleRole EOF
            {
             currentNode = createCompositeNode(grammarAccess.getRoleRule(), currentNode); 
            pushFollow(FOLLOW_ruleRole_in_entryRuleRole1701);
            iv_ruleRole=ruleRole();
            _fsp--;

             current =iv_ruleRole; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleRole1711); 

            }

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


    // $ANTLR start ruleRole
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1131:1: ruleRole returns [EObject current=null] : ( ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' ) | ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' ) ) ;
    public final EObject ruleRole() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1136:6: ( ( ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' ) | ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' ) ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1137:1: ( ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' ) | ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' ) )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1137:1: ( ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' ) | ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' ) )
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==26) ) {
                alt10=1;
            }
            else if ( (LA10_0==RULE_ID) ) {
                alt10=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("1137:1: ( ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' ) | ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' ) )", 10, 0, input);

                throw nvae;
            }
            switch (alt10) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1137:2: ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1137:2: ( 'Role' ( (lv_name_1_0= RULE_ID ) ) ';' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1137:4: 'Role' ( (lv_name_1_0= RULE_ID ) ) ';'
                    {
                    match(input,26,FOLLOW_26_in_ruleRole1747); 

                            createLeafNode(grammarAccess.getRoleAccess().getRoleKeyword_0_0(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1141:1: ( (lv_name_1_0= RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1142:1: (lv_name_1_0= RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1142:1: (lv_name_1_0= RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1143:3: lv_name_1_0= RULE_ID
                    {
                    lv_name_1_0=(Token)input.LT(1);
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleRole1764); 

                    			createLeafNode(grammarAccess.getRoleAccess().getNameIDTerminalRuleCall_0_1_0(), "name"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getRoleRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"name",
                    	        		lv_name_1_0, 
                    	        		"ID", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleRole1779); 

                            createLeafNode(grammarAccess.getRoleAccess().getSemColonKeyword_0_2(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1170:6: ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1170:6: ( ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1170:7: ( ( RULE_ID ) ) '{' 'has' ( ( RULE_ID ) ) ';' ( 'has' ( ( RULE_ID ) ) ';' )* '}'
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1170:7: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1171:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1171:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1172:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getRoleRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleRole1805); 

                    		createLeafNode(grammarAccess.getRoleAccess().getRoleRoleCrossReference_1_0_0(), "role"); 
                    	

                    }


                    }

                    match(input,12,FOLLOW_12_in_ruleRole1815); 

                            createLeafNode(grammarAccess.getRoleAccess().getLeftCurlyBracketKeyword_1_1(), null); 
                        
                    match(input,24,FOLLOW_24_in_ruleRole1825); 

                            createLeafNode(grammarAccess.getRoleAccess().getHasKeyword_1_2(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1192:1: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1193:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1193:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1194:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getRoleRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleRole1843); 

                    		createLeafNode(grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_3_0(), "beh"); 
                    	

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleRole1853); 

                            createLeafNode(grammarAccess.getRoleAccess().getSemColonKeyword_1_4(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1210:1: ( 'has' ( ( RULE_ID ) ) ';' )*
                    loop9:
                    do {
                        int alt9=2;
                        int LA9_0 = input.LA(1);

                        if ( (LA9_0==24) ) {
                            alt9=1;
                        }


                        switch (alt9) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1210:3: 'has' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,24,FOLLOW_24_in_ruleRole1864); 

                    	            createLeafNode(grammarAccess.getRoleAccess().getHasKeyword_1_5_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1214:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1215:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1215:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1216:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getRoleRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleRole1882); 

                    	    		createLeafNode(grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_5_1_0(), "beh"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleRole1892); 

                    	            createLeafNode(grammarAccess.getRoleAccess().getSemColonKeyword_1_5_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    match(input,13,FOLLOW_13_in_ruleRole1904); 

                            createLeafNode(grammarAccess.getRoleAccess().getRGhtCurlyBracketKeyword_1_6(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleRole


    // $ANTLR start entryRulePlan
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1244:1: entryRulePlan returns [EObject current=null] : iv_rulePlan= rulePlan EOF ;
    public final EObject entryRulePlan() throws RecognitionException {
        EObject current = null;

        EObject iv_rulePlan = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1245:2: (iv_rulePlan= rulePlan EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1246:2: iv_rulePlan= rulePlan EOF
            {
             currentNode = createCompositeNode(grammarAccess.getPlanRule(), currentNode); 
            pushFollow(FOLLOW_rulePlan_in_entryRulePlan1941);
            iv_rulePlan=rulePlan();
            _fsp--;

             current =iv_rulePlan; 
            match(input,EOF,FOLLOW_EOF_in_entryRulePlan1951); 

            }

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


    // $ANTLR start rulePlan
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1253:1: rulePlan returns [EObject current=null] : ( ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' ) ) ;
    public final EObject rulePlan() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_type_2_0=null;
        Token lv_description_3_0=null;
        Token lv_priority_4_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1258:6: ( ( ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' ) ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1259:1: ( ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' ) )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1259:1: ( ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' ) )
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==27) ) {
                alt12=1;
            }
            else if ( (LA12_0==RULE_ID) ) {
                alt12=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("1259:1: ( ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' ) )", 12, 0, input);

                throw nvae;
            }
            switch (alt12) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1259:2: ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1259:2: ( 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1259:4: 'Plan' ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= RULE_STRING ) ) ( (lv_description_3_0= RULE_STRING ) ) ( (lv_priority_4_0= RULE_INT ) ) ';'
                    {
                    match(input,27,FOLLOW_27_in_rulePlan1987); 

                            createLeafNode(grammarAccess.getPlanAccess().getPlanKeyword_0_0(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1263:1: ( (lv_name_1_0= RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1264:1: (lv_name_1_0= RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1264:1: (lv_name_1_0= RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1265:3: lv_name_1_0= RULE_ID
                    {
                    lv_name_1_0=(Token)input.LT(1);
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePlan2004); 

                    			createLeafNode(grammarAccess.getPlanAccess().getNameIDTerminalRuleCall_0_1_0(), "name"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"name",
                    	        		lv_name_1_0, 
                    	        		"ID", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1287:2: ( (lv_type_2_0= RULE_STRING ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1288:1: (lv_type_2_0= RULE_STRING )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1288:1: (lv_type_2_0= RULE_STRING )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1289:3: lv_type_2_0= RULE_STRING
                    {
                    lv_type_2_0=(Token)input.LT(1);
                    match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePlan2026); 

                    			createLeafNode(grammarAccess.getPlanAccess().getTypeSTRINGTerminalRuleCall_0_2_0(), "type"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"type",
                    	        		lv_type_2_0, 
                    	        		"STRING", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1311:2: ( (lv_description_3_0= RULE_STRING ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1312:1: (lv_description_3_0= RULE_STRING )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1312:1: (lv_description_3_0= RULE_STRING )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1313:3: lv_description_3_0= RULE_STRING
                    {
                    lv_description_3_0=(Token)input.LT(1);
                    match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePlan2048); 

                    			createLeafNode(grammarAccess.getPlanAccess().getDescriptionSTRINGTerminalRuleCall_0_3_0(), "description"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"description",
                    	        		lv_description_3_0, 
                    	        		"STRING", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1335:2: ( (lv_priority_4_0= RULE_INT ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1336:1: (lv_priority_4_0= RULE_INT )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1336:1: (lv_priority_4_0= RULE_INT )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1337:3: lv_priority_4_0= RULE_INT
                    {
                    lv_priority_4_0=(Token)input.LT(1);
                    match(input,RULE_INT,FOLLOW_RULE_INT_in_rulePlan2070); 

                    			createLeafNode(grammarAccess.getPlanAccess().getPriorityINTTerminalRuleCall_0_4_0(), "priority"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"priority",
                    	        		lv_priority_4_0, 
                    	        		"INT", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,15,FOLLOW_15_in_rulePlan2085); 

                            createLeafNode(grammarAccess.getPlanAccess().getSemColonKeyword_0_5(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1364:6: ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1364:6: ( ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1364:7: ( ( RULE_ID ) ) '{' ( 'dispatches' ( ( RULE_ID ) ) ';' )* '}'
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1364:7: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1365:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1365:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1366:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePlan2111); 

                    		createLeafNode(grammarAccess.getPlanAccess().getPlanPlanCrossReference_1_0_0(), "plan"); 
                    	

                    }


                    }

                    match(input,12,FOLLOW_12_in_rulePlan2121); 

                            createLeafNode(grammarAccess.getPlanAccess().getLeftCurlyBracketKeyword_1_1(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1382:1: ( 'dispatches' ( ( RULE_ID ) ) ';' )*
                    loop11:
                    do {
                        int alt11=2;
                        int LA11_0 = input.LA(1);

                        if ( (LA11_0==28) ) {
                            alt11=1;
                        }


                        switch (alt11) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1382:3: 'dispatches' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,28,FOLLOW_28_in_rulePlan2132); 

                    	            createLeafNode(grammarAccess.getPlanAccess().getDispatchesKeyword_1_2_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1386:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1387:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1387:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1388:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getPlanRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePlan2150); 

                    	    		createLeafNode(grammarAccess.getPlanAccess().getGoalGoalCrossReference_1_2_1_0(), "goal"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_rulePlan2160); 

                    	            createLeafNode(grammarAccess.getPlanAccess().getSemColonKeyword_1_2_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    match(input,13,FOLLOW_13_in_rulePlan2172); 

                            createLeafNode(grammarAccess.getPlanAccess().getRGhtCurlyBracketKeyword_1_3(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end rulePlan


    // $ANTLR start entryRuleAgentType
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1416:1: entryRuleAgentType returns [EObject current=null] : iv_ruleAgentType= ruleAgentType EOF ;
    public final EObject entryRuleAgentType() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleAgentType = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1417:2: (iv_ruleAgentType= ruleAgentType EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1418:2: iv_ruleAgentType= ruleAgentType EOF
            {
             currentNode = createCompositeNode(grammarAccess.getAgentTypeRule(), currentNode); 
            pushFollow(FOLLOW_ruleAgentType_in_entryRuleAgentType2209);
            iv_ruleAgentType=ruleAgentType();
            _fsp--;

             current =iv_ruleAgentType; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleAgentType2219); 

            }

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


    // $ANTLR start ruleAgentType
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1425:1: ruleAgentType returns [EObject current=null] : ( 'AgentType' ( (lv_name_1_0= RULE_ID ) ) ';' ) ;
    public final EObject ruleAgentType() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1430:6: ( ( 'AgentType' ( (lv_name_1_0= RULE_ID ) ) ';' ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1431:1: ( 'AgentType' ( (lv_name_1_0= RULE_ID ) ) ';' )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1431:1: ( 'AgentType' ( (lv_name_1_0= RULE_ID ) ) ';' )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1431:3: 'AgentType' ( (lv_name_1_0= RULE_ID ) ) ';'
            {
            match(input,29,FOLLOW_29_in_ruleAgentType2254); 

                    createLeafNode(grammarAccess.getAgentTypeAccess().getAgentTypeKeyword_0(), null); 
                
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1435:1: ( (lv_name_1_0= RULE_ID ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1436:1: (lv_name_1_0= RULE_ID )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1436:1: (lv_name_1_0= RULE_ID )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1437:3: lv_name_1_0= RULE_ID
            {
            lv_name_1_0=(Token)input.LT(1);
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleAgentType2271); 

            			createLeafNode(grammarAccess.getAgentTypeAccess().getNameIDTerminalRuleCall_1_0(), "name"); 
            		

            	        if (current==null) {
            	            current = factory.create(grammarAccess.getAgentTypeRule().getType().getClassifier());
            	            associateNodeWithAstElement(currentNode, current);
            	        }
            	        try {
            	       		set(
            	       			current, 
            	       			"name",
            	        		lv_name_1_0, 
            	        		"ID", 
            	        		lastConsumedNode);
            	        } catch (ValueConverterException vce) {
            				handleValueConverterException(vce);
            	        }
            	    

            }


            }

            match(input,15,FOLLOW_15_in_ruleAgentType2286); 

                    createLeafNode(grammarAccess.getAgentTypeAccess().getSemColonKeyword_2(), null); 
                

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleAgentType


    // $ANTLR start entryRuleBehaviour
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1471:1: entryRuleBehaviour returns [EObject current=null] : iv_ruleBehaviour= ruleBehaviour EOF ;
    public final EObject entryRuleBehaviour() throws RecognitionException {
        EObject current = null;

        EObject iv_ruleBehaviour = null;


        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1472:2: (iv_ruleBehaviour= ruleBehaviour EOF )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1473:2: iv_ruleBehaviour= ruleBehaviour EOF
            {
             currentNode = createCompositeNode(grammarAccess.getBehaviourRule(), currentNode); 
            pushFollow(FOLLOW_ruleBehaviour_in_entryRuleBehaviour2322);
            iv_ruleBehaviour=ruleBehaviour();
            _fsp--;

             current =iv_ruleBehaviour; 
            match(input,EOF,FOLLOW_EOF_in_entryRuleBehaviour2332); 

            }

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


    // $ANTLR start ruleBehaviour
    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1480:1: ruleBehaviour returns [EObject current=null] : ( ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' ) ) ;
    public final EObject ruleBehaviour() throws RecognitionException {
        EObject current = null;

        Token lv_name_1_0=null;
        Token lv_resident_2_0=null;

         EObject temp=null; setCurrentLookahead(); resetLookahead(); 
            
        try {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1485:6: ( ( ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' ) ) )
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1486:1: ( ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' ) )
            {
            // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1486:1: ( ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' ) )
            int alt16=2;
            int LA16_0 = input.LA(1);

            if ( (LA16_0==30) ) {
                alt16=1;
            }
            else if ( (LA16_0==RULE_ID) ) {
                alt16=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("1486:1: ( ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' ) | ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' ) )", 16, 0, input);

                throw nvae;
            }
            switch (alt16) {
                case 1 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1486:2: ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1486:2: ( 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1486:4: 'Behaviour' ( (lv_name_1_0= RULE_ID ) ) ( (lv_resident_2_0= RULE_INT ) ) ';'
                    {
                    match(input,30,FOLLOW_30_in_ruleBehaviour2368); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getBehaviourKeyword_0_0(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1490:1: ( (lv_name_1_0= RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1491:1: (lv_name_1_0= RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1491:1: (lv_name_1_0= RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1492:3: lv_name_1_0= RULE_ID
                    {
                    lv_name_1_0=(Token)input.LT(1);
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2385); 

                    			createLeafNode(grammarAccess.getBehaviourAccess().getNameIDTerminalRuleCall_0_1_0(), "name"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"name",
                    	        		lv_name_1_0, 
                    	        		"ID", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1514:2: ( (lv_resident_2_0= RULE_INT ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1515:1: (lv_resident_2_0= RULE_INT )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1515:1: (lv_resident_2_0= RULE_INT )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1516:3: lv_resident_2_0= RULE_INT
                    {
                    lv_resident_2_0=(Token)input.LT(1);
                    match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleBehaviour2407); 

                    			createLeafNode(grammarAccess.getBehaviourAccess().getResidentINTTerminalRuleCall_0_2_0(), "resident"); 
                    		

                    	        if (current==null) {
                    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                    	        try {
                    	       		set(
                    	       			current, 
                    	       			"resident",
                    	        		lv_resident_2_0, 
                    	        		"INT", 
                    	        		lastConsumedNode);
                    	        } catch (ValueConverterException vce) {
                    				handleValueConverterException(vce);
                    	        }
                    	    

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleBehaviour2422); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getSemColonKeyword_0_3(), null); 
                        

                    }


                    }
                    break;
                case 2 :
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1543:6: ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1543:6: ( ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}' )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1543:7: ( ( RULE_ID ) ) '{' ( 'executes' ( ( RULE_ID ) ) ';' )* 'composed_of' ( ( RULE_ID ) ) ';' ( 'composed_of' ( ( RULE_ID ) ) ';' )* ( 'executes' ( ( RULE_ID ) ) ';' )* '}'
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1543:7: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1544:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1544:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1545:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2448); 

                    		createLeafNode(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_0_0(), "beh"); 
                    	

                    }


                    }

                    match(input,12,FOLLOW_12_in_ruleBehaviour2458); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getLeftCurlyBracketKeyword_1_1(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1561:1: ( 'executes' ( ( RULE_ID ) ) ';' )*
                    loop13:
                    do {
                        int alt13=2;
                        int LA13_0 = input.LA(1);

                        if ( (LA13_0==31) ) {
                            alt13=1;
                        }


                        switch (alt13) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1561:3: 'executes' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,31,FOLLOW_31_in_ruleBehaviour2469); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getExecutesKeyword_1_2_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1565:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1566:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1566:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1567:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2487); 

                    	    		createLeafNode(grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_2_1_0(), "plan"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleBehaviour2497); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getSemColonKeyword_1_2_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    match(input,32,FOLLOW_32_in_ruleBehaviour2509); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getComposed_ofKeyword_1_3(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1587:1: ( ( RULE_ID ) )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1588:1: ( RULE_ID )
                    {
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1588:1: ( RULE_ID )
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1589:3: RULE_ID
                    {

                    			if (current==null) {
                    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	            associateNodeWithAstElement(currentNode, current);
                    	        }
                            
                    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2527); 

                    		createLeafNode(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_4_0(), "beh"); 
                    	

                    }


                    }

                    match(input,15,FOLLOW_15_in_ruleBehaviour2537); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getSemColonKeyword_1_5(), null); 
                        
                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1605:1: ( 'composed_of' ( ( RULE_ID ) ) ';' )*
                    loop14:
                    do {
                        int alt14=2;
                        int LA14_0 = input.LA(1);

                        if ( (LA14_0==32) ) {
                            alt14=1;
                        }


                        switch (alt14) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1605:3: 'composed_of' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,32,FOLLOW_32_in_ruleBehaviour2548); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getComposed_ofKeyword_1_6_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1609:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1610:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1610:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1611:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2566); 

                    	    		createLeafNode(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_6_1_0(), "beh"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleBehaviour2576); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getSemColonKeyword_1_6_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1627:3: ( 'executes' ( ( RULE_ID ) ) ';' )*
                    loop15:
                    do {
                        int alt15=2;
                        int LA15_0 = input.LA(1);

                        if ( (LA15_0==31) ) {
                            alt15=1;
                        }


                        switch (alt15) {
                    	case 1 :
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1627:5: 'executes' ( ( RULE_ID ) ) ';'
                    	    {
                    	    match(input,31,FOLLOW_31_in_ruleBehaviour2589); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getExecutesKeyword_1_7_0(), null); 
                    	        
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1631:1: ( ( RULE_ID ) )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1632:1: ( RULE_ID )
                    	    {
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1632:1: ( RULE_ID )
                    	    // ../org.xtext.example.mydsl3/src-gen/org/xtext/example/mydsl3/parser/antlr/internal/InternalMyDsl.g:1633:3: RULE_ID
                    	    {

                    	    			if (current==null) {
                    	    	            current = factory.create(grammarAccess.getBehaviourRule().getType().getClassifier());
                    	    	            associateNodeWithAstElement(currentNode, current);
                    	    	        }
                    	            
                    	    match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleBehaviour2607); 

                    	    		createLeafNode(grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_7_1_0(), "plan"); 
                    	    	

                    	    }


                    	    }

                    	    match(input,15,FOLLOW_15_in_ruleBehaviour2617); 

                    	            createLeafNode(grammarAccess.getBehaviourAccess().getSemColonKeyword_1_7_2(), null); 
                    	        

                    	    }
                    	    break;

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

                    match(input,13,FOLLOW_13_in_ruleBehaviour2629); 

                            createLeafNode(grammarAccess.getBehaviourAccess().getRGhtCurlyBracketKeyword_1_8(), null); 
                        

                    }


                    }
                    break;

            }


            }

             resetLookahead(); 
                	lastConsumedNode = currentNode;
                
        }
         
            catch (RecognitionException re) { 
                recover(input,re); 
                appendSkippedTokens();
            } 
        finally {
        }
        return current;
    }
    // $ANTLR end ruleBehaviour


 

    public static final BitSet FOLLOW_ruleAgentInternalViewpoint_in_entryRuleAgentInternalViewpoint75 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAgentInternalViewpoint85 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_11_in_ruleAgentInternalViewpoint120 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleAgentInternalViewpoint130 = new BitSet(new long[]{0x0000000000420010L});
    public static final BitSet FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint153 = new BitSet(new long[]{0x0000000000020010L});
    public static final BitSet FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint174 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint203 = new BitSet(new long[]{0x0000000000400010L});
    public static final BitSet FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint224 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleBelief_in_ruleAgentInternalViewpoint248 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleGoal_in_ruleAgentInternalViewpoint275 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleCapabilities_in_ruleAgentInternalViewpoint302 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleAgentState_in_ruleAgentInternalViewpoint329 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleSemanticWebAgent_in_ruleAgentInternalViewpoint356 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleRole_in_ruleAgentInternalViewpoint383 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_rulePlan_in_ruleAgentInternalViewpoint410 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleAgentType_in_ruleAgentInternalViewpoint437 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_ruleBehaviour_in_ruleAgentInternalViewpoint464 = new BitSet(new long[]{0x000000006C636010L});
    public static final BitSet FOLLOW_13_in_ruleAgentInternalViewpoint476 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleBelief_in_entryRuleBelief512 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleBelief522 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_14_in_ruleBelief557 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBelief574 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleBelief596 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_INT_in_ruleBelief618 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBelief633 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleGoal_in_entryRuleGoal669 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleGoal679 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_16_in_ruleGoal714 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleGoal731 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleGoal753 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_INT_in_ruleGoal775 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleGoal790 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleCapabilities_in_entryRuleCapabilities826 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleCapabilities836 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_17_in_ruleCapabilities872 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleCapabilities889 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleCapabilities911 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleCapabilities926 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleCapabilities952 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleCapabilities962 = new BitSet(new long[]{0x00000000001C2000L});
    public static final BitSet FOLLOW_18_in_ruleCapabilities974 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleCapabilities992 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleCapabilities1002 = new BitSet(new long[]{0x00000000001C2000L});
    public static final BitSet FOLLOW_19_in_ruleCapabilities1020 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleCapabilities1038 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleCapabilities1048 = new BitSet(new long[]{0x00000000001C2000L});
    public static final BitSet FOLLOW_20_in_ruleCapabilities1066 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleCapabilities1084 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleCapabilities1094 = new BitSet(new long[]{0x00000000001C2000L});
    public static final BitSet FOLLOW_13_in_ruleCapabilities1107 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAgentState_in_entryRuleAgentState1144 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAgentState1154 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_21_in_ruleAgentState1189 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleAgentState1206 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleAgentState1221 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleSemanticWebAgent_in_entryRuleSemanticWebAgent1257 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleSemanticWebAgent1267 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_ruleSemanticWebAgent1303 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1320 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleSemanticWebAgent1342 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleSemanticWebAgent1364 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1379 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1405 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleSemanticWebAgent1416 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_23_in_ruleSemanticWebAgent1426 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1444 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1454 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_18_in_ruleSemanticWebAgent1465 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1483 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1493 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_18_in_ruleSemanticWebAgent1505 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1523 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1533 = new BitSet(new long[]{0x0000000003000000L});
    public static final BitSet FOLLOW_24_in_ruleSemanticWebAgent1544 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1562 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1572 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_ruleSemanticWebAgent1584 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1602 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1612 = new BitSet(new long[]{0x0000000002002000L});
    public static final BitSet FOLLOW_25_in_ruleSemanticWebAgent1623 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleSemanticWebAgent1641 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleSemanticWebAgent1651 = new BitSet(new long[]{0x0000000002002000L});
    public static final BitSet FOLLOW_13_in_ruleSemanticWebAgent1664 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleRole_in_entryRuleRole1701 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleRole1711 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_ruleRole1747 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleRole1764 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleRole1779 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleRole1805 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleRole1815 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_ruleRole1825 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleRole1843 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleRole1853 = new BitSet(new long[]{0x0000000001002000L});
    public static final BitSet FOLLOW_24_in_ruleRole1864 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleRole1882 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleRole1892 = new BitSet(new long[]{0x0000000001002000L});
    public static final BitSet FOLLOW_13_in_ruleRole1904 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rulePlan_in_entryRulePlan1941 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRulePlan1951 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_rulePlan1987 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_rulePlan2004 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_rulePlan2026 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_STRING_in_rulePlan2048 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_INT_in_rulePlan2070 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_rulePlan2085 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_rulePlan2111 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_rulePlan2121 = new BitSet(new long[]{0x0000000010002000L});
    public static final BitSet FOLLOW_28_in_rulePlan2132 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_rulePlan2150 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_rulePlan2160 = new BitSet(new long[]{0x0000000010002000L});
    public static final BitSet FOLLOW_13_in_rulePlan2172 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleAgentType_in_entryRuleAgentType2209 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleAgentType2219 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_29_in_ruleAgentType2254 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleAgentType2271 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleAgentType2286 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleBehaviour_in_entryRuleBehaviour2322 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entryRuleBehaviour2332 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_ruleBehaviour2368 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2385 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_RULE_INT_in_ruleBehaviour2407 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBehaviour2422 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2448 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleBehaviour2458 = new BitSet(new long[]{0x0000000180000000L});
    public static final BitSet FOLLOW_31_in_ruleBehaviour2469 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2487 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBehaviour2497 = new BitSet(new long[]{0x0000000180000000L});
    public static final BitSet FOLLOW_32_in_ruleBehaviour2509 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2527 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBehaviour2537 = new BitSet(new long[]{0x0000000180002000L});
    public static final BitSet FOLLOW_32_in_ruleBehaviour2548 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2566 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBehaviour2576 = new BitSet(new long[]{0x0000000180002000L});
    public static final BitSet FOLLOW_31_in_ruleBehaviour2589 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleBehaviour2607 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleBehaviour2617 = new BitSet(new long[]{0x0000000080002000L});
    public static final BitSet FOLLOW_13_in_ruleBehaviour2629 = new BitSet(new long[]{0x0000000000000002L});

}