/*
 * generated by Xtext 2.12.0
 */
package com.irtsaintexupery.xtext.ide.contentassist.antlr;

import com.google.inject.Inject;
import com.irtsaintexupery.xtext.ide.contentassist.antlr.internal.InternalPseimParser;
import com.irtsaintexupery.xtext.services.PseimGrammarAccess;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;

public class PseimParser extends AbstractContentAssistParser {

	@Inject
	private PseimGrammarAccess grammarAccess;

	private Map<AbstractElement, String> nameMappings;

	@Override
	protected InternalPseimParser createParser() {
		InternalPseimParser result = new InternalPseimParser(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.getPropertyAccess().getAlternatives(), "rule__Property__Alternatives");
					put(grammarAccess.getGraphElementAccess().getAlternatives(), "rule__GraphElement__Alternatives");
					put(grammarAccess.getPropertyHolderAccess().getAlternatives(), "rule__PropertyHolder__Alternatives");
					put(grammarAccess.getElementAccess().getAlternatives(), "rule__Element__Alternatives");
					put(grammarAccess.getEStringAccess().getAlternatives(), "rule__EString__Alternatives");
					put(grammarAccess.getEBooleanAccess().getAlternatives(), "rule__EBoolean__Alternatives");
					put(grammarAccess.getPortDirectionAccess().getAlternatives(), "rule__PortDirection__Alternatives");
					put(grammarAccess.getModelAccess().getGroup(), "rule__Model__Group__0");
					put(grammarAccess.getModelAccess().getGroup_2(), "rule__Model__Group_2__0");
					put(grammarAccess.getComponentAccess().getGroup(), "rule__Component__Group__0");
					put(grammarAccess.getComponentAccess().getGroup_3(), "rule__Component__Group_3__0");
					put(grammarAccess.getComponentAccess().getGroup_3_1(), "rule__Component__Group_3_1__0");
					put(grammarAccess.getComponentAccess().getGroup_5(), "rule__Component__Group_5__0");
					put(grammarAccess.getPortAccess().getGroup(), "rule__Port__Group__0");
					put(grammarAccess.getLinkAccess().getGroup(), "rule__Link__Group__0");
					put(grammarAccess.getQualifiedIDAccess().getGroup(), "rule__QualifiedID__Group__0");
					put(grammarAccess.getQualifiedIDAccess().getGroup_1(), "rule__QualifiedID__Group_1__0");
					put(grammarAccess.getIntegerPropertyAccess().getGroup(), "rule__IntegerProperty__Group__0");
					put(grammarAccess.getStringPropertyAccess().getGroup(), "rule__StringProperty__Group__0");
					put(grammarAccess.getBooleanPropertyAccess().getGroup(), "rule__BooleanProperty__Group__0");
					put(grammarAccess.getReferencePropertyAccess().getGroup(), "rule__ReferenceProperty__Group__0");
					put(grammarAccess.getEIntAccess().getGroup(), "rule__EInt__Group__0");
					put(grammarAccess.getModelAccess().getNameAssignment_1(), "rule__Model__NameAssignment_1");
					put(grammarAccess.getModelAccess().getModelElementsAssignment_2_1(), "rule__Model__ModelElementsAssignment_2_1");
					put(grammarAccess.getComponentAccess().getNameAssignment_1(), "rule__Component__NameAssignment_1");
					put(grammarAccess.getComponentAccess().getContentAssignment_3_0(), "rule__Component__ContentAssignment_3_0");
					put(grammarAccess.getComponentAccess().getContentAssignment_3_1_1(), "rule__Component__ContentAssignment_3_1_1");
					put(grammarAccess.getComponentAccess().getContentAssignment_5_1(), "rule__Component__ContentAssignment_5_1");
					put(grammarAccess.getPortAccess().getDirectionAssignment_0(), "rule__Port__DirectionAssignment_0");
					put(grammarAccess.getPortAccess().getNameAssignment_1(), "rule__Port__NameAssignment_1");
					put(grammarAccess.getLinkAccess().getSrcAssignment_0(), "rule__Link__SrcAssignment_0");
					put(grammarAccess.getLinkAccess().getDstAssignment_2(), "rule__Link__DstAssignment_2");
					put(grammarAccess.getIntegerPropertyAccess().getKeyAssignment_3(), "rule__IntegerProperty__KeyAssignment_3");
					put(grammarAccess.getIntegerPropertyAccess().getValueAssignment_5(), "rule__IntegerProperty__ValueAssignment_5");
					put(grammarAccess.getStringPropertyAccess().getKeyAssignment_3(), "rule__StringProperty__KeyAssignment_3");
					put(grammarAccess.getStringPropertyAccess().getValueAssignment_5(), "rule__StringProperty__ValueAssignment_5");
					put(grammarAccess.getBooleanPropertyAccess().getValueAssignment_0(), "rule__BooleanProperty__ValueAssignment_0");
					put(grammarAccess.getBooleanPropertyAccess().getKeyAssignment_4(), "rule__BooleanProperty__KeyAssignment_4");
					put(grammarAccess.getReferencePropertyAccess().getKeyAssignment_3(), "rule__ReferenceProperty__KeyAssignment_3");
					put(grammarAccess.getReferencePropertyAccess().getRefAssignment_5(), "rule__ReferenceProperty__RefAssignment_5");
				}
			};
		}
		return nameMappings.get(element);
	}
			
	@Override
	protected String[] getInitialHiddenTokens() {
		return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
	}

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

	public void setGrammarAccess(PseimGrammarAccess grammarAccess) {
		this.grammarAccess = grammarAccess;
	}
}
