/*
 * generated by Xtext 2.18.0.M3
 */
package co.edu.uniandes.accordant_dv.ide.contentassist.antlr;

import co.edu.uniandes.accordant_dv.ide.contentassist.antlr.internal.InternalAdvlParser;
import co.edu.uniandes.accordant_dv.services.AdvlGrammarAccess;
import com.google.common.collect.ImmutableMap;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;

public class AdvlParser extends AbstractContentAssistParser {

	@Singleton
	public static final class NameMappings {
		
		private final Map<AbstractElement, String> mappings;
		
		@Inject
		public NameMappings(AdvlGrammarAccess grammarAccess) {
			ImmutableMap.Builder<AbstractElement, String> builder = ImmutableMap.builder();
			init(builder, grammarAccess);
			this.mappings = builder.build();
		}
		
		public String getRuleName(AbstractElement element) {
			return mappings.get(element);
		}
		
		private static void init(ImmutableMap.Builder<AbstractElement, String> builder, AdvlGrammarAccess grammarAccess) {
			builder.put(grammarAccess.getEStringAccess().getAlternatives(), "rule__EString__Alternatives");
			builder.put(grammarAccess.getTypeDeviceAccess().getAlternatives(), "rule__TypeDevice__Alternatives");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup(), "rule__DeploymentView__Group__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_12(), "rule__DeploymentView__Group_12__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_17(), "rule__DeploymentView__Group_17__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_22(), "rule__DeploymentView__Group_22__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_24(), "rule__DeploymentView__Group_24__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_24_3(), "rule__DeploymentView__Group_24_3__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_25(), "rule__DeploymentView__Group_25__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getGroup_25_3(), "rule__DeploymentView__Group_25_3__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_0(), "rule__Device__Group_0__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_0_3(), "rule__Device__Group_0_3__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_1(), "rule__Device__Group_1__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_2(), "rule__Device__Group_2__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_3(), "rule__Device__Group_3__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_4(), "rule__Device__Group_4__0");
			builder.put(grammarAccess.getDeviceAccess().getGroup_4_0(), "rule__Device__Group_4_0__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup(), "rule__Deployment__Group__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup_3(), "rule__Deployment__Group_3__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup_4(), "rule__Deployment__Group_4__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup_5(), "rule__Deployment__Group_5__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup_9(), "rule__Deployment__Group_9__0");
			builder.put(grammarAccess.getDeploymentAccess().getGroup_11(), "rule__Deployment__Group_11__0");
			builder.put(grammarAccess.getPodAccess().getGroup(), "rule__Pod__Group__0");
			builder.put(grammarAccess.getPodAccess().getGroup_3(), "rule__Pod__Group_3__0");
			builder.put(grammarAccess.getPodAccess().getGroup_4(), "rule__Pod__Group_4__0");
			builder.put(grammarAccess.getPodAccess().getGroup_5(), "rule__Pod__Group_5__0");
			builder.put(grammarAccess.getPodAccess().getGroup_9(), "rule__Pod__Group_9__0");
			builder.put(grammarAccess.getServiceAccess().getGroup(), "rule__Service__Group__0");
			builder.put(grammarAccess.getServiceAccess().getGroup_3(), "rule__Service__Group_3__0");
			builder.put(grammarAccess.getServiceAccess().getGroup_4(), "rule__Service__Group_4__0");
			builder.put(grammarAccess.getServiceAccess().getGroup_8(), "rule__Service__Group_8__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup(), "rule__ExposedPort__Group__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup_3(), "rule__ExposedPort__Group_3__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup_4(), "rule__ExposedPort__Group_4__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup_5(), "rule__ExposedPort__Group_5__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup_6(), "rule__ExposedPort__Group_6__0");
			builder.put(grammarAccess.getExposedPortAccess().getGroup_6_3(), "rule__ExposedPort__Group_6_3__0");
			builder.put(grammarAccess.getEIntAccess().getGroup(), "rule__EInt__Group__0");
			builder.put(grammarAccess.getEFloatAccess().getGroup(), "rule__EFloat__Group__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup(), "rule__ExecEnvironment__Group__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_3(), "rule__ExecEnvironment__Group_3__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_3_3(), "rule__ExecEnvironment__Group_3_3__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_4(), "rule__ExecEnvironment__Group_4__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_5(), "rule__ExecEnvironment__Group_5__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_6(), "rule__ExecEnvironment__Group_6__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_7(), "rule__ExecEnvironment__Group_7__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_8(), "rule__ExecEnvironment__Group_8__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_9(), "rule__ExecEnvironment__Group_9__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_9_3(), "rule__ExecEnvironment__Group_9_3__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_10(), "rule__ExecEnvironment__Group_10__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_10_3(), "rule__ExecEnvironment__Group_10_3__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_11(), "rule__ExecEnvironment__Group_11__0");
			builder.put(grammarAccess.getExecEnvironmentAccess().getGroup_11_3(), "rule__ExecEnvironment__Group_11_3__0");
			builder.put(grammarAccess.getEnvVarAccess().getGroup(), "rule__EnvVar__Group__0");
			builder.put(grammarAccess.getEnvVarAccess().getGroup_1(), "rule__EnvVar__Group_1__0");
			builder.put(grammarAccess.getServerlessEnvAccess().getGroup(), "rule__ServerlessEnv__Group__0");
			builder.put(grammarAccess.getServerlessEnvAccess().getGroup_4(), "rule__ServerlessEnv__Group_4__0");
			builder.put(grammarAccess.getServerlessEnvAccess().getGroup_5(), "rule__ServerlessEnv__Group_5__0");
			builder.put(grammarAccess.getServerlessEnvAccess().getGroup_6(), "rule__ServerlessEnv__Group_6__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_0(), "rule__Artifact__Group_0__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_0_3(), "rule__Artifact__Group_0_3__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_1(), "rule__Artifact__Group_1__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_2(), "rule__Artifact__Group_2__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_3(), "rule__Artifact__Group_3__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_4(), "rule__Artifact__Group_4__0");
			builder.put(grammarAccess.getArtifactAccess().getGroup_4_0(), "rule__Artifact__Group_4_0__0");
			builder.put(grammarAccess.getDeploymentViewAccess().getNameAssignment_1(), "rule__DeploymentView__NameAssignment_1");
			builder.put(grammarAccess.getDeploymentViewAccess().getProjectAssignment_4(), "rule__DeploymentView__ProjectAssignment_4");
			builder.put(grammarAccess.getDeploymentViewAccess().getFvAssignment_7(), "rule__DeploymentView__FvAssignment_7");
			builder.put(grammarAccess.getDeploymentViewAccess().getArtifactsAssignment_11(), "rule__DeploymentView__ArtifactsAssignment_11");
			builder.put(grammarAccess.getDeploymentViewAccess().getArtifactsAssignment_12_1(), "rule__DeploymentView__ArtifactsAssignment_12_1");
			builder.put(grammarAccess.getDeploymentViewAccess().getDevsAssignment_16(), "rule__DeploymentView__DevsAssignment_16");
			builder.put(grammarAccess.getDeploymentViewAccess().getDevsAssignment_17_1(), "rule__DeploymentView__DevsAssignment_17_1");
			builder.put(grammarAccess.getDeploymentViewAccess().getDeploymentsAssignment_21(), "rule__DeploymentView__DeploymentsAssignment_21");
			builder.put(grammarAccess.getDeploymentViewAccess().getDeploymentsAssignment_22_1(), "rule__DeploymentView__DeploymentsAssignment_22_1");
			builder.put(grammarAccess.getDeploymentViewAccess().getServicesAssignment_24_2(), "rule__DeploymentView__ServicesAssignment_24_2");
			builder.put(grammarAccess.getDeploymentViewAccess().getServicesAssignment_24_3_1(), "rule__DeploymentView__ServicesAssignment_24_3_1");
			builder.put(grammarAccess.getDeploymentViewAccess().getServerlessAssignment_25_2(), "rule__DeploymentView__ServerlessAssignment_25_2");
			builder.put(grammarAccess.getDeploymentViewAccess().getServerlessAssignment_25_3_1(), "rule__DeploymentView__ServerlessAssignment_25_3_1");
			builder.put(grammarAccess.getDeviceAccess().getNameAssignment_0_1(), "rule__Device__NameAssignment_0_1");
			builder.put(grammarAccess.getDeviceAccess().getHostAssignment_0_3_2(), "rule__Device__HostAssignment_0_3_2");
			builder.put(grammarAccess.getDeviceAccess().getTypeAssignment_1_2(), "rule__Device__TypeAssignment_1_2");
			builder.put(grammarAccess.getDeviceAccess().getCpuAssignment_2_2(), "rule__Device__CpuAssignment_2_2");
			builder.put(grammarAccess.getDeviceAccess().getStorageAssignment_3_2(), "rule__Device__StorageAssignment_3_2");
			builder.put(grammarAccess.getDeviceAccess().getMemAssignment_4_0_2(), "rule__Device__MemAssignment_4_0_2");
			builder.put(grammarAccess.getDeploymentAccess().getNameAssignment_1(), "rule__Deployment__NameAssignment_1");
			builder.put(grammarAccess.getDeploymentAccess().getReplicasAssignment_3_2(), "rule__Deployment__ReplicasAssignment_3_2");
			builder.put(grammarAccess.getDeploymentAccess().getMaxSurgeAssignment_4_2(), "rule__Deployment__MaxSurgeAssignment_4_2");
			builder.put(grammarAccess.getDeploymentAccess().getMaxUnavailAssignment_5_2(), "rule__Deployment__MaxUnavailAssignment_5_2");
			builder.put(grammarAccess.getDeploymentAccess().getPodsAssignment_8(), "rule__Deployment__PodsAssignment_8");
			builder.put(grammarAccess.getDeploymentAccess().getPodsAssignment_9_1(), "rule__Deployment__PodsAssignment_9_1");
			builder.put(grammarAccess.getDeploymentAccess().getDecisionAssignment_11_2(), "rule__Deployment__DecisionAssignment_11_2");
			builder.put(grammarAccess.getPodAccess().getNameAssignment_1(), "rule__Pod__NameAssignment_1");
			builder.put(grammarAccess.getPodAccess().getHostAssignment_3_2(), "rule__Pod__HostAssignment_3_2");
			builder.put(grammarAccess.getPodAccess().getNodeAssignment_4_2(), "rule__Pod__NodeAssignment_4_2");
			builder.put(grammarAccess.getPodAccess().getRestartPolicyAssignment_5_2(), "rule__Pod__RestartPolicyAssignment_5_2");
			builder.put(grammarAccess.getPodAccess().getEnvsAssignment_8(), "rule__Pod__EnvsAssignment_8");
			builder.put(grammarAccess.getPodAccess().getEnvsAssignment_9_1(), "rule__Pod__EnvsAssignment_9_1");
			builder.put(grammarAccess.getServiceAccess().getNameAssignment_1(), "rule__Service__NameAssignment_1");
			builder.put(grammarAccess.getServiceAccess().getTypeAssignment_3_2(), "rule__Service__TypeAssignment_3_2");
			builder.put(grammarAccess.getServiceAccess().getExtAccessAssignment_4_2(), "rule__Service__ExtAccessAssignment_4_2");
			builder.put(grammarAccess.getServiceAccess().getPortsAssignment_7(), "rule__Service__PortsAssignment_7");
			builder.put(grammarAccess.getServiceAccess().getPortsAssignment_8_1(), "rule__Service__PortsAssignment_8_1");
			builder.put(grammarAccess.getExposedPortAccess().getNameAssignment_1(), "rule__ExposedPort__NameAssignment_1");
			builder.put(grammarAccess.getExposedPortAccess().getProtocolAssignment_3_2(), "rule__ExposedPort__ProtocolAssignment_3_2");
			builder.put(grammarAccess.getExposedPortAccess().getTargetAssignment_4_2(), "rule__ExposedPort__TargetAssignment_4_2");
			builder.put(grammarAccess.getExposedPortAccess().getPortAssignment_5_2(), "rule__ExposedPort__PortAssignment_5_2");
			builder.put(grammarAccess.getExposedPortAccess().getExposesAssignment_6_2(), "rule__ExposedPort__ExposesAssignment_6_2");
			builder.put(grammarAccess.getExposedPortAccess().getExposesAssignment_6_3_1(), "rule__ExposedPort__ExposesAssignment_6_3_1");
			builder.put(grammarAccess.getExecEnvironmentAccess().getNameAssignment_1(), "rule__ExecEnvironment__NameAssignment_1");
			builder.put(grammarAccess.getExecEnvironmentAccess().getPaasArtsAssignment_3_2(), "rule__ExecEnvironment__PaasArtsAssignment_3_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getPaasArtsAssignment_3_3_1(), "rule__ExecEnvironment__PaasArtsAssignment_3_3_1");
			builder.put(grammarAccess.getExecEnvironmentAccess().getImageAssignment_4_2(), "rule__ExecEnvironment__ImageAssignment_4_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getCpu_limAssignment_5_2(), "rule__ExecEnvironment__Cpu_limAssignment_5_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getMem_limAssignment_6_2(), "rule__ExecEnvironment__Mem_limAssignment_6_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getCpu_reqAssignment_7_2(), "rule__ExecEnvironment__Cpu_reqAssignment_7_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getMem_reqAssignment_8_2(), "rule__ExecEnvironment__Mem_reqAssignment_8_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getPortsAssignment_9_2(), "rule__ExecEnvironment__PortsAssignment_9_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getPortsAssignment_9_3_1(), "rule__ExecEnvironment__PortsAssignment_9_3_1");
			builder.put(grammarAccess.getExecEnvironmentAccess().getCommandsAssignment_10_2(), "rule__ExecEnvironment__CommandsAssignment_10_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getCommandsAssignment_10_3_1(), "rule__ExecEnvironment__CommandsAssignment_10_3_1");
			builder.put(grammarAccess.getExecEnvironmentAccess().getVarsAssignment_11_2(), "rule__ExecEnvironment__VarsAssignment_11_2");
			builder.put(grammarAccess.getExecEnvironmentAccess().getVarsAssignment_11_3_1(), "rule__ExecEnvironment__VarsAssignment_11_3_1");
			builder.put(grammarAccess.getEnvVarAccess().getNameAssignment_1_0(), "rule__EnvVar__NameAssignment_1_0");
			builder.put(grammarAccess.getEnvVarAccess().getValueAssignment_1_2(), "rule__EnvVar__ValueAssignment_1_2");
			builder.put(grammarAccess.getServerlessEnvAccess().getNameAssignment_2(), "rule__ServerlessEnv__NameAssignment_2");
			builder.put(grammarAccess.getServerlessEnvAccess().getProviderAssignment_4_2(), "rule__ServerlessEnv__ProviderAssignment_4_2");
			builder.put(grammarAccess.getServerlessEnvAccess().getMemoryAssignment_5_2(), "rule__ServerlessEnv__MemoryAssignment_5_2");
			builder.put(grammarAccess.getServerlessEnvAccess().getTimeoutAssignment_6_2(), "rule__ServerlessEnv__TimeoutAssignment_6_2");
			builder.put(grammarAccess.getArtifactAccess().getNameAssignment_0_1(), "rule__Artifact__NameAssignment_0_1");
			builder.put(grammarAccess.getArtifactAccess().getCompAssignment_0_3_2(), "rule__Artifact__CompAssignment_0_3_2");
			builder.put(grammarAccess.getArtifactAccess().getConnAssignment_1_2(), "rule__Artifact__ConnAssignment_1_2");
			builder.put(grammarAccess.getArtifactAccess().getTechnologyAssignment_2_2(), "rule__Artifact__TechnologyAssignment_2_2");
			builder.put(grammarAccess.getArtifactAccess().getPropsAssignment_3_2(), "rule__Artifact__PropsAssignment_3_2");
			builder.put(grammarAccess.getArtifactAccess().getDecisionAssignment_4_0_2(), "rule__Artifact__DecisionAssignment_4_0_2");
			builder.put(grammarAccess.getDeviceAccess().getUnorderedGroup(), "rule__Device__UnorderedGroup");
			builder.put(grammarAccess.getArtifactAccess().getUnorderedGroup(), "rule__Artifact__UnorderedGroup");
		}
	}
	
	@Inject
	private NameMappings nameMappings;

	@Inject
	private AdvlGrammarAccess grammarAccess;

	@Override
	protected InternalAdvlParser createParser() {
		InternalAdvlParser result = new InternalAdvlParser(null);
		result.setGrammarAccess(grammarAccess);
		return result;
	}

	@Override
	protected String getRuleName(AbstractElement element) {
		return nameMappings.getRuleName(element);
	}

	@Override
	protected String[] getInitialHiddenTokens() {
		return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
	}

	public AdvlGrammarAccess getGrammarAccess() {
		return this.grammarAccess;
	}

	public void setGrammarAccess(AdvlGrammarAccess grammarAccess) {
		this.grammarAccess = grammarAccess;
	}
	
	public NameMappings getNameMappings() {
		return nameMappings;
	}
	
	public void setNameMappings(NameMappings nameMappings) {
		this.nameMappings = nameMappings;
	}
}
