/*
* generated by Xtext
*/
package org.xtext.example.mydsl3.parseTreeConstruction;

import org.eclipse.emf.ecore.*;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parsetree.reconstr.IEObjectConsumer;
import org.eclipse.xtext.parsetree.reconstr.impl.AbstractParseTreeConstructor;

import org.xtext.example.mydsl3.services.MyDslGrammarAccess;

import com.google.inject.Inject;

@SuppressWarnings("all")
public class MyDslParsetreeConstructor extends AbstractParseTreeConstructor {
		
	@Inject
	private MyDslGrammarAccess grammarAccess;
	
	@Override
	protected AbstractToken getRootToken(IEObjectConsumer inst) {
		return new ThisRootNode(inst);	
	}
	
protected class ThisRootNode extends RootToken {
	public ThisRootNode(IEObjectConsumer inst) {
		super(inst);
	}
	
	@Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_Group(this, this, 0, inst);
			case 1: return new Belief_Group(this, this, 1, inst);
			case 2: return new Goal_Group(this, this, 2, inst);
			case 3: return new Capabilities_Alternatives(this, this, 3, inst);
			case 4: return new AgentState_Group(this, this, 4, inst);
			case 5: return new SemanticWebAgent_Alternatives(this, this, 5, inst);
			case 6: return new Role_Alternatives(this, this, 6, inst);
			case 7: return new Plan_Alternatives(this, this, 7, inst);
			case 8: return new AgentType_Group(this, this, 8, inst);
			case 9: return new Behaviour_Alternatives(this, this, 9, inst);
			default: return null;
		}	
	}	
}
	

/************ begin Rule AgentInternalViewpoint ****************
 *
 * AgentInternalViewpoint:
 * 	"AgentInternalViewPoint" "{" (semanticwebagent+=SemanticWebAgent capabilities+=Capabilities |
 * 	capabilities+=Capabilities semanticwebagent+=SemanticWebAgent) (belief+=Belief | goal+=Goal |
 * 	capabilities+=Capabilities | agentstate+=AgentState | semanticwebagent+=SemanticWebAgent | role+=Role | plan+=Plan |
 * 	agenttype+=AgentType | behaviour+=Behaviour)* "}";
 *
 **/

// "AgentInternalViewPoint" "{" (semanticwebagent+=SemanticWebAgent capabilities+=Capabilities | capabilities+=Capabilities
// semanticwebagent+=SemanticWebAgent) (belief+=Belief | goal+=Goal | capabilities+=Capabilities | agentstate+=AgentState
// | semanticwebagent+=SemanticWebAgent | role+=Role | plan+=Plan | agenttype+=AgentType | behaviour+=Behaviour)* "}"
protected class AgentInternalViewpoint_Group extends GroupToken {
	
	public AgentInternalViewpoint_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_RGhtCurlyBracketKeyword_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getAgentInternalViewpointRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "AgentInternalViewPoint"
protected class AgentInternalViewpoint_AgentInternalViewPointKeyword_0 extends KeywordToken  {
	
	public AgentInternalViewpoint_AgentInternalViewPointKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getAgentInternalViewPointKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// "{"
protected class AgentInternalViewpoint_LeftCurlyBracketKeyword_1 extends KeywordToken  {
	
	public AgentInternalViewpoint_LeftCurlyBracketKeyword_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getLeftCurlyBracketKeyword_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_AgentInternalViewPointKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// semanticwebagent+=SemanticWebAgent capabilities+=Capabilities | capabilities+=Capabilities
// semanticwebagent+=SemanticWebAgent
protected class AgentInternalViewpoint_Alternatives_2 extends AlternativesToken {

	public AgentInternalViewpoint_Alternatives_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getAlternatives_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_Group_2_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new AgentInternalViewpoint_Group_2_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// semanticwebagent+=SemanticWebAgent capabilities+=Capabilities
protected class AgentInternalViewpoint_Group_2_0 extends GroupToken {
	
	public AgentInternalViewpoint_Group_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getGroup_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_CapabilitiesAssignment_2_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// semanticwebagent+=SemanticWebAgent
protected class AgentInternalViewpoint_SemanticwebagentAssignment_2_0_0 extends AssignmentToken  {
	
