/*
 * generated by Xtext 2.12.0
 */
package com.irtsaintexupery.xtext.pseim.services;

import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.List;
import org.eclipse.xtext.Alternatives;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.CrossReference;
import org.eclipse.xtext.EnumLiteralDeclaration;
import org.eclipse.xtext.EnumRule;
import org.eclipse.xtext.Grammar;
import org.eclipse.xtext.GrammarUtil;
import org.eclipse.xtext.Group;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.TerminalRule;
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
import org.eclipse.xtext.service.AbstractElementFinder.AbstractEnumRuleElementFinder;
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
import org.eclipse.xtext.service.GrammarProvider;

@Singleton
public class PatternGrammarAccess extends AbstractGrammarElementFinder {
	
	public class PatternElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.Pattern");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Keyword cPatternKeyword_0 = (Keyword)cGroup.eContents().get(0);
		private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
		private final Keyword cLeftParenthesisKeyword_2 = (Keyword)cGroup.eContents().get(2);
		private final Group cGroup_3 = (Group)cGroup.eContents().get(3);
		private final Assignment cCardinalityElementsAssignment_3_0 = (Assignment)cGroup_3.eContents().get(0);
		private final RuleCall cCardinalityElementsCardinalityElementParserRuleCall_3_0_0 = (RuleCall)cCardinalityElementsAssignment_3_0.eContents().get(0);
		private final Group cGroup_3_1 = (Group)cGroup_3.eContents().get(1);
		private final Keyword cCommaKeyword_3_1_0 = (Keyword)cGroup_3_1.eContents().get(0);
		private final Assignment cCardinalityElementsAssignment_3_1_1 = (Assignment)cGroup_3_1.eContents().get(1);
		private final RuleCall cCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0 = (RuleCall)cCardinalityElementsAssignment_3_1_1.eContents().get(0);
		private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
		private final Group cGroup_5 = (Group)cGroup.eContents().get(5);
		private final Keyword cLeftCurlyBracketKeyword_5_0 = (Keyword)cGroup_5.eContents().get(0);
		private final Alternatives cAlternatives_5_1 = (Alternatives)cGroup_5.eContents().get(1);
		private final Assignment cModelElementsAssignment_5_1_0 = (Assignment)cAlternatives_5_1.eContents().get(0);
		private final RuleCall cModelElementsPatternComponentParserRuleCall_5_1_0_0 = (RuleCall)cModelElementsAssignment_5_1_0.eContents().get(0);
		private final Assignment cModelElementsAssignment_5_1_1 = (Assignment)cAlternatives_5_1.eContents().get(1);
		private final RuleCall cModelElementsPatternLinkParserRuleCall_5_1_1_0 = (RuleCall)cModelElementsAssignment_5_1_1.eContents().get(0);
		private final Keyword cRightCurlyBracketKeyword_5_2 = (Keyword)cGroup_5.eContents().get(2);
		
		//Pattern:
		//	'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')'
		//	('{' (modelElements+=PatternComponent | modelElements+=PatternLink)*
		//	'}')?;
		@Override public ParserRule getRule() { return rule; }
		
		//'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')' ('{'
		//(modelElements+=PatternComponent | modelElements+=PatternLink)* '}')?
		public Group getGroup() { return cGroup; }
		
		//'pattern'
		public Keyword getPatternKeyword_0() { return cPatternKeyword_0; }
		
		//name=ID
		public Assignment getNameAssignment_1() { return cNameAssignment_1; }
		
		//ID
		public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
		
