/*
 * generated by Xtext 2.11.0
 */
package org.xtext.example.mydsl.ide.contentassist.antlr;

import com.google.inject.Inject;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
import org.xtext.example.mydsl.ide.contentassist.antlr.internal.InternalMyDslParser;
import org.xtext.example.mydsl.services.MyDslGrammarAccess;

public class MyDslParser extends AbstractContentAssistParser {

	@Inject
	private MyDslGrammarAccess grammarAccess;

	private Map<AbstractElement, String> nameMappings;

	@Override
	protected InternalMyDslParser createParser() {
		InternalMyDslParser result = new 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.getModelAccess().getGroup(), "rule__Model__Group__0");
					put(grammarAccess.getModelAccess().getGroup_4(), "rule__Model__Group_4__0");
					put(grammarAccess.getModelAccess().getGroup_4_3(), "rule__Model__Group_4_3__0");
					put(grammarAccess.getClassAAccess().getGroup(), "rule__ClassA__Group__0");
					put(grammarAccess.getClassAAccess().getGroup_4(), "rule__ClassA__Group_4__0");
					put(grammarAccess.getClassAAccess().getGroup_4_3(), "rule__ClassA__Group_4_3__0");
					put(grammarAccess.getClassBAccess().getGroup(), "rule__ClassB__Group__0");
					put(grammarAccess.getModelAccess().getNameAssignment_2(), "rule__Model__NameAssignment_2");
					put(grammarAccess.getModelAccess().getClassAsAssignment_4_2(), "rule__Model__ClassAsAssignment_4_2");
					put(grammarAccess.getModelAccess().getClassAsAssignment_4_3_1(), "rule__Model__ClassAsAssignment_4_3_1");
					put(grammarAccess.getClassAAccess().getNameAssignment_2(), "rule__ClassA__NameAssignment_2");
					put(grammarAccess.getClassAAccess().getClassbAssignment_4_2(), "rule__ClassA__ClassbAssignment_4_2");
					put(grammarAccess.getClassAAccess().getClassbAssignment_4_3_1(), "rule__ClassA__ClassbAssignment_4_3_1");
					put(grammarAccess.getClassBAccess().getNameAssignment_1(), "rule__ClassB__NameAssignment_1");
					put(grammarAccess.getClassBAccess().getTargetAssignment_4(), "rule__ClassB__TargetAssignment_4");
				}
			};
		}
		return nameMappings.get(element);
	}
			
	@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;
	}
}