	public AgentInternalViewpoint_SemanticwebagentAssignment_2_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_2_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("semanticwebagent",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("semanticwebagent");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_2_0_0_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_LeftCurlyBracketKeyword_1(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// capabilities+=Capabilities
protected class AgentInternalViewpoint_CapabilitiesAssignment_2_0_1 extends AssignmentToken  {
	
	public AgentInternalViewpoint_CapabilitiesAssignment_2_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_2_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("capabilities",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("capabilities");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_2_0_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_SemanticwebagentAssignment_2_0_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


// capabilities+=Capabilities semanticwebagent+=SemanticWebAgent
protected class AgentInternalViewpoint_Group_2_1 extends GroupToken {
	
	public AgentInternalViewpoint_Group_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getGroup_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_SemanticwebagentAssignment_2_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// capabilities+=Capabilities
protected class AgentInternalViewpoint_CapabilitiesAssignment_2_1_0 extends AssignmentToken  {
	
	public AgentInternalViewpoint_CapabilitiesAssignment_2_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_2_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("capabilities",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("capabilities");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_2_1_0_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_LeftCurlyBracketKeyword_1(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// semanticwebagent+=SemanticWebAgent
protected class AgentInternalViewpoint_SemanticwebagentAssignment_2_1_1 extends AssignmentToken  {
	
	public AgentInternalViewpoint_SemanticwebagentAssignment_2_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_2_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("semanticwebagent",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("semanticwebagent");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_2_1_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_CapabilitiesAssignment_2_1_0(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}



// (belief+=Belief | goal+=Goal | capabilities+=Capabilities | agentstate+=AgentState | semanticwebagent+=SemanticWebAgent
// | role+=Role | plan+=Plan | agenttype+=AgentType | behaviour+=Behaviour)*
protected class AgentInternalViewpoint_Alternatives_3 extends AlternativesToken {

	public AgentInternalViewpoint_Alternatives_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getAlternatives_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_BeliefAssignment_3_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new AgentInternalViewpoint_GoalAssignment_3_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new AgentInternalViewpoint_CapabilitiesAssignment_3_2(lastRuleCallOrigin, this, 2, inst);
			case 3: return new AgentInternalViewpoint_AgentstateAssignment_3_3(lastRuleCallOrigin, this, 3, inst);
			case 4: return new AgentInternalViewpoint_SemanticwebagentAssignment_3_4(lastRuleCallOrigin, this, 4, inst);
			case 5: return new AgentInternalViewpoint_RoleAssignment_3_5(lastRuleCallOrigin, this, 5, inst);
			case 6: return new AgentInternalViewpoint_PlanAssignment_3_6(lastRuleCallOrigin, this, 6, inst);
			case 7: return new AgentInternalViewpoint_AgenttypeAssignment_3_7(lastRuleCallOrigin, this, 7, inst);
			case 8: return new AgentInternalViewpoint_BehaviourAssignment_3_8(lastRuleCallOrigin, this, 8, inst);
			default: return null;
		}	
	}

}

// belief+=Belief
protected class AgentInternalViewpoint_BeliefAssignment_3_0 extends AssignmentToken  {
	
	public AgentInternalViewpoint_BeliefAssignment_3_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getBeliefAssignment_3_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("belief",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("belief");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBeliefRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getBeliefBeliefParserRuleCall_3_0_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// goal+=Goal
protected class AgentInternalViewpoint_GoalAssignment_3_1 extends AssignmentToken  {
	
	public AgentInternalViewpoint_GoalAssignment_3_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getGoalAssignment_3_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("goal",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("goal");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getGoalRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getGoalGoalParserRuleCall_3_1_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// capabilities+=Capabilities
protected class AgentInternalViewpoint_CapabilitiesAssignment_3_2 extends AssignmentToken  {
	
	public AgentInternalViewpoint_CapabilitiesAssignment_3_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_3_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("capabilities",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("capabilities");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesCapabilitiesParserRuleCall_3_2_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// agentstate+=AgentState
protected class AgentInternalViewpoint_AgentstateAssignment_3_3 extends AssignmentToken  {
	
	public AgentInternalViewpoint_AgentstateAssignment_3_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getAgentstateAssignment_3_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentState_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("agentstate",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("agentstate");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getAgentStateRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getAgentstateAgentStateParserRuleCall_3_3_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// semanticwebagent+=SemanticWebAgent
protected class AgentInternalViewpoint_SemanticwebagentAssignment_3_4 extends AssignmentToken  {
	
	public AgentInternalViewpoint_SemanticwebagentAssignment_3_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_3_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("semanticwebagent",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("semanticwebagent");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentSemanticWebAgentParserRuleCall_3_4_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// role+=Role
protected class AgentInternalViewpoint_RoleAssignment_3_5 extends AssignmentToken  {
	
	public AgentInternalViewpoint_RoleAssignment_3_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getRoleAssignment_3_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("role",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("role");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getRoleRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getRoleRoleParserRuleCall_3_5_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// plan+=Plan
protected class AgentInternalViewpoint_PlanAssignment_3_6 extends AssignmentToken  {
	
	public AgentInternalViewpoint_PlanAssignment_3_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getPlanAssignment_3_6();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("plan",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plan");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getPlanRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getPlanPlanParserRuleCall_3_6_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// agenttype+=AgentType
protected class AgentInternalViewpoint_AgenttypeAssignment_3_7 extends AssignmentToken  {
	
	public AgentInternalViewpoint_AgenttypeAssignment_3_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getAgenttypeAssignment_3_7();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentType_Group(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("agenttype",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("agenttype");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getAgentTypeRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getAgenttypeAgentTypeParserRuleCall_3_7_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}

// behaviour+=Behaviour
protected class AgentInternalViewpoint_BehaviourAssignment_3_8 extends AssignmentToken  {
	
	public AgentInternalViewpoint_BehaviourAssignment_3_8(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getBehaviourAssignment_3_8();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Alternatives(this, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("behaviour",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("behaviour");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourRule().getType().getClassifier())) {
				type = AssignmentType.PARSER_RULE_CALL;
				element = grammarAccess.getAgentInternalViewpointAccess().getBehaviourBehaviourParserRuleCall_3_8_0(); 
				consumed = obj;
				return param;
			}
		}
		return null;
	}

    @Override
	public AbstractToken createFollowerAfterReturn(AbstractToken next,	int actIndex, int index, IEObjectConsumer inst) {
		if(value == inst.getEObject() && !inst.isConsumed()) return null;
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, next, actIndex, consumed);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, next, actIndex, consumed);
			default: return null;
		}	
	}	
}


// "}"
protected class AgentInternalViewpoint_RGhtCurlyBracketKeyword_4 extends KeywordToken  {
	
	public AgentInternalViewpoint_RGhtCurlyBracketKeyword_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentInternalViewpointAccess().getRGhtCurlyBracketKeyword_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentInternalViewpoint_Alternatives_3(lastRuleCallOrigin, this, 0, inst);
			case 1: return new AgentInternalViewpoint_Alternatives_2(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}


/************ end Rule AgentInternalViewpoint ****************/


/************ begin Rule Belief ****************
 *
 * Belief:
 * 	"Belief" name=ID description=STRING dynamic=INT ";";
 *
 **/

// "Belief" name=ID description=STRING dynamic=INT ";"
protected class Belief_Group extends GroupToken {
	
	public Belief_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBeliefAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_SemColonKeyword_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getBeliefRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Belief"
protected class Belief_BeliefKeyword_0 extends KeywordToken  {
	
	public Belief_BeliefKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBeliefAccess().getBeliefKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Belief_NameAssignment_1 extends AssignmentToken  {
	
	public Belief_NameAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBeliefAccess().getNameAssignment_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_BeliefKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getBeliefAccess().getNameIDTerminalRuleCall_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getBeliefAccess().getNameIDTerminalRuleCall_1_0();
			return obj;
		}
		return null;
	}

}

// description=STRING
protected class Belief_DescriptionAssignment_2 extends AssignmentToken  {
	
	public Belief_DescriptionAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBeliefAccess().getDescriptionAssignment_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_NameAssignment_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("description",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("description");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getBeliefAccess().getDescriptionSTRINGTerminalRuleCall_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getBeliefAccess().getDescriptionSTRINGTerminalRuleCall_2_0();
			return obj;
		}
		return null;
	}

}

// dynamic=INT
protected class Belief_DynamicAssignment_3 extends AssignmentToken  {
	
	public Belief_DynamicAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBeliefAccess().getDynamicAssignment_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_DescriptionAssignment_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("dynamic",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("dynamic");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getBeliefAccess().getDynamicINTTerminalRuleCall_3_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getBeliefAccess().getDynamicINTTerminalRuleCall_3_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Belief_SemColonKeyword_4 extends KeywordToken  {
	
	public Belief_SemColonKeyword_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBeliefAccess().getSemColonKeyword_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Belief_DynamicAssignment_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


/************ end Rule Belief ****************/


/************ begin Rule Goal ****************
 *
 * Goal:
 * 	"Goal" name=ID description=STRING recur=INT ";";
 *
 **/

// "Goal" name=ID description=STRING recur=INT ";"
protected class Goal_Group extends GroupToken {
	
	public Goal_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getGoalAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_SemColonKeyword_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getGoalRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Goal"
protected class Goal_GoalKeyword_0 extends KeywordToken  {
	
	public Goal_GoalKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getGoalAccess().getGoalKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Goal_NameAssignment_1 extends AssignmentToken  {
	
	public Goal_NameAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getGoalAccess().getNameAssignment_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_GoalKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getGoalAccess().getNameIDTerminalRuleCall_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getGoalAccess().getNameIDTerminalRuleCall_1_0();
			return obj;
		}
		return null;
	}

}

// description=STRING
protected class Goal_DescriptionAssignment_2 extends AssignmentToken  {
	
	public Goal_DescriptionAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getGoalAccess().getDescriptionAssignment_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_NameAssignment_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("description",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("description");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getGoalAccess().getDescriptionSTRINGTerminalRuleCall_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getGoalAccess().getDescriptionSTRINGTerminalRuleCall_2_0();
			return obj;
		}
		return null;
	}

}

// recur=INT
protected class Goal_RecurAssignment_3 extends AssignmentToken  {
	
	public Goal_RecurAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getGoalAccess().getRecurAssignment_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_DescriptionAssignment_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("recur",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("recur");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getGoalAccess().getRecurINTTerminalRuleCall_3_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getGoalAccess().getRecurINTTerminalRuleCall_3_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Goal_SemColonKeyword_4 extends KeywordToken  {
	
	public Goal_SemColonKeyword_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getGoalAccess().getSemColonKeyword_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Goal_RecurAssignment_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


/************ end Rule Goal ****************/


/************ begin Rule Capabilities ****************
 *
 * Capabilities:
 * 	"Capabilities" name=ID description=STRING ";" | cap=[Capabilities] "{" ("includes" belief=[Belief] ";" | "uses"
 * 	goal=[Goal] ";" | "applies" plan=[Plan] ";")* "}";
 *
 **/

// "Capabilities" name=ID description=STRING ";" | cap=[Capabilities] "{" ("includes" belief=[Belief] ";" | "uses"
// goal=[Goal] ";" | "applies" plan=[Plan] ";")* "}"
protected class Capabilities_Alternatives extends AlternativesToken {

	public Capabilities_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Group_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getCapabilitiesRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Capabilities" name=ID description=STRING ";"
protected class Capabilities_Group_0 extends GroupToken {
	
	public Capabilities_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGroup_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_SemColonKeyword_0_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "Capabilities"
protected class Capabilities_CapabilitiesKeyword_0_0 extends KeywordToken  {
	
	public Capabilities_CapabilitiesKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getCapabilitiesKeyword_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Capabilities_NameAssignment_0_1 extends AssignmentToken  {
	
	public Capabilities_NameAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getNameAssignment_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_CapabilitiesKeyword_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getCapabilitiesAccess().getNameIDTerminalRuleCall_0_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getCapabilitiesAccess().getNameIDTerminalRuleCall_0_1_0();
			return obj;
		}
		return null;
	}

}

// description=STRING
protected class Capabilities_DescriptionAssignment_0_2 extends AssignmentToken  {
	
	public Capabilities_DescriptionAssignment_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getDescriptionAssignment_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_NameAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("description",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("description");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getCapabilitiesAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getCapabilitiesAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Capabilities_SemColonKeyword_0_3 extends KeywordToken  {
	
	public Capabilities_SemColonKeyword_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getSemColonKeyword_0_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_DescriptionAssignment_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// cap=[Capabilities] "{" ("includes" belief=[Belief] ";" | "uses" goal=[Goal] ";" | "applies" plan=[Plan] ";")* "}"
protected class Capabilities_Group_1 extends GroupToken {
	
	public Capabilities_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_RGhtCurlyBracketKeyword_1_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// cap=[Capabilities]
protected class Capabilities_CapAssignment_1_0 extends AssignmentToken  {
	
	public Capabilities_CapAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getCapAssignment_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("cap",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("cap");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesAccess().getCapCapabilitiesCrossReference_1_0_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getCapabilitiesAccess().getCapCapabilitiesCrossReference_1_0_0(); 
				return obj;
			}
		}
		return null;
	}

}

// "{"
protected class Capabilities_LeftCurlyBracketKeyword_1_1 extends KeywordToken  {
	
	public Capabilities_LeftCurlyBracketKeyword_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getLeftCurlyBracketKeyword_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_CapAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("includes" belief=[Belief] ";" | "uses" goal=[Goal] ";" | "applies" plan=[Plan] ";")*
protected class Capabilities_Alternatives_1_2 extends AlternativesToken {

	public Capabilities_Alternatives_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getAlternatives_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Group_1_2_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_Group_1_2_1(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Capabilities_Group_1_2_2(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}

// "includes" belief=[Belief] ";"
protected class Capabilities_Group_1_2_0 extends GroupToken {
	
	public Capabilities_Group_1_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGroup_1_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_SemColonKeyword_1_2_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "includes"
protected class Capabilities_IncludesKeyword_1_2_0_0 extends KeywordToken  {
	
	public Capabilities_IncludesKeyword_1_2_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getIncludesKeyword_1_2_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// belief=[Belief]
protected class Capabilities_BeliefAssignment_1_2_0_1 extends AssignmentToken  {
	
	public Capabilities_BeliefAssignment_1_2_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getBeliefAssignment_1_2_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_IncludesKeyword_1_2_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("belief",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("belief");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesAccess().getBeliefBeliefCrossReference_1_2_0_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getCapabilitiesAccess().getBeliefBeliefCrossReference_1_2_0_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Capabilities_SemColonKeyword_1_2_0_2 extends KeywordToken  {
	
	public Capabilities_SemColonKeyword_1_2_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_BeliefAssignment_1_2_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "uses" goal=[Goal] ";"
protected class Capabilities_Group_1_2_1 extends GroupToken {
	
	public Capabilities_Group_1_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGroup_1_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_SemColonKeyword_1_2_1_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "uses"
protected class Capabilities_UsesKeyword_1_2_1_0 extends KeywordToken  {
	
	public Capabilities_UsesKeyword_1_2_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getUsesKeyword_1_2_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// goal=[Goal]
protected class Capabilities_GoalAssignment_1_2_1_1 extends AssignmentToken  {
	
	public Capabilities_GoalAssignment_1_2_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGoalAssignment_1_2_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_UsesKeyword_1_2_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("goal",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("goal");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesAccess().getGoalGoalCrossReference_1_2_1_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getCapabilitiesAccess().getGoalGoalCrossReference_1_2_1_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Capabilities_SemColonKeyword_1_2_1_2 extends KeywordToken  {
	
	public Capabilities_SemColonKeyword_1_2_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_GoalAssignment_1_2_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "applies" plan=[Plan] ";"
protected class Capabilities_Group_1_2_2 extends GroupToken {
	
	public Capabilities_Group_1_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getGroup_1_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_SemColonKeyword_1_2_2_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "applies"
protected class Capabilities_AppliesKeyword_1_2_2_0 extends KeywordToken  {
	
	public Capabilities_AppliesKeyword_1_2_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getAppliesKeyword_1_2_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// plan=[Plan]
protected class Capabilities_PlanAssignment_1_2_2_1 extends AssignmentToken  {
	
	public Capabilities_PlanAssignment_1_2_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getPlanAssignment_1_2_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_AppliesKeyword_1_2_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("plan",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plan");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getCapabilitiesAccess().getPlanPlanCrossReference_1_2_2_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getCapabilitiesAccess().getPlanPlanCrossReference_1_2_2_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Capabilities_SemColonKeyword_1_2_2_2 extends KeywordToken  {
	
	public Capabilities_SemColonKeyword_1_2_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getSemColonKeyword_1_2_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_PlanAssignment_1_2_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}



// "}"
protected class Capabilities_RGhtCurlyBracketKeyword_1_3 extends KeywordToken  {
	
	public Capabilities_RGhtCurlyBracketKeyword_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getCapabilitiesAccess().getRGhtCurlyBracketKeyword_1_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Capabilities_Alternatives_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Capabilities_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}



/************ end Rule Capabilities ****************/


/************ begin Rule AgentState ****************
 *
 * AgentState:
 * 	"AgentState" name=ID ";";
 *
 **/

// "AgentState" name=ID ";"
protected class AgentState_Group extends GroupToken {
	
	public AgentState_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getAgentStateAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentState_SemColonKeyword_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getAgentStateRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "AgentState"
protected class AgentState_AgentStateKeyword_0 extends KeywordToken  {
	
	public AgentState_AgentStateKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentStateAccess().getAgentStateKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class AgentState_NameAssignment_1 extends AssignmentToken  {
	
	public AgentState_NameAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentStateAccess().getNameAssignment_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentState_AgentStateKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAgentStateAccess().getNameIDTerminalRuleCall_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getAgentStateAccess().getNameIDTerminalRuleCall_1_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class AgentState_SemColonKeyword_2 extends KeywordToken  {
	
	public AgentState_SemColonKeyword_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentStateAccess().getSemColonKeyword_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentState_NameAssignment_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


/************ end Rule AgentState ****************/


/************ begin Rule SemanticWebAgent ****************
 *
 * SemanticWebAgent:
 * 	"SemanticWebAgent" name=ID description=STRING properties=STRING ";" | semanticwebagent=[SemanticWebAgent] ("{"
 * 	"contains" agentstate=[AgentState] ";" ("includes" cap=[Capabilities] ";")* "includes" cap=[Capabilities] ";" ("has"
 * 	agenttype=[AgentType] ";")? "plays" role=[Role] ";" ("plays" role=[Role] ";")*) "}";
 *
 **/

// "SemanticWebAgent" name=ID description=STRING properties=STRING ";" | semanticwebagent=[SemanticWebAgent] ("{"
// "contains" agentstate=[AgentState] ";" ("includes" cap=[Capabilities] ";")* "includes" cap=[Capabilities] ";" ("has"
// agenttype=[AgentType] ";")? "plays" role=[Role] ";" ("plays" role=[Role] ";")*) "}"
protected class SemanticWebAgent_Alternatives extends AlternativesToken {

	public SemanticWebAgent_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getSemanticWebAgentRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "SemanticWebAgent" name=ID description=STRING properties=STRING ";"
protected class SemanticWebAgent_Group_0 extends GroupToken {
	
	public SemanticWebAgent_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemColonKeyword_0_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "SemanticWebAgent"
protected class SemanticWebAgent_SemanticWebAgentKeyword_0_0 extends KeywordToken  {
	
	public SemanticWebAgent_SemanticWebAgentKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemanticWebAgentKeyword_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class SemanticWebAgent_NameAssignment_0_1 extends AssignmentToken  {
	
	public SemanticWebAgent_NameAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getNameAssignment_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemanticWebAgentKeyword_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSemanticWebAgentAccess().getNameIDTerminalRuleCall_0_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSemanticWebAgentAccess().getNameIDTerminalRuleCall_0_1_0();
			return obj;
		}
		return null;
	}

}

// description=STRING
protected class SemanticWebAgent_DescriptionAssignment_0_2 extends AssignmentToken  {
	
	public SemanticWebAgent_DescriptionAssignment_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getDescriptionAssignment_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_NameAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("description",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("description");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSemanticWebAgentAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSemanticWebAgentAccess().getDescriptionSTRINGTerminalRuleCall_0_2_0();
			return obj;
		}
		return null;
	}

}

// properties=STRING
protected class SemanticWebAgent_PropertiesAssignment_0_3 extends AssignmentToken  {
	
	public SemanticWebAgent_PropertiesAssignment_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getPropertiesAssignment_0_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_DescriptionAssignment_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("properties",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("properties");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getSemanticWebAgentAccess().getPropertiesSTRINGTerminalRuleCall_0_3_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getSemanticWebAgentAccess().getPropertiesSTRINGTerminalRuleCall_0_3_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_0_4 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_0_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_0_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_PropertiesAssignment_0_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// semanticwebagent=[SemanticWebAgent] ("{" "contains" agentstate=[AgentState] ";" ("includes" cap=[Capabilities] ";")*
// "includes" cap=[Capabilities] ";" ("has" agenttype=[AgentType] ";")? "plays" role=[Role] ";" ("plays" role=[Role]
// ";")*) "}"
protected class SemanticWebAgent_Group_1 extends GroupToken {
	
	public SemanticWebAgent_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_RGhtCurlyBracketKeyword_1_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// semanticwebagent=[SemanticWebAgent]
protected class SemanticWebAgent_SemanticwebagentAssignment_1_0 extends AssignmentToken  {
	
	public SemanticWebAgent_SemanticwebagentAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemanticwebagentAssignment_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("semanticwebagent",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("semanticwebagent");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getSemanticwebagentSemanticWebAgentCrossReference_1_0_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getSemanticwebagentSemanticWebAgentCrossReference_1_0_0(); 
				return obj;
			}
		}
		return null;
	}

}

// "{" "contains" agentstate=[AgentState] ";" ("includes" cap=[Capabilities] ";")* "includes" cap=[Capabilities] ";" ("has"
// agenttype=[AgentType] ";")? "plays" role=[Role] ";" ("plays" role=[Role] ";")*
protected class SemanticWebAgent_Group_1_1 extends GroupToken {
	
	public SemanticWebAgent_Group_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1_12(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_SemColonKeyword_1_1_11(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// "{"
protected class SemanticWebAgent_LeftCurlyBracketKeyword_1_1_0 extends KeywordToken  {
	
	public SemanticWebAgent_LeftCurlyBracketKeyword_1_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getLeftCurlyBracketKeyword_1_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemanticwebagentAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "contains"
protected class SemanticWebAgent_ContainsKeyword_1_1_1 extends KeywordToken  {
	
	public SemanticWebAgent_ContainsKeyword_1_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getContainsKeyword_1_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_LeftCurlyBracketKeyword_1_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// agentstate=[AgentState]
protected class SemanticWebAgent_AgentstateAssignment_1_1_2 extends AssignmentToken  {
	
	public SemanticWebAgent_AgentstateAssignment_1_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getAgentstateAssignment_1_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_ContainsKeyword_1_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("agentstate",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("agentstate");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getAgentstateAgentStateCrossReference_1_1_2_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getAgentstateAgentStateCrossReference_1_1_2_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_3 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_AgentstateAssignment_1_1_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("includes" cap=[Capabilities] ";")*
protected class SemanticWebAgent_Group_1_1_4 extends GroupToken {
	
	public SemanticWebAgent_Group_1_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemColonKeyword_1_1_4_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "includes"
protected class SemanticWebAgent_IncludesKeyword_1_1_4_0 extends KeywordToken  {
	
	public SemanticWebAgent_IncludesKeyword_1_1_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getIncludesKeyword_1_1_4_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1_4(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_SemColonKeyword_1_1_3(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// cap=[Capabilities]
protected class SemanticWebAgent_CapAssignment_1_1_4_1 extends AssignmentToken  {
	
	public SemanticWebAgent_CapAssignment_1_1_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getCapAssignment_1_1_4_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_IncludesKeyword_1_1_4_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("cap",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("cap");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_4_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_4_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_4_2 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_4_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_4_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_CapAssignment_1_1_4_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "includes"
protected class SemanticWebAgent_IncludesKeyword_1_1_5 extends KeywordToken  {
	
	public SemanticWebAgent_IncludesKeyword_1_1_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getIncludesKeyword_1_1_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1_4(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_SemColonKeyword_1_1_3(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// cap=[Capabilities]
protected class SemanticWebAgent_CapAssignment_1_1_6 extends AssignmentToken  {
	
	public SemanticWebAgent_CapAssignment_1_1_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getCapAssignment_1_1_6();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_IncludesKeyword_1_1_5(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("cap",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("cap");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_6_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getCapCapabilitiesCrossReference_1_1_6_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_7 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_7();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_CapAssignment_1_1_6(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("has" agenttype=[AgentType] ";")?
protected class SemanticWebAgent_Group_1_1_8 extends GroupToken {
	
	public SemanticWebAgent_Group_1_1_8(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_8();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemColonKeyword_1_1_8_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "has"
protected class SemanticWebAgent_HasKeyword_1_1_8_0 extends KeywordToken  {
	
	public SemanticWebAgent_HasKeyword_1_1_8_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getHasKeyword_1_1_8_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemColonKeyword_1_1_7(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// agenttype=[AgentType]
protected class SemanticWebAgent_AgenttypeAssignment_1_1_8_1 extends AssignmentToken  {
	
	public SemanticWebAgent_AgenttypeAssignment_1_1_8_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getAgenttypeAssignment_1_1_8_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_HasKeyword_1_1_8_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("agenttype",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("agenttype");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getAgenttypeAgentTypeCrossReference_1_1_8_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getAgenttypeAgentTypeCrossReference_1_1_8_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_8_2 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_8_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_8_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_AgenttypeAssignment_1_1_8_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "plays"
protected class SemanticWebAgent_PlaysKeyword_1_1_9 extends KeywordToken  {
	
	public SemanticWebAgent_PlaysKeyword_1_1_9(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getPlaysKeyword_1_1_9();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1_8(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_SemColonKeyword_1_1_7(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// role=[Role]
protected class SemanticWebAgent_RoleAssignment_1_1_10 extends AssignmentToken  {
	
	public SemanticWebAgent_RoleAssignment_1_1_10(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getRoleAssignment_1_1_10();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_PlaysKeyword_1_1_9(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("role",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("role");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_10_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_10_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_11 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_11(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_11();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_RoleAssignment_1_1_10(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("plays" role=[Role] ";")*
protected class SemanticWebAgent_Group_1_1_12 extends GroupToken {
	
	public SemanticWebAgent_Group_1_1_12(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_12();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_SemColonKeyword_1_1_12_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "plays"
protected class SemanticWebAgent_PlaysKeyword_1_1_12_0 extends KeywordToken  {
	
	public SemanticWebAgent_PlaysKeyword_1_1_12_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getPlaysKeyword_1_1_12_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1_12(lastRuleCallOrigin, this, 0, inst);
			case 1: return new SemanticWebAgent_SemColonKeyword_1_1_11(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// role=[Role]
protected class SemanticWebAgent_RoleAssignment_1_1_12_1 extends AssignmentToken  {
	
	public SemanticWebAgent_RoleAssignment_1_1_12_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getRoleAssignment_1_1_12_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_PlaysKeyword_1_1_12_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("role",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("role");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_12_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getSemanticWebAgentAccess().getRoleRoleCrossReference_1_1_12_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class SemanticWebAgent_SemColonKeyword_1_1_12_2 extends KeywordToken  {
	
	public SemanticWebAgent_SemColonKeyword_1_1_12_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getSemColonKeyword_1_1_12_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_RoleAssignment_1_1_12_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}



// "}"
protected class SemanticWebAgent_RGhtCurlyBracketKeyword_1_2 extends KeywordToken  {
	
	public SemanticWebAgent_RGhtCurlyBracketKeyword_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getSemanticWebAgentAccess().getRGhtCurlyBracketKeyword_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new SemanticWebAgent_Group_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}



/************ end Rule SemanticWebAgent ****************/


/************ begin Rule Role ****************
 *
 * Role:
 * 	"Role" name=ID ";" | role=[Role] "{" "has" beh=[Behaviour] ";" ("has" beh=[Behaviour] ";")* "}";
 *
 **/

// "Role" name=ID ";" | role=[Role] "{" "has" beh=[Behaviour] ";" ("has" beh=[Behaviour] ";")* "}"
protected class Role_Alternatives extends AlternativesToken {

	public Role_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getRoleAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_Group_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Role_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getRoleRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Role" name=ID ";"
protected class Role_Group_0 extends GroupToken {
	
	public Role_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getRoleAccess().getGroup_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_SemColonKeyword_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "Role"
protected class Role_RoleKeyword_0_0 extends KeywordToken  {
	
	public Role_RoleKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getRoleKeyword_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Role_NameAssignment_0_1 extends AssignmentToken  {
	
	public Role_NameAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getRoleAccess().getNameAssignment_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_RoleKeyword_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getRoleAccess().getNameIDTerminalRuleCall_0_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getRoleAccess().getNameIDTerminalRuleCall_0_1_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Role_SemColonKeyword_0_2 extends KeywordToken  {
	
	public Role_SemColonKeyword_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getSemColonKeyword_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_NameAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// role=[Role] "{" "has" beh=[Behaviour] ";" ("has" beh=[Behaviour] ";")* "}"
protected class Role_Group_1 extends GroupToken {
	
	public Role_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getRoleAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_RGhtCurlyBracketKeyword_1_6(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// role=[Role]
protected class Role_RoleAssignment_1_0 extends AssignmentToken  {
	
	public Role_RoleAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getRoleAccess().getRoleAssignment_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("role",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("role");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getRoleAccess().getRoleRoleCrossReference_1_0_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getRoleAccess().getRoleRoleCrossReference_1_0_0(); 
				return obj;
			}
		}
		return null;
	}

}

// "{"
protected class Role_LeftCurlyBracketKeyword_1_1 extends KeywordToken  {
	
	public Role_LeftCurlyBracketKeyword_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getLeftCurlyBracketKeyword_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_RoleAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "has"
protected class Role_HasKeyword_1_2 extends KeywordToken  {
	
	public Role_HasKeyword_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getHasKeyword_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// beh=[Behaviour]
protected class Role_BehAssignment_1_3 extends AssignmentToken  {
	
	public Role_BehAssignment_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getRoleAccess().getBehAssignment_1_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_HasKeyword_1_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("beh",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("beh");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_3_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_3_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Role_SemColonKeyword_1_4 extends KeywordToken  {
	
	public Role_SemColonKeyword_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getSemColonKeyword_1_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_BehAssignment_1_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("has" beh=[Behaviour] ";")*
protected class Role_Group_1_5 extends GroupToken {
	
	public Role_Group_1_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getRoleAccess().getGroup_1_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_SemColonKeyword_1_5_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "has"
protected class Role_HasKeyword_1_5_0 extends KeywordToken  {
	
	public Role_HasKeyword_1_5_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getHasKeyword_1_5_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_Group_1_5(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Role_SemColonKeyword_1_4(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// beh=[Behaviour]
protected class Role_BehAssignment_1_5_1 extends AssignmentToken  {
	
	public Role_BehAssignment_1_5_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getRoleAccess().getBehAssignment_1_5_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_HasKeyword_1_5_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("beh",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("beh");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_5_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getRoleAccess().getBehBehaviourCrossReference_1_5_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Role_SemColonKeyword_1_5_2 extends KeywordToken  {
	
	public Role_SemColonKeyword_1_5_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getSemColonKeyword_1_5_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_BehAssignment_1_5_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "}"
protected class Role_RGhtCurlyBracketKeyword_1_6 extends KeywordToken  {
	
	public Role_RGhtCurlyBracketKeyword_1_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getRoleAccess().getRGhtCurlyBracketKeyword_1_6();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Role_Group_1_5(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Role_SemColonKeyword_1_4(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}



/************ end Rule Role ****************/


/************ begin Rule Plan ****************
 *
 * Plan:
 * 	"Plan" name=ID type=STRING description=STRING priority=INT ";" | plan=[Plan] "{" ("dispatches" goal=[Goal] ";")* "}";
 *
 **/

// "Plan" name=ID type=STRING description=STRING priority=INT ";" | plan=[Plan] "{" ("dispatches" goal=[Goal] ";")* "}"
protected class Plan_Alternatives extends AlternativesToken {

	public Plan_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getPlanAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_Group_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Plan_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getPlanRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Plan" name=ID type=STRING description=STRING priority=INT ";"
protected class Plan_Group_0 extends GroupToken {
	
	public Plan_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getPlanAccess().getGroup_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_SemColonKeyword_0_5(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "Plan"
protected class Plan_PlanKeyword_0_0 extends KeywordToken  {
	
	public Plan_PlanKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getPlanKeyword_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Plan_NameAssignment_0_1 extends AssignmentToken  {
	
	public Plan_NameAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getNameAssignment_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_PlanKeyword_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getPlanAccess().getNameIDTerminalRuleCall_0_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getPlanAccess().getNameIDTerminalRuleCall_0_1_0();
			return obj;
		}
		return null;
	}

}

// type=STRING
protected class Plan_TypeAssignment_0_2 extends AssignmentToken  {
	
	public Plan_TypeAssignment_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getTypeAssignment_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_NameAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("type",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("type");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getPlanAccess().getTypeSTRINGTerminalRuleCall_0_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getPlanAccess().getTypeSTRINGTerminalRuleCall_0_2_0();
			return obj;
		}
		return null;
	}

}

// description=STRING
protected class Plan_DescriptionAssignment_0_3 extends AssignmentToken  {
	
	public Plan_DescriptionAssignment_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getDescriptionAssignment_0_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_TypeAssignment_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("description",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("description");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getPlanAccess().getDescriptionSTRINGTerminalRuleCall_0_3_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getPlanAccess().getDescriptionSTRINGTerminalRuleCall_0_3_0();
			return obj;
		}
		return null;
	}

}

// priority=INT
protected class Plan_PriorityAssignment_0_4 extends AssignmentToken  {
	
	public Plan_PriorityAssignment_0_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getPriorityAssignment_0_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_DescriptionAssignment_0_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("priority",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("priority");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getPlanAccess().getPriorityINTTerminalRuleCall_0_4_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getPlanAccess().getPriorityINTTerminalRuleCall_0_4_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Plan_SemColonKeyword_0_5 extends KeywordToken  {
	
	public Plan_SemColonKeyword_0_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getSemColonKeyword_0_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_PriorityAssignment_0_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// plan=[Plan] "{" ("dispatches" goal=[Goal] ";")* "}"
protected class Plan_Group_1 extends GroupToken {
	
	public Plan_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getPlanAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_RGhtCurlyBracketKeyword_1_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// plan=[Plan]
protected class Plan_PlanAssignment_1_0 extends AssignmentToken  {
	
	public Plan_PlanAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getPlanAssignment_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("plan",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plan");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getPlanAccess().getPlanPlanCrossReference_1_0_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getPlanAccess().getPlanPlanCrossReference_1_0_0(); 
				return obj;
			}
		}
		return null;
	}

}

// "{"
protected class Plan_LeftCurlyBracketKeyword_1_1 extends KeywordToken  {
	
	public Plan_LeftCurlyBracketKeyword_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getLeftCurlyBracketKeyword_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_PlanAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("dispatches" goal=[Goal] ";")*
protected class Plan_Group_1_2 extends GroupToken {
	
	public Plan_Group_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getPlanAccess().getGroup_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_SemColonKeyword_1_2_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "dispatches"
protected class Plan_DispatchesKeyword_1_2_0 extends KeywordToken  {
	
	public Plan_DispatchesKeyword_1_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getDispatchesKeyword_1_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_Group_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Plan_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// goal=[Goal]
protected class Plan_GoalAssignment_1_2_1 extends AssignmentToken  {
	
	public Plan_GoalAssignment_1_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getPlanAccess().getGoalAssignment_1_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_DispatchesKeyword_1_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("goal",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("goal");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getPlanAccess().getGoalGoalCrossReference_1_2_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getPlanAccess().getGoalGoalCrossReference_1_2_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Plan_SemColonKeyword_1_2_2 extends KeywordToken  {
	
	public Plan_SemColonKeyword_1_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getSemColonKeyword_1_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_GoalAssignment_1_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "}"
protected class Plan_RGhtCurlyBracketKeyword_1_3 extends KeywordToken  {
	
	public Plan_RGhtCurlyBracketKeyword_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getPlanAccess().getRGhtCurlyBracketKeyword_1_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Plan_Group_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Plan_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}



/************ end Rule Plan ****************/


/************ begin Rule AgentType ****************
 *
 * AgentType:
 * 	"AgentType" name=ID ";";
 *
 **/

// "AgentType" name=ID ";"
protected class AgentType_Group extends GroupToken {
	
	public AgentType_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getAgentTypeAccess().getGroup();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentType_SemColonKeyword_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getAgentTypeRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "AgentType"
protected class AgentType_AgentTypeKeyword_0 extends KeywordToken  {
	
	public AgentType_AgentTypeKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentTypeAccess().getAgentTypeKeyword_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class AgentType_NameAssignment_1 extends AssignmentToken  {
	
	public AgentType_NameAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getAgentTypeAccess().getNameAssignment_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentType_AgentTypeKeyword_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAgentTypeAccess().getNameIDTerminalRuleCall_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getAgentTypeAccess().getNameIDTerminalRuleCall_1_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class AgentType_SemColonKeyword_2 extends KeywordToken  {
	
	public AgentType_SemColonKeyword_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getAgentTypeAccess().getSemColonKeyword_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new AgentType_NameAssignment_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


/************ end Rule AgentType ****************/


/************ begin Rule Behaviour ****************
 *
 * Behaviour:
 * 	"Behaviour" name=ID resident=INT ";" | beh=[Behaviour] "{" ("executes" plan=[Plan] ";")* "composed_of" beh=[Behaviour]
 * 	";" ("composed_of" beh=[Behaviour] ";")* ("executes" plan=[Plan] ";")* "}";
 *
 **/

// "Behaviour" name=ID resident=INT ";" | beh=[Behaviour] "{" ("executes" plan=[Plan] ";")* "composed_of" beh=[Behaviour]
// ";" ("composed_of" beh=[Behaviour] ";")* ("executes" plan=[Plan] ";")* "}"
protected class Behaviour_Alternatives extends AlternativesToken {

	public Behaviour_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Alternatives getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getAlternatives();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_0(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_Group_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

    @Override
	public IEObjectConsumer tryConsume() {
		if(getEObject().eClass() != grammarAccess.getBehaviourRule().getType().getClassifier())
			return null;
		return eObjectConsumer;
	}

}

// "Behaviour" name=ID resident=INT ";"
protected class Behaviour_Group_0 extends GroupToken {
	
	public Behaviour_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getGroup_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_SemColonKeyword_0_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "Behaviour"
protected class Behaviour_BehaviourKeyword_0_0 extends KeywordToken  {
	
	public Behaviour_BehaviourKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getBehaviourKeyword_0_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

}

// name=ID
protected class Behaviour_NameAssignment_0_1 extends AssignmentToken  {
	
	public Behaviour_NameAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getNameAssignment_0_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_BehaviourKeyword_0_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getBehaviourAccess().getNameIDTerminalRuleCall_0_1_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getBehaviourAccess().getNameIDTerminalRuleCall_0_1_0();
			return obj;
		}
		return null;
	}

}

// resident=INT
protected class Behaviour_ResidentAssignment_0_2 extends AssignmentToken  {
	
	public Behaviour_ResidentAssignment_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getResidentAssignment_0_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_NameAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("resident",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("resident");
		if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getBehaviourAccess().getResidentINTTerminalRuleCall_0_2_0(), value, null)) {
			type = AssignmentType.TERMINAL_RULE_CALL;
			element = grammarAccess.getBehaviourAccess().getResidentINTTerminalRuleCall_0_2_0();
			return obj;
		}
		return null;
	}

}

// ";"
protected class Behaviour_SemColonKeyword_0_3 extends KeywordToken  {
	
	public Behaviour_SemColonKeyword_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getSemColonKeyword_0_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_ResidentAssignment_0_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// beh=[Behaviour] "{" ("executes" plan=[Plan] ";")* "composed_of" beh=[Behaviour] ";" ("composed_of" beh=[Behaviour] ";")*
// ("executes" plan=[Plan] ";")* "}"
protected class Behaviour_Group_1 extends GroupToken {
	
	public Behaviour_Group_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getGroup_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_RGhtCurlyBracketKeyword_1_8(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// beh=[Behaviour]
protected class Behaviour_BehAssignment_1_0 extends AssignmentToken  {
	
	public Behaviour_BehAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getBehAssignment_1_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("beh",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("beh");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_0_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_0_0(); 
				return obj;
			}
		}
		return null;
	}

}

// "{"
protected class Behaviour_LeftCurlyBracketKeyword_1_1 extends KeywordToken  {
	
	public Behaviour_LeftCurlyBracketKeyword_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getLeftCurlyBracketKeyword_1_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_BehAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("executes" plan=[Plan] ";")*
protected class Behaviour_Group_1_2 extends GroupToken {
	
	public Behaviour_Group_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getGroup_1_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_SemColonKeyword_1_2_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "executes"
protected class Behaviour_ExecutesKeyword_1_2_0 extends KeywordToken  {
	
	public Behaviour_ExecutesKeyword_1_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getExecutesKeyword_1_2_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// plan=[Plan]
protected class Behaviour_PlanAssignment_1_2_1 extends AssignmentToken  {
	
	public Behaviour_PlanAssignment_1_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getPlanAssignment_1_2_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_ExecutesKeyword_1_2_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("plan",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plan");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_2_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_2_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Behaviour_SemColonKeyword_1_2_2 extends KeywordToken  {
	
	public Behaviour_SemColonKeyword_1_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getSemColonKeyword_1_2_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_PlanAssignment_1_2_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "composed_of"
protected class Behaviour_Composed_ofKeyword_1_3 extends KeywordToken  {
	
	public Behaviour_Composed_ofKeyword_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getComposed_ofKeyword_1_3();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_1_2(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_LeftCurlyBracketKeyword_1_1(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// beh=[Behaviour]
protected class Behaviour_BehAssignment_1_4 extends AssignmentToken  {
	
	public Behaviour_BehAssignment_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getBehAssignment_1_4();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Composed_ofKeyword_1_3(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("beh",true)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("beh");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_4_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_4_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Behaviour_SemColonKeyword_1_5 extends KeywordToken  {
	
	public Behaviour_SemColonKeyword_1_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getSemColonKeyword_1_5();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_BehAssignment_1_4(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// ("composed_of" beh=[Behaviour] ";")*
protected class Behaviour_Group_1_6 extends GroupToken {
	
	public Behaviour_Group_1_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getGroup_1_6();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_SemColonKeyword_1_6_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "composed_of"
protected class Behaviour_Composed_ofKeyword_1_6_0 extends KeywordToken  {
	
	public Behaviour_Composed_ofKeyword_1_6_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getComposed_ofKeyword_1_6_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_1_6(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_SemColonKeyword_1_5(lastRuleCallOrigin, this, 1, inst);
			default: return null;
		}	
	}

}

// beh=[Behaviour]
protected class Behaviour_BehAssignment_1_6_1 extends AssignmentToken  {
	
	public Behaviour_BehAssignment_1_6_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getBehAssignment_1_6_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Composed_ofKeyword_1_6_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("beh",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("beh");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_6_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getBehaviourAccess().getBehBehaviourCrossReference_1_6_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Behaviour_SemColonKeyword_1_6_2 extends KeywordToken  {
	
	public Behaviour_SemColonKeyword_1_6_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getSemColonKeyword_1_6_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_BehAssignment_1_6_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// ("executes" plan=[Plan] ";")*
protected class Behaviour_Group_1_7 extends GroupToken {
	
	public Behaviour_Group_1_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Group getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getGroup_1_7();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_SemColonKeyword_1_7_2(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}

// "executes"
protected class Behaviour_ExecutesKeyword_1_7_0 extends KeywordToken  {
	
	public Behaviour_ExecutesKeyword_1_7_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getExecutesKeyword_1_7_0();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_1_7(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_Group_1_6(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Behaviour_SemColonKeyword_1_5(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}

// plan=[Plan]
protected class Behaviour_PlanAssignment_1_7_1 extends AssignmentToken  {
	
	public Behaviour_PlanAssignment_1_7_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Assignment getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getPlanAssignment_1_7_1();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_ExecutesKeyword_1_7_0(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

    @Override	
	public IEObjectConsumer tryConsume() {
		if((value = eObjectConsumer.getConsumable("plan",false)) == null) return null;
		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("plan");
		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
			IEObjectConsumer param = createEObjectConsumer((EObject)value);
			if(param.isInstanceOf(grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_7_1_0().getType().getClassifier())) {
				type = AssignmentType.CROSS_REFERENCE;
				element = grammarAccess.getBehaviourAccess().getPlanPlanCrossReference_1_7_1_0(); 
				return obj;
			}
		}
		return null;
	}

}

// ";"
protected class Behaviour_SemColonKeyword_1_7_2 extends KeywordToken  {
	
	public Behaviour_SemColonKeyword_1_7_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getSemColonKeyword_1_7_2();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_PlanAssignment_1_7_1(lastRuleCallOrigin, this, 0, inst);
			default: return null;
		}	
	}

}


// "}"
protected class Behaviour_RGhtCurlyBracketKeyword_1_8 extends KeywordToken  {
	
	public Behaviour_RGhtCurlyBracketKeyword_1_8(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
		super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
	}
	
	@Override
	public Keyword getGrammarElement() {
		return grammarAccess.getBehaviourAccess().getRGhtCurlyBracketKeyword_1_8();
	}

    @Override
	public AbstractToken createFollower(int index, IEObjectConsumer inst) {
		switch(index) {
			case 0: return new Behaviour_Group_1_7(lastRuleCallOrigin, this, 0, inst);
			case 1: return new Behaviour_Group_1_6(lastRuleCallOrigin, this, 1, inst);
			case 2: return new Behaviour_SemColonKeyword_1_5(lastRuleCallOrigin, this, 2, inst);
			default: return null;
		}	
	}

}



/************ end Rule Behaviour ****************/

}