		//'('
		public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; }
		
		//(cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)?
		public Group getGroup_3() { return cGroup_3; }
		
		//cardinalityElements+=CardinalityElement
		public Assignment getCardinalityElementsAssignment_3_0() { return cCardinalityElementsAssignment_3_0; }
		
		//CardinalityElement
		public RuleCall getCardinalityElementsCardinalityElementParserRuleCall_3_0_0() { return cCardinalityElementsCardinalityElementParserRuleCall_3_0_0; }
		
		//(',' cardinalityElements+=CardinalityElement)*
		public Group getGroup_3_1() { return cGroup_3_1; }
		
		//','
		public Keyword getCommaKeyword_3_1_0() { return cCommaKeyword_3_1_0; }
		
		//cardinalityElements+=CardinalityElement
		public Assignment getCardinalityElementsAssignment_3_1_1() { return cCardinalityElementsAssignment_3_1_1; }
		
		//CardinalityElement
		public RuleCall getCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0() { return cCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0; }
		
		//')'
		public Keyword getRightParenthesisKeyword_4() { return cRightParenthesisKeyword_4; }
		
		//('{' (modelElements+=PatternComponent | modelElements+=PatternLink)* '}')?
		public Group getGroup_5() { return cGroup_5; }
		
		//'{'
		public Keyword getLeftCurlyBracketKeyword_5_0() { return cLeftCurlyBracketKeyword_5_0; }
		
		//(modelElements+=PatternComponent | modelElements+=PatternLink)*
		public Alternatives getAlternatives_5_1() { return cAlternatives_5_1; }
		
		//modelElements+=PatternComponent
		public Assignment getModelElementsAssignment_5_1_0() { return cModelElementsAssignment_5_1_0; }
		
		//PatternComponent
		public RuleCall getModelElementsPatternComponentParserRuleCall_5_1_0_0() { return cModelElementsPatternComponentParserRuleCall_5_1_0_0; }
		
		//modelElements+=PatternLink
		public Assignment getModelElementsAssignment_5_1_1() { return cModelElementsAssignment_5_1_1; }
		
		//PatternLink
		public RuleCall getModelElementsPatternLinkParserRuleCall_5_1_1_0() { return cModelElementsPatternLinkParserRuleCall_5_1_1_0; }
		
		//'}'
		public Keyword getRightCurlyBracketKeyword_5_2() { return cRightCurlyBracketKeyword_5_2; }
	}
	public class PatternComponentElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternComponent");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Keyword cComponentKeyword_0 = (Keyword)cGroup.eContents().get(0);
		private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
		private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
		private final Keyword cLeftSquareBracketKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
		private final Alternatives cAlternatives_2_1 = (Alternatives)cGroup_2.eContents().get(1);
		private final Assignment cMultiplicityValueAssignment_2_1_0 = (Assignment)cAlternatives_2_1.eContents().get(0);
		private final RuleCall cMultiplicityValueINTTerminalRuleCall_2_1_0_0 = (RuleCall)cMultiplicityValueAssignment_2_1_0.eContents().get(0);
		private final Assignment cCardinalityElementAssignment_2_1_1 = (Assignment)cAlternatives_2_1.eContents().get(1);
		private final CrossReference cCardinalityElementCardinalityElementCrossReference_2_1_1_0 = (CrossReference)cCardinalityElementAssignment_2_1_1.eContents().get(0);
		private final RuleCall cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1 = (RuleCall)cCardinalityElementCardinalityElementCrossReference_2_1_1_0.eContents().get(1);
		private final Keyword cRightSquareBracketKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
		private final Keyword cLeftParenthesisKeyword_3 = (Keyword)cGroup.eContents().get(3);
		private final Group cGroup_4 = (Group)cGroup.eContents().get(4);
		private final Assignment cContentAssignment_4_0 = (Assignment)cGroup_4.eContents().get(0);
		private final RuleCall cContentPatternPortParserRuleCall_4_0_0 = (RuleCall)cContentAssignment_4_0.eContents().get(0);
		private final Group cGroup_4_1 = (Group)cGroup_4.eContents().get(1);
		private final Keyword cCommaKeyword_4_1_0 = (Keyword)cGroup_4_1.eContents().get(0);
		private final Assignment cContentAssignment_4_1_1 = (Assignment)cGroup_4_1.eContents().get(1);
		private final RuleCall cContentPatternPortParserRuleCall_4_1_1_0 = (RuleCall)cContentAssignment_4_1_1.eContents().get(0);
		private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5);
		private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
		private final Keyword cLeftCurlyBracketKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
		private final Alternatives cAlternatives_6_1 = (Alternatives)cGroup_6.eContents().get(1);
		private final Assignment cContentAssignment_6_1_0 = (Assignment)cAlternatives_6_1.eContents().get(0);
		private final RuleCall cContentPatternComponentParserRuleCall_6_1_0_0 = (RuleCall)cContentAssignment_6_1_0.eContents().get(0);
		private final Assignment cContentAssignment_6_1_1 = (Assignment)cAlternatives_6_1.eContents().get(1);
		private final RuleCall cContentPatternLinkParserRuleCall_6_1_1_0 = (RuleCall)cContentAssignment_6_1_1.eContents().get(0);
		private final Keyword cRightCurlyBracketKeyword_6_2 = (Keyword)cGroup_6.eContents().get(2);
		
		//PatternComponent:
		//	'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
		//	(content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)*
		//	'}')?;
		@Override public ParserRule getRule() { return rule; }
		
		//'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
		//(content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)* '}')?
		public Group getGroup() { return cGroup; }
		
		//'component'
		public Keyword getComponentKeyword_0() { return cComponentKeyword_0; }
		
		//name=ID
		public Assignment getNameAssignment_1() { return cNameAssignment_1; }
		
		//ID
		public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
		
		//('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
		public Group getGroup_2() { return cGroup_2; }
		
		//'['
		public Keyword getLeftSquareBracketKeyword_2_0() { return cLeftSquareBracketKeyword_2_0; }
		
		//multiplicityValue=INT | cardinalityElement=[CardinalityElement]
		public Alternatives getAlternatives_2_1() { return cAlternatives_2_1; }
		
		//multiplicityValue=INT
		public Assignment getMultiplicityValueAssignment_2_1_0() { return cMultiplicityValueAssignment_2_1_0; }
		
		//INT
		public RuleCall getMultiplicityValueINTTerminalRuleCall_2_1_0_0() { return cMultiplicityValueINTTerminalRuleCall_2_1_0_0; }
		
		//cardinalityElement=[CardinalityElement]
		public Assignment getCardinalityElementAssignment_2_1_1() { return cCardinalityElementAssignment_2_1_1; }
		
		//[CardinalityElement]
		public CrossReference getCardinalityElementCardinalityElementCrossReference_2_1_1_0() { return cCardinalityElementCardinalityElementCrossReference_2_1_1_0; }
		
		//ID
		public RuleCall getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1() { return cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1; }
		
		//']'
		public Keyword getRightSquareBracketKeyword_2_2() { return cRightSquareBracketKeyword_2_2; }
		
		//'('
		public Keyword getLeftParenthesisKeyword_3() { return cLeftParenthesisKeyword_3; }
		
		//(content+=PatternPort (',' content+=PatternPort)*)?
		public Group getGroup_4() { return cGroup_4; }
		
		//content+=PatternPort
		public Assignment getContentAssignment_4_0() { return cContentAssignment_4_0; }
		
		//PatternPort
		public RuleCall getContentPatternPortParserRuleCall_4_0_0() { return cContentPatternPortParserRuleCall_4_0_0; }
		
		//(',' content+=PatternPort)*
		public Group getGroup_4_1() { return cGroup_4_1; }
		
		//','
		public Keyword getCommaKeyword_4_1_0() { return cCommaKeyword_4_1_0; }
		
		//content+=PatternPort
		public Assignment getContentAssignment_4_1_1() { return cContentAssignment_4_1_1; }
		
		//PatternPort
		public RuleCall getContentPatternPortParserRuleCall_4_1_1_0() { return cContentPatternPortParserRuleCall_4_1_1_0; }
		
		//')'
		public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; }
		
		//('{' (content+=PatternComponent | content+=PatternLink)* '}')?
		public Group getGroup_6() { return cGroup_6; }
		
		//'{'
		public Keyword getLeftCurlyBracketKeyword_6_0() { return cLeftCurlyBracketKeyword_6_0; }
		
		//(content+=PatternComponent | content+=PatternLink)*
		public Alternatives getAlternatives_6_1() { return cAlternatives_6_1; }
		
		//content+=PatternComponent
		public Assignment getContentAssignment_6_1_0() { return cContentAssignment_6_1_0; }
		
		//PatternComponent
		public RuleCall getContentPatternComponentParserRuleCall_6_1_0_0() { return cContentPatternComponentParserRuleCall_6_1_0_0; }
		
		//content+=PatternLink
		public Assignment getContentAssignment_6_1_1() { return cContentAssignment_6_1_1; }
		
		//PatternLink
		public RuleCall getContentPatternLinkParserRuleCall_6_1_1_0() { return cContentPatternLinkParserRuleCall_6_1_1_0; }
		
		//'}'
		public Keyword getRightCurlyBracketKeyword_6_2() { return cRightCurlyBracketKeyword_6_2; }
	}
	public class PatternPortElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternPort");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Assignment cDirAssignment_0 = (Assignment)cGroup.eContents().get(0);
		private final RuleCall cDirPatternPortDirectionEnumRuleCall_0_0 = (RuleCall)cDirAssignment_0.eContents().get(0);
		private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
		private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
		private final Keyword cLeftSquareBracketKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
		private final Alternatives cAlternatives_2_1 = (Alternatives)cGroup_2.eContents().get(1);
		private final Assignment cMultiplicityValueAssignment_2_1_0 = (Assignment)cAlternatives_2_1.eContents().get(0);
		private final RuleCall cMultiplicityValueINTTerminalRuleCall_2_1_0_0 = (RuleCall)cMultiplicityValueAssignment_2_1_0.eContents().get(0);
		private final Assignment cCardinalityElementAssignment_2_1_1 = (Assignment)cAlternatives_2_1.eContents().get(1);
		private final CrossReference cCardinalityElementCardinalityElementCrossReference_2_1_1_0 = (CrossReference)cCardinalityElementAssignment_2_1_1.eContents().get(0);
		private final RuleCall cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1 = (RuleCall)cCardinalityElementCardinalityElementCrossReference_2_1_1_0.eContents().get(1);
		private final Keyword cRightSquareBracketKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
		
		//PatternPort:
		//	dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?;
		@Override public ParserRule getRule() { return rule; }
		
		//dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
		public Group getGroup() { return cGroup; }
		
		//dir=PatternPortDirection
		public Assignment getDirAssignment_0() { return cDirAssignment_0; }
		
		//PatternPortDirection
		public RuleCall getDirPatternPortDirectionEnumRuleCall_0_0() { return cDirPatternPortDirectionEnumRuleCall_0_0; }
		
		//name=ID
		public Assignment getNameAssignment_1() { return cNameAssignment_1; }
		
		//ID
		public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
		
		//('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?
		public Group getGroup_2() { return cGroup_2; }
		
		//'['
		public Keyword getLeftSquareBracketKeyword_2_0() { return cLeftSquareBracketKeyword_2_0; }
		
		//multiplicityValue=INT | cardinalityElement=[CardinalityElement]
		public Alternatives getAlternatives_2_1() { return cAlternatives_2_1; }
		
		//multiplicityValue=INT
		public Assignment getMultiplicityValueAssignment_2_1_0() { return cMultiplicityValueAssignment_2_1_0; }
		
		//INT
		public RuleCall getMultiplicityValueINTTerminalRuleCall_2_1_0_0() { return cMultiplicityValueINTTerminalRuleCall_2_1_0_0; }
		
		//cardinalityElement=[CardinalityElement]
		public Assignment getCardinalityElementAssignment_2_1_1() { return cCardinalityElementAssignment_2_1_1; }
		
		//[CardinalityElement]
		public CrossReference getCardinalityElementCardinalityElementCrossReference_2_1_1_0() { return cCardinalityElementCardinalityElementCrossReference_2_1_1_0; }
		
		//ID
		public RuleCall getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1() { return cCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1; }
		
		//']'
		public Keyword getRightSquareBracketKeyword_2_2() { return cRightSquareBracketKeyword_2_2; }
	}
	public class CardinalityElementElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.CardinalityElement");
		private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
		private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
		
		//CardinalityElement:
		//	name=ID;
		@Override public ParserRule getRule() { return rule; }
		
		//name=ID
		public Assignment getNameAssignment() { return cNameAssignment; }
		
		//ID
		public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; }
	}
	public class PatternLinkElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternLink");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Assignment cSrcAssignment_0 = (Assignment)cGroup.eContents().get(0);
		private final CrossReference cSrcPatternPortCrossReference_0_0 = (CrossReference)cSrcAssignment_0.eContents().get(0);
		private final RuleCall cSrcPatternPortQualifiedIDParserRuleCall_0_0_1 = (RuleCall)cSrcPatternPortCrossReference_0_0.eContents().get(1);
		private final Keyword cHyphenMinusHyphenMinusLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
		private final Assignment cLinkTypeAssignment_2 = (Assignment)cGroup.eContents().get(2);
		private final RuleCall cLinkTypeLinkTypeEnumRuleCall_2_0 = (RuleCall)cLinkTypeAssignment_2.eContents().get(0);
		private final Keyword cRightCurlyBracketHyphenMinusGreaterThanSignKeyword_3 = (Keyword)cGroup.eContents().get(3);
		private final Assignment cDstAssignment_4 = (Assignment)cGroup.eContents().get(4);
		private final CrossReference cDstPatternPortCrossReference_4_0 = (CrossReference)cDstAssignment_4.eContents().get(0);
		private final RuleCall cDstPatternPortQualifiedIDParserRuleCall_4_0_1 = (RuleCall)cDstPatternPortCrossReference_4_0.eContents().get(1);
		
		//PatternLink:
		//	src=[PatternPort|QualifiedID] '--{' linkType=LinkType '}->' dst=[PatternPort|QualifiedID];
		@Override public ParserRule getRule() { return rule; }
		
		//src=[PatternPort|QualifiedID] '--{' linkType=LinkType '}->' dst=[PatternPort|QualifiedID]
		public Group getGroup() { return cGroup; }
		
		//src=[PatternPort|QualifiedID]
		public Assignment getSrcAssignment_0() { return cSrcAssignment_0; }
		
		//[PatternPort|QualifiedID]
		public CrossReference getSrcPatternPortCrossReference_0_0() { return cSrcPatternPortCrossReference_0_0; }
		
		//QualifiedID
		public RuleCall getSrcPatternPortQualifiedIDParserRuleCall_0_0_1() { return cSrcPatternPortQualifiedIDParserRuleCall_0_0_1; }
		
		//'--{'
		public Keyword getHyphenMinusHyphenMinusLeftCurlyBracketKeyword_1() { return cHyphenMinusHyphenMinusLeftCurlyBracketKeyword_1; }
		
		//linkType=LinkType
		public Assignment getLinkTypeAssignment_2() { return cLinkTypeAssignment_2; }
		
		//LinkType
		public RuleCall getLinkTypeLinkTypeEnumRuleCall_2_0() { return cLinkTypeLinkTypeEnumRuleCall_2_0; }
		
		//'}->'
		public Keyword getRightCurlyBracketHyphenMinusGreaterThanSignKeyword_3() { return cRightCurlyBracketHyphenMinusGreaterThanSignKeyword_3; }
		
		//dst=[PatternPort|QualifiedID]
		public Assignment getDstAssignment_4() { return cDstAssignment_4; }
		
		//[PatternPort|QualifiedID]
		public CrossReference getDstPatternPortCrossReference_4_0() { return cDstPatternPortCrossReference_4_0; }
		
		//QualifiedID
		public RuleCall getDstPatternPortQualifiedIDParserRuleCall_4_0_1() { return cDstPatternPortQualifiedIDParserRuleCall_4_0_1; }
	}
	public class QualifiedIDElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.QualifiedID");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
		private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
		private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
		private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
		
		//QualifiedID:
		//	ID ('.' ID)*;
		@Override public ParserRule getRule() { return rule; }
		
		//ID ('.' ID)*
		public Group getGroup() { return cGroup; }
		
		//ID
		public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
		
		//('.' ID)*
		public Group getGroup_1() { return cGroup_1; }
		
		//'.'
		public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
		
		//ID
		public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
	}
	
	public class PatternPortDirectionElements extends AbstractEnumRuleElementFinder {
		private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PatternPortDirection");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final EnumLiteralDeclaration cUNSPECIFIEDEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
		private final Keyword cUNSPECIFIEDUnspecKeyword_0_0 = (Keyword)cUNSPECIFIEDEnumLiteralDeclaration_0.eContents().get(0);
		private final EnumLiteralDeclaration cINEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
		private final Keyword cINInKeyword_1_0 = (Keyword)cINEnumLiteralDeclaration_1.eContents().get(0);
		private final EnumLiteralDeclaration cOUTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
		private final Keyword cOUTOutKeyword_2_0 = (Keyword)cOUTEnumLiteralDeclaration_2.eContents().get(0);
		private final EnumLiteralDeclaration cINOUTEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
		private final Keyword cINOUTInoutKeyword_3_0 = (Keyword)cINOUTEnumLiteralDeclaration_3.eContents().get(0);
		
		//enum PatternPortDirection:
		//	UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
		public EnumRule getRule() { return rule; }
		
		//UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout'
		public Alternatives getAlternatives() { return cAlternatives; }
		
		//UNSPECIFIED='unspec'
		public EnumLiteralDeclaration getUNSPECIFIEDEnumLiteralDeclaration_0() { return cUNSPECIFIEDEnumLiteralDeclaration_0; }
		
		//'unspec'
		public Keyword getUNSPECIFIEDUnspecKeyword_0_0() { return cUNSPECIFIEDUnspecKeyword_0_0; }
		
		//IN='in'
		public EnumLiteralDeclaration getINEnumLiteralDeclaration_1() { return cINEnumLiteralDeclaration_1; }
		
		//'in'
		public Keyword getINInKeyword_1_0() { return cINInKeyword_1_0; }
		
		//OUT='out'
		public EnumLiteralDeclaration getOUTEnumLiteralDeclaration_2() { return cOUTEnumLiteralDeclaration_2; }
		
		//'out'
		public Keyword getOUTOutKeyword_2_0() { return cOUTOutKeyword_2_0; }
		
		//INOUT='inout'
		public EnumLiteralDeclaration getINOUTEnumLiteralDeclaration_3() { return cINOUTEnumLiteralDeclaration_3; }
		
		//'inout'
		public Keyword getINOUTInoutKeyword_3_0() { return cINOUTInoutKeyword_3_0; }
	}
	public class LinkTypeElements extends AbstractEnumRuleElementFinder {
		private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.LinkType");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final EnumLiteralDeclaration cTRANSPOSEEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
		private final Keyword cTRANSPOSETransposeKeyword_0_0 = (Keyword)cTRANSPOSEEnumLiteralDeclaration_0.eContents().get(0);
		private final EnumLiteralDeclaration cIDENTITYEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
		private final Keyword cIDENTITYIdentityKeyword_1_0 = (Keyword)cIDENTITYEnumLiteralDeclaration_1.eContents().get(0);
		private final EnumLiteralDeclaration cFIRSTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
		private final Keyword cFIRSTFirstKeyword_2_0 = (Keyword)cFIRSTEnumLiteralDeclaration_2.eContents().get(0);
		private final EnumLiteralDeclaration cROTATEEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
		private final Keyword cROTATERotateKeyword_3_0 = (Keyword)cROTATEEnumLiteralDeclaration_3.eContents().get(0);
		private final EnumLiteralDeclaration cSHIFTCEnumLiteralDeclaration_4 = (EnumLiteralDeclaration)cAlternatives.eContents().get(4);
		private final Keyword cSHIFTCShiftCKeyword_4_0 = (Keyword)cSHIFTCEnumLiteralDeclaration_4.eContents().get(0);
		private final EnumLiteralDeclaration cSHIFTPEnumLiteralDeclaration_5 = (EnumLiteralDeclaration)cAlternatives.eContents().get(5);
		private final Keyword cSHIFTPShiftPKeyword_5_0 = (Keyword)cSHIFTPEnumLiteralDeclaration_5.eContents().get(0);
		private final EnumLiteralDeclaration cFLATTENCEnumLiteralDeclaration_6 = (EnumLiteralDeclaration)cAlternatives.eContents().get(6);
		private final Keyword cFLATTENCFlattenCKeyword_6_0 = (Keyword)cFLATTENCEnumLiteralDeclaration_6.eContents().get(0);
		private final EnumLiteralDeclaration cFORKCEnumLiteralDeclaration_7 = (EnumLiteralDeclaration)cAlternatives.eContents().get(7);
		private final Keyword cFORKCForkCKeyword_7_0 = (Keyword)cFORKCEnumLiteralDeclaration_7.eContents().get(0);
		private final EnumLiteralDeclaration cFORKPEnumLiteralDeclaration_8 = (EnumLiteralDeclaration)cAlternatives.eContents().get(8);
		private final Keyword cFORKPForkPKeyword_8_0 = (Keyword)cFORKPEnumLiteralDeclaration_8.eContents().get(0);
		private final EnumLiteralDeclaration cJOINCEnumLiteralDeclaration_9 = (EnumLiteralDeclaration)cAlternatives.eContents().get(9);
		private final Keyword cJOINCJoinCKeyword_9_0 = (Keyword)cJOINCEnumLiteralDeclaration_9.eContents().get(0);
		private final EnumLiteralDeclaration cJOINPEnumLiteralDeclaration_10 = (EnumLiteralDeclaration)cAlternatives.eContents().get(10);
		private final Keyword cJOINPJoinPKeyword_10_0 = (Keyword)cJOINPEnumLiteralDeclaration_10.eContents().get(0);
		private final EnumLiteralDeclaration cLASTEnumLiteralDeclaration_11 = (EnumLiteralDeclaration)cAlternatives.eContents().get(11);
		private final Keyword cLASTLastKeyword_11_0 = (Keyword)cLASTEnumLiteralDeclaration_11.eContents().get(0);
		
		//enum LinkType:
		//	TRANSPOSE='Transpose' | IDENTITY='Identity' | FIRST='First' | ROTATE='Rotate'
		//	| SHIFTC='ShiftC' | SHIFTP='ShiftP' | FLATTENC='FlattenC' | FORKC='ForkC' | FORKP='ForkP'
		//	| JOINC='JoinC' | JOINP='JoinP' | LAST='Last';
		public EnumRule getRule() { return rule; }
		
		//TRANSPOSE='Transpose' | IDENTITY='Identity' | FIRST='First' | ROTATE='Rotate' | SHIFTC='ShiftC' | SHIFTP='ShiftP' |
		//FLATTENC='FlattenC' | FORKC='ForkC' | FORKP='ForkP' | JOINC='JoinC' | JOINP='JoinP' | LAST='Last'
		public Alternatives getAlternatives() { return cAlternatives; }
		
		//TRANSPOSE='Transpose'
		public EnumLiteralDeclaration getTRANSPOSEEnumLiteralDeclaration_0() { return cTRANSPOSEEnumLiteralDeclaration_0; }
		
		//'Transpose'
		public Keyword getTRANSPOSETransposeKeyword_0_0() { return cTRANSPOSETransposeKeyword_0_0; }
		
		//IDENTITY='Identity'
		public EnumLiteralDeclaration getIDENTITYEnumLiteralDeclaration_1() { return cIDENTITYEnumLiteralDeclaration_1; }
		
		//'Identity'
		public Keyword getIDENTITYIdentityKeyword_1_0() { return cIDENTITYIdentityKeyword_1_0; }
		
		//FIRST='First'
		public EnumLiteralDeclaration getFIRSTEnumLiteralDeclaration_2() { return cFIRSTEnumLiteralDeclaration_2; }
		
		//'First'
		public Keyword getFIRSTFirstKeyword_2_0() { return cFIRSTFirstKeyword_2_0; }
		
		//ROTATE='Rotate'
		public EnumLiteralDeclaration getROTATEEnumLiteralDeclaration_3() { return cROTATEEnumLiteralDeclaration_3; }
		
		//'Rotate'
		public Keyword getROTATERotateKeyword_3_0() { return cROTATERotateKeyword_3_0; }
		
		//SHIFTC='ShiftC'
		public EnumLiteralDeclaration getSHIFTCEnumLiteralDeclaration_4() { return cSHIFTCEnumLiteralDeclaration_4; }
		
		//'ShiftC'
		public Keyword getSHIFTCShiftCKeyword_4_0() { return cSHIFTCShiftCKeyword_4_0; }
		
		//SHIFTP='ShiftP'
		public EnumLiteralDeclaration getSHIFTPEnumLiteralDeclaration_5() { return cSHIFTPEnumLiteralDeclaration_5; }
		
		//'ShiftP'
		public Keyword getSHIFTPShiftPKeyword_5_0() { return cSHIFTPShiftPKeyword_5_0; }
		
		//FLATTENC='FlattenC'
		public EnumLiteralDeclaration getFLATTENCEnumLiteralDeclaration_6() { return cFLATTENCEnumLiteralDeclaration_6; }
		
		//'FlattenC'
		public Keyword getFLATTENCFlattenCKeyword_6_0() { return cFLATTENCFlattenCKeyword_6_0; }
		
		//FORKC='ForkC'
		public EnumLiteralDeclaration getFORKCEnumLiteralDeclaration_7() { return cFORKCEnumLiteralDeclaration_7; }
		
		//'ForkC'
		public Keyword getFORKCForkCKeyword_7_0() { return cFORKCForkCKeyword_7_0; }
		
		//FORKP='ForkP'
		public EnumLiteralDeclaration getFORKPEnumLiteralDeclaration_8() { return cFORKPEnumLiteralDeclaration_8; }
		
		//'ForkP'
		public Keyword getFORKPForkPKeyword_8_0() { return cFORKPForkPKeyword_8_0; }
		
		//JOINC='JoinC'
		public EnumLiteralDeclaration getJOINCEnumLiteralDeclaration_9() { return cJOINCEnumLiteralDeclaration_9; }
		
		//'JoinC'
		public Keyword getJOINCJoinCKeyword_9_0() { return cJOINCJoinCKeyword_9_0; }
		
		//JOINP='JoinP'
		public EnumLiteralDeclaration getJOINPEnumLiteralDeclaration_10() { return cJOINPEnumLiteralDeclaration_10; }
		
		//'JoinP'
		public Keyword getJOINPJoinPKeyword_10_0() { return cJOINPJoinPKeyword_10_0; }
		
		//LAST='Last'
		public EnumLiteralDeclaration getLASTEnumLiteralDeclaration_11() { return cLASTEnumLiteralDeclaration_11; }
		
		//'Last'
		public Keyword getLASTLastKeyword_11_0() { return cLASTLastKeyword_11_0; }
	}
	public class PortDirectionElements extends AbstractEnumRuleElementFinder {
		private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "com.irtsaintexupery.xtext.pseim.Pattern.PortDirection");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final EnumLiteralDeclaration cUNSPECIFIEDEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
		private final Keyword cUNSPECIFIEDUnspecKeyword_0_0 = (Keyword)cUNSPECIFIEDEnumLiteralDeclaration_0.eContents().get(0);
		private final EnumLiteralDeclaration cINEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
		private final Keyword cINInKeyword_1_0 = (Keyword)cINEnumLiteralDeclaration_1.eContents().get(0);
		private final EnumLiteralDeclaration cOUTEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
		private final Keyword cOUTOutKeyword_2_0 = (Keyword)cOUTEnumLiteralDeclaration_2.eContents().get(0);
		private final EnumLiteralDeclaration cINOUTEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
		private final Keyword cINOUTInoutKeyword_3_0 = (Keyword)cINOUTEnumLiteralDeclaration_3.eContents().get(0);
		
		//enum PortDirection returns seim::PortDirection:
		//	UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
		public EnumRule getRule() { return rule; }
		
		//UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout'
		public Alternatives getAlternatives() { return cAlternatives; }
		
		//UNSPECIFIED='unspec'
		public EnumLiteralDeclaration getUNSPECIFIEDEnumLiteralDeclaration_0() { return cUNSPECIFIEDEnumLiteralDeclaration_0; }
		
		//'unspec'
		public Keyword getUNSPECIFIEDUnspecKeyword_0_0() { return cUNSPECIFIEDUnspecKeyword_0_0; }
		
		//IN='in'
		public EnumLiteralDeclaration getINEnumLiteralDeclaration_1() { return cINEnumLiteralDeclaration_1; }
		
		//'in'
		public Keyword getINInKeyword_1_0() { return cINInKeyword_1_0; }
		
		//OUT='out'
		public EnumLiteralDeclaration getOUTEnumLiteralDeclaration_2() { return cOUTEnumLiteralDeclaration_2; }
		
		//'out'
		public Keyword getOUTOutKeyword_2_0() { return cOUTOutKeyword_2_0; }
		
		//INOUT='inout'
		public EnumLiteralDeclaration getINOUTEnumLiteralDeclaration_3() { return cINOUTEnumLiteralDeclaration_3; }
		
		//'inout'
		public Keyword getINOUTInoutKeyword_3_0() { return cINOUTInoutKeyword_3_0; }
	}
	
	private final PatternElements pPattern;
	private final PatternComponentElements pPatternComponent;
	private final PatternPortElements pPatternPort;
	private final PatternPortDirectionElements ePatternPortDirection;
	private final CardinalityElementElements pCardinalityElement;
	private final PatternLinkElements pPatternLink;
	private final LinkTypeElements eLinkType;
	private final PortDirectionElements ePortDirection;
	private final QualifiedIDElements pQualifiedID;
	
	private final Grammar grammar;
	
	private final TerminalsGrammarAccess gaTerminals;

	@Inject
	public PatternGrammarAccess(GrammarProvider grammarProvider,
			TerminalsGrammarAccess gaTerminals) {
		this.grammar = internalFindGrammar(grammarProvider);
		this.gaTerminals = gaTerminals;
		this.pPattern = new PatternElements();
		this.pPatternComponent = new PatternComponentElements();
		this.pPatternPort = new PatternPortElements();
		this.ePatternPortDirection = new PatternPortDirectionElements();
		this.pCardinalityElement = new CardinalityElementElements();
		this.pPatternLink = new PatternLinkElements();
		this.eLinkType = new LinkTypeElements();
		this.ePortDirection = new PortDirectionElements();
		this.pQualifiedID = new QualifiedIDElements();
	}
	
	protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
		Grammar grammar = grammarProvider.getGrammar(this);
		while (grammar != null) {
			if ("com.irtsaintexupery.xtext.pseim.Pattern".equals(grammar.getName())) {
				return grammar;
			}
			List<Grammar> grammars = grammar.getUsedGrammars();
			if (!grammars.isEmpty()) {
				grammar = grammars.iterator().next();
			} else {
				return null;
			}
		}
		return grammar;
	}
	
	@Override
	public Grammar getGrammar() {
		return grammar;
	}
	
	
	public TerminalsGrammarAccess getTerminalsGrammarAccess() {
		return gaTerminals;
	}

	
	//Pattern:
	//	'pattern' name=ID '(' (cardinalityElements+=CardinalityElement (',' cardinalityElements+=CardinalityElement)*)? ')'
	//	('{' (modelElements+=PatternComponent | modelElements+=PatternLink)*
	//	'}')?;
	public PatternElements getPatternAccess() {
		return pPattern;
	}
	
	public ParserRule getPatternRule() {
		return getPatternAccess().getRule();
	}
	
	//PatternComponent:
	//	'component' name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')? '('
	//	(content+=PatternPort (',' content+=PatternPort)*)? ')' ('{' (content+=PatternComponent | content+=PatternLink)*
	//	'}')?;
	public PatternComponentElements getPatternComponentAccess() {
		return pPatternComponent;
	}
	
	public ParserRule getPatternComponentRule() {
		return getPatternComponentAccess().getRule();
	}
	
	//PatternPort:
	//	dir=PatternPortDirection name=ID ('[' (multiplicityValue=INT | cardinalityElement=[CardinalityElement]) ']')?;
	public PatternPortElements getPatternPortAccess() {
		return pPatternPort;
	}
	
	public ParserRule getPatternPortRule() {
		return getPatternPortAccess().getRule();
	}
	
	//enum PatternPortDirection:
	//	UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
	public PatternPortDirectionElements getPatternPortDirectionAccess() {
		return ePatternPortDirection;
	}
	
	public EnumRule getPatternPortDirectionRule() {
		return getPatternPortDirectionAccess().getRule();
	}
	
	//CardinalityElement:
	//	name=ID;
	public CardinalityElementElements getCardinalityElementAccess() {
		return pCardinalityElement;
	}
	
	public ParserRule getCardinalityElementRule() {
		return getCardinalityElementAccess().getRule();
	}
	
	//PatternLink:
	//	src=[PatternPort|QualifiedID] '--{' linkType=LinkType '}->' dst=[PatternPort|QualifiedID];
	public PatternLinkElements getPatternLinkAccess() {
		return pPatternLink;
	}
	
	public ParserRule getPatternLinkRule() {
		return getPatternLinkAccess().getRule();
	}
	
	//enum LinkType:
	//	TRANSPOSE='Transpose' | IDENTITY='Identity' | FIRST='First' | ROTATE='Rotate'
	//	| SHIFTC='ShiftC' | SHIFTP='ShiftP' | FLATTENC='FlattenC' | FORKC='ForkC' | FORKP='ForkP'
	//	| JOINC='JoinC' | JOINP='JoinP' | LAST='Last';
	public LinkTypeElements getLinkTypeAccess() {
		return eLinkType;
	}
	
	public EnumRule getLinkTypeRule() {
		return getLinkTypeAccess().getRule();
	}
	
	//enum PortDirection returns seim::PortDirection:
	//	UNSPECIFIED='unspec' | IN='in' | OUT='out' | INOUT='inout';
	public PortDirectionElements getPortDirectionAccess() {
		return ePortDirection;
	}
	
	public EnumRule getPortDirectionRule() {
		return getPortDirectionAccess().getRule();
	}
	
	//QualifiedID:
	//	ID ('.' ID)*;
	public QualifiedIDElements getQualifiedIDAccess() {
		return pQualifiedID;
	}
	
	public ParserRule getQualifiedIDRule() {
		return getQualifiedIDAccess().getRule();
	}
	
	//terminal ID:
	//	'^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
	public TerminalRule getIDRule() {
		return gaTerminals.getIDRule();
	}
	
	//terminal INT returns ecore::EInt:
	//	'0'..'9'+;
	public TerminalRule getINTRule() {
		return gaTerminals.getINTRule();
	}
	
	//terminal STRING:
	//	'"' ('\\' . | !('\\' | '"'))* '"' | "'" ('\\' . | !('\\' | "'"))* "'";
	public TerminalRule getSTRINGRule() {
		return gaTerminals.getSTRINGRule();
	}
	
	//terminal ML_COMMENT:
	//	'/*'->'*/';
	public TerminalRule getML_COMMENTRule() {
		return gaTerminals.getML_COMMENTRule();
	}
	
	//terminal SL_COMMENT:
	//	'//' !('\n' | '\r')* ('\r'? '\n')?;
	public TerminalRule getSL_COMMENTRule() {
		return gaTerminals.getSL_COMMENTRule();
	}
	
	//terminal WS:
	//	' ' | '\t' | '\r' | '\n'+;
	public TerminalRule getWSRule() {
		return gaTerminals.getWSRule();
	}
	
	//terminal ANY_OTHER:
	//	.;
	public TerminalRule getANY_OTHERRule() {
		return gaTerminals.getANY_OTHERRule();
	}
}
