/*
* generated by Xtext
*/
package org.xtext.example.mydsl3.ui.contentassist.antlr;

import java.util.Collection;
import java.util.Map;
import java.util.HashMap;

import org.antlr.runtime.RecognitionException;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;

import com.google.inject.Inject;

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

public class MyDslParser extends AbstractContentAssistParser {
	
	@Inject
	private MyDslGrammarAccess grammarAccess;
	
	private Map<AbstractElement, String> nameMappings;
	
	@Override
	protected org.xtext.example.mydsl3.ui.contentassist.antlr.internal.InternalMyDslParser createParser() {
		org.xtext.example.mydsl3.ui.contentassist.antlr.internal.InternalMyDslParser result = new org.xtext.example.mydsl3.ui.contentassist.antlr.internal.InternalMyDslParser(null);
		result.setGrammarAccess(grammarAccess);
		return result;
	}
	
	@Override
	protected String getRuleName(AbstractElement element) {
		if (nameMappings == null) {
			nameMappings = new HashMap<AbstractElement, String>() {
				private static final long serialVersionUID = 1L;
				{
					put(grammarAccess.getAgentInternalViewpointAccess().getAlternatives_2(), "rule__AgentInternalViewpoint__Alternatives_2");
					put(grammarAccess.getAgentInternalViewpointAccess().getAlternatives_3(), "rule__AgentInternalViewpoint__Alternatives_3");
					put(grammarAccess.getCapabilitiesAccess().getAlternatives(), "rule__Capabilities__Alternatives");
					put(grammarAccess.getCapabilitiesAccess().getAlternatives_1_2(), "rule__Capabilities__Alternatives_1_2");
					put(grammarAccess.getSemanticWebAgentAccess().getAlternatives(), "rule__SemanticWebAgent__Alternatives");
					put(grammarAccess.getRoleAccess().getAlternatives(), "rule__Role__Alternatives");
					put(grammarAccess.getPlanAccess().getAlternatives(), "rule__Plan__Alternatives");
					put(grammarAccess.getBehaviourAccess().getAlternatives(), "rule__Behaviour__Alternatives");
					put(grammarAccess.getAgentInternalViewpointAccess().getGroup(), "rule__AgentInternalViewpoint__Group__0");
					put(grammarAccess.getAgentInternalViewpointAccess().getGroup_2_0(), "rule__AgentInternalViewpoint__Group_2_0__0");
					put(grammarAccess.getAgentInternalViewpointAccess().getGroup_2_1(), "rule__AgentInternalViewpoint__Group_2_1__0");
					put(grammarAccess.getBeliefAccess().getGroup(), "rule__Belief__Group__0");
					put(grammarAccess.getGoalAccess().getGroup(), "rule__Goal__Group__0");
					put(grammarAccess.getCapabilitiesAccess().getGroup_0(), "rule__Capabilities__Group_0__0");
					put(grammarAccess.getCapabilitiesAccess().getGroup_1(), "rule__Capabilities__Group_1__0");
					put(grammarAccess.getCapabilitiesAccess().getGroup_1_2_0(), "rule__Capabilities__Group_1_2_0__0");
					put(grammarAccess.getCapabilitiesAccess().getGroup_1_2_1(), "rule__Capabilities__Group_1_2_1__0");
					put(grammarAccess.getCapabilitiesAccess().getGroup_1_2_2(), "rule__Capabilities__Group_1_2_2__0");
					put(grammarAccess.getAgentStateAccess().getGroup(), "rule__AgentState__Group__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_0(), "rule__SemanticWebAgent__Group_0__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_1(), "rule__SemanticWebAgent__Group_1__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_1_1(), "rule__SemanticWebAgent__Group_1_1__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_4(), "rule__SemanticWebAgent__Group_1_1_4__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_8(), "rule__SemanticWebAgent__Group_1_1_8__0");
					put(grammarAccess.getSemanticWebAgentAccess().getGroup_1_1_12(), "rule__SemanticWebAgent__Group_1_1_12__0");
					put(grammarAccess.getRoleAccess().getGroup_0(), "rule__Role__Group_0__0");
					put(grammarAccess.getRoleAccess().getGroup_1(), "rule__Role__Group_1__0");
					put(grammarAccess.getRoleAccess().getGroup_1_5(), "rule__Role__Group_1_5__0");
					put(grammarAccess.getPlanAccess().getGroup_0(), "rule__Plan__Group_0__0");
					put(grammarAccess.getPlanAccess().getGroup_1(), "rule__Plan__Group_1__0");
					put(grammarAccess.getPlanAccess().getGroup_1_2(), "rule__Plan__Group_1_2__0");
					put(grammarAccess.getAgentTypeAccess().getGroup(), "rule__AgentType__Group__0");
					put(grammarAccess.getBehaviourAccess().getGroup_0(), "rule__Behaviour__Group_0__0");
					put(grammarAccess.getBehaviourAccess().getGroup_1(), "rule__Behaviour__Group_1__0");
					put(grammarAccess.getBehaviourAccess().getGroup_1_2(), "rule__Behaviour__Group_1_2__0");
					put(grammarAccess.getBehaviourAccess().getGroup_1_6(), "rule__Behaviour__Group_1_6__0");
					put(grammarAccess.getBehaviourAccess().getGroup_1_7(), "rule__Behaviour__Group_1_7__0");
					put(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_2_0_0(), "rule__AgentInternalViewpoint__SemanticwebagentAssignment_2_0_0");
					put(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_2_0_1(), "rule__AgentInternalViewpoint__CapabilitiesAssignment_2_0_1");
					put(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_2_1_0(), "rule__AgentInternalViewpoint__CapabilitiesAssignment_2_1_0");
					put(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_2_1_1(), "rule__AgentInternalViewpoint__SemanticwebagentAssignment_2_1_1");
					put(grammarAccess.getAgentInternalViewpointAccess().getBeliefAssignment_3_0(), "rule__AgentInternalViewpoint__BeliefAssignment_3_0");
					put(grammarAccess.getAgentInternalViewpointAccess().getGoalAssignment_3_1(), "rule__AgentInternalViewpoint__GoalAssignment_3_1");
					put(grammarAccess.getAgentInternalViewpointAccess().getCapabilitiesAssignment_3_2(), "rule__AgentInternalViewpoint__CapabilitiesAssignment_3_2");
					put(grammarAccess.getAgentInternalViewpointAccess().getAgentstateAssignment_3_3(), "rule__AgentInternalViewpoint__AgentstateAssignment_3_3");
					put(grammarAccess.getAgentInternalViewpointAccess().getSemanticwebagentAssignment_3_4(), "rule__AgentInternalViewpoint__SemanticwebagentAssignment_3_4");
					put(grammarAccess.getAgentInternalViewpointAccess().getRoleAssignment_3_5(), "rule__AgentInternalViewpoint__RoleAssignment_3_5");
					put(grammarAccess.getAgentInternalViewpointAccess().getPlanAssignment_3_6(), "rule__AgentInternalViewpoint__PlanAssignment_3_6");
					put(grammarAccess.getAgentInternalViewpointAccess().getAgenttypeAssignment_3_7(), "rule__AgentInternalViewpoint__AgenttypeAssignment_3_7");
					put(grammarAccess.getAgentInternalViewpointAccess().getBehaviourAssignment_3_8(), "rule__AgentInternalViewpoint__BehaviourAssignment_3_8");
					put(grammarAccess.getBeliefAccess().getNameAssignment_1(), "rule__Belief__NameAssignment_1");
					put(grammarAccess.getBeliefAccess().getDescriptionAssignment_2(), "rule__Belief__DescriptionAssignment_2");
					put(grammarAccess.getBeliefAccess().getDynamicAssignment_3(), "rule__Belief__DynamicAssignment_3");
					put(grammarAccess.getGoalAccess().getNameAssignment_1(), "rule__Goal__NameAssignment_1");
					put(grammarAccess.getGoalAccess().getDescriptionAssignment_2(), "rule__Goal__DescriptionAssignment_2");
					put(grammarAccess.getGoalAccess().getRecurAssignment_3(), "rule__Goal__RecurAssignment_3");
					put(grammarAccess.getCapabilitiesAccess().getNameAssignment_0_1(), "rule__Capabilities__NameAssignment_0_1");
					put(grammarAccess.getCapabilitiesAccess().getDescriptionAssignment_0_2(), "rule__Capabilities__DescriptionAssignment_0_2");
					put(grammarAccess.getCapabilitiesAccess().getCapAssignment_1_0(), "rule__Capabilities__CapAssignment_1_0");
					put(grammarAccess.getCapabilitiesAccess().getBeliefAssignment_1_2_0_1(), "rule__Capabilities__BeliefAssignment_1_2_0_1");
					put(grammarAccess.getCapabilitiesAccess().getGoalAssignment_1_2_1_1(), "rule__Capabilities__GoalAssignment_1_2_1_1");
					put(grammarAccess.getCapabilitiesAccess().getPlanAssignment_1_2_2_1(), "rule__Capabilities__PlanAssignment_1_2_2_1");
					put(grammarAccess.getAgentStateAccess().getNameAssignment_1(), "rule__AgentState__NameAssignment_1");
					put(grammarAccess.getSemanticWebAgentAccess().getNameAssignment_0_1(), "rule__SemanticWebAgent__NameAssignment_0_1");
					put(grammarAccess.getSemanticWebAgentAccess().getDescriptionAssignment_0_2(), "rule__SemanticWebAgent__DescriptionAssignment_0_2");
					put(grammarAccess.getSemanticWebAgentAccess().getPropertiesAssignment_0_3(), "rule__SemanticWebAgent__PropertiesAssignment_0_3");
					put(grammarAccess.getSemanticWebAgentAccess().getSemanticwebagentAssignment_1_0(), "rule__SemanticWebAgent__SemanticwebagentAssignment_1_0");
					put(grammarAccess.getSemanticWebAgentAccess().getAgentstateAssignment_1_1_2(), "rule__SemanticWebAgent__AgentstateAssignment_1_1_2");
					put(grammarAccess.getSemanticWebAgentAccess().getCapAssignment_1_1_4_1(), "rule__SemanticWebAgent__CapAssignment_1_1_4_1");
					put(grammarAccess.getSemanticWebAgentAccess().getCapAssignment_1_1_6(), "rule__SemanticWebAgent__CapAssignment_1_1_6");
					put(grammarAccess.getSemanticWebAgentAccess().getAgenttypeAssignment_1_1_8_1(), "rule__SemanticWebAgent__AgenttypeAssignment_1_1_8_1");
					put(grammarAccess.getSemanticWebAgentAccess().getRoleAssignment_1_1_10(), "rule__SemanticWebAgent__RoleAssignment_1_1_10");
					put(grammarAccess.getSemanticWebAgentAccess().getRoleAssignment_1_1_12_1(), "rule__SemanticWebAgent__RoleAssignment_1_1_12_1");
					put(grammarAccess.getRoleAccess().getNameAssignment_0_1(), "rule__Role__NameAssignment_0_1");
					put(grammarAccess.getRoleAccess().getRoleAssignment_1_0(), "rule__Role__RoleAssignment_1_0");
					put(grammarAccess.getRoleAccess().getBehAssignment_1_3(), "rule__Role__BehAssignment_1_3");
					put(grammarAccess.getRoleAccess().getBehAssignment_1_5_1(), "rule__Role__BehAssignment_1_5_1");
					put(grammarAccess.getPlanAccess().getNameAssignment_0_1(), "rule__Plan__NameAssignment_0_1");
					put(grammarAccess.getPlanAccess().getTypeAssignment_0_2(), "rule__Plan__TypeAssignment_0_2");
					put(grammarAccess.getPlanAccess().getDescriptionAssignment_0_3(), "rule__Plan__DescriptionAssignment_0_3");
					put(grammarAccess.getPlanAccess().getPriorityAssignment_0_4(), "rule__Plan__PriorityAssignment_0_4");
					put(grammarAccess.getPlanAccess().getPlanAssignment_1_0(), "rule__Plan__PlanAssignment_1_0");
					put(grammarAccess.getPlanAccess().getGoalAssignment_1_2_1(), "rule__Plan__GoalAssignment_1_2_1");
					put(grammarAccess.getAgentTypeAccess().getNameAssignment_1(), "rule__AgentType__NameAssignment_1");
					put(grammarAccess.getBehaviourAccess().getNameAssignment_0_1(), "rule__Behaviour__NameAssignment_0_1");
					put(grammarAccess.getBehaviourAccess().getResidentAssignment_0_2(), "rule__Behaviour__ResidentAssignment_0_2");
					put(grammarAccess.getBehaviourAccess().getBehAssignment_1_0(), "rule__Behaviour__BehAssignment_1_0");
					put(grammarAccess.getBehaviourAccess().getPlanAssignment_1_2_1(), "rule__Behaviour__PlanAssignment_1_2_1");
					put(grammarAccess.getBehaviourAccess().getBehAssignment_1_4(), "rule__Behaviour__BehAssignment_1_4");
					put(grammarAccess.getBehaviourAccess().getBehAssignment_1_6_1(), "rule__Behaviour__BehAssignment_1_6_1");
					put(grammarAccess.getBehaviourAccess().getPlanAssignment_1_7_1(), "rule__Behaviour__PlanAssignment_1_7_1");
				}
			};
		}
		return nameMappings.get(element);
	}
	
	@Override
	protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
		try {
			org.xtext.example.mydsl3.ui.contentassist.antlr.internal.InternalMyDslParser typedParser = (org.xtext.example.mydsl3.ui.contentassist.antlr.internal.InternalMyDslParser) parser;
			typedParser.entryRuleAgentInternalViewpoint();
			return typedParser.getFollowElements();
		} catch(RecognitionException ex) {
			throw new RuntimeException(ex);
		}		
	}
	
	@Override
	protected String[] getInitialHiddenTokens() {
		return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
	}
	
	public MyDslGrammarAccess getGrammarAccess() {
		return this.grammarAccess;
	}
	
	public void setGrammarAccess(MyDslGrammarAccess grammarAccess) {
		this.grammarAccess = grammarAccess;
	}
}
