/*
 * generated by Xtext 2.12.0
 */
grammar InternalPattern;

options {
	superClass=AbstractInternalContentAssistParser;
}

@lexer::header {
package com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal;

// Hack: Use our own Lexer superclass by means of import. 
// Currently there is no other way to specify the superclass for the lexer.
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
}

@parser::header {
package com.irtsaintexupery.xtext.pseim.ide.contentassist.antlr.internal;

import java.io.InputStream;
import org.eclipse.xtext.*;
import org.eclipse.xtext.parser.*;
import org.eclipse.xtext.parser.impl.*;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.DFA;
import com.irtsaintexupery.xtext.pseim.services.PatternGrammarAccess;

}
@parser::members {
	private PatternGrammarAccess grammarAccess;

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

	@Override
	protected Grammar getGrammar() {
		return grammarAccess.getGrammar();
	}

	@Override
	protected String getValueForTokenName(String tokenName) {
		return tokenName;
	}
}

// Entry rule entryRulePattern
entryRulePattern
:
{ before(grammarAccess.getPatternRule()); }
	 rulePattern
{ after(grammarAccess.getPatternRule()); } 
	 EOF 
;

// Rule Pattern
rulePattern 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getPatternAccess().getGroup()); }
		(rule__Pattern__Group__0)
		{ after(grammarAccess.getPatternAccess().getGroup()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Entry rule entryRulePatternComponent
entryRulePatternComponent
:
{ before(grammarAccess.getPatternComponentRule()); }
	 rulePatternComponent
{ after(grammarAccess.getPatternComponentRule()); } 
	 EOF 
;

// Rule PatternComponent
rulePatternComponent 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getPatternComponentAccess().getGroup()); }
		(rule__PatternComponent__Group__0)
		{ after(grammarAccess.getPatternComponentAccess().getGroup()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Entry rule entryRulePatternPort
entryRulePatternPort
:
{ before(grammarAccess.getPatternPortRule()); }
	 rulePatternPort
{ after(grammarAccess.getPatternPortRule()); } 
	 EOF 
;

// Rule PatternPort
rulePatternPort 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getPatternPortAccess().getGroup()); }
		(rule__PatternPort__Group__0)
		{ after(grammarAccess.getPatternPortAccess().getGroup()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Entry rule entryRuleCardinalityElement
entryRuleCardinalityElement
:
{ before(grammarAccess.getCardinalityElementRule()); }
	 ruleCardinalityElement
{ after(grammarAccess.getCardinalityElementRule()); } 
	 EOF 
;

// Rule CardinalityElement
ruleCardinalityElement 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getCardinalityElementAccess().getNameAssignment()); }
		(rule__CardinalityElement__NameAssignment)
		{ after(grammarAccess.getCardinalityElementAccess().getNameAssignment()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Entry rule entryRulePatternLink
entryRulePatternLink
:
{ before(grammarAccess.getPatternLinkRule()); }
	 rulePatternLink
{ after(grammarAccess.getPatternLinkRule()); } 
	 EOF 
;

// Rule PatternLink
rulePatternLink 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getPatternLinkAccess().getGroup()); }
		(rule__PatternLink__Group__0)
		{ after(grammarAccess.getPatternLinkAccess().getGroup()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Entry rule entryRuleQualifiedID
entryRuleQualifiedID
:
{ before(grammarAccess.getQualifiedIDRule()); }
	 ruleQualifiedID
{ after(grammarAccess.getQualifiedIDRule()); } 
	 EOF 
;

// Rule QualifiedID
ruleQualifiedID 
	@init {
		int stackSize = keepStackSize();
	}
	:
	(
		{ before(grammarAccess.getQualifiedIDAccess().getGroup()); }
		(rule__QualifiedID__Group__0)
		{ after(grammarAccess.getQualifiedIDAccess().getGroup()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Rule PatternPortDirection
rulePatternPortDirection
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortDirectionAccess().getAlternatives()); }
		(rule__PatternPortDirection__Alternatives)
		{ after(grammarAccess.getPatternPortDirectionAccess().getAlternatives()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

// Rule LinkType
ruleLinkType
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getLinkTypeAccess().getAlternatives()); }
		(rule__LinkType__Alternatives)
		{ after(grammarAccess.getLinkTypeAccess().getAlternatives()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Alternatives_5_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getModelElementsAssignment_5_1_0()); }
		(rule__Pattern__ModelElementsAssignment_5_1_0)
		{ after(grammarAccess.getPatternAccess().getModelElementsAssignment_5_1_0()); }
	)
	|
	(
		{ before(grammarAccess.getPatternAccess().getModelElementsAssignment_5_1_1()); }
		(rule__Pattern__ModelElementsAssignment_5_1_1)
		{ after(grammarAccess.getPatternAccess().getModelElementsAssignment_5_1_1()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Alternatives_2_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getMultiplicityValueAssignment_2_1_0()); }
		(rule__PatternComponent__MultiplicityValueAssignment_2_1_0)
		{ after(grammarAccess.getPatternComponentAccess().getMultiplicityValueAssignment_2_1_0()); }
	)
	|
	(
		{ before(grammarAccess.getPatternComponentAccess().getCardinalityElementAssignment_2_1_1()); }
		(rule__PatternComponent__CardinalityElementAssignment_2_1_1)
		{ after(grammarAccess.getPatternComponentAccess().getCardinalityElementAssignment_2_1_1()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Alternatives_6_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentAssignment_6_1_0()); }
		(rule__PatternComponent__ContentAssignment_6_1_0)
		{ after(grammarAccess.getPatternComponentAccess().getContentAssignment_6_1_0()); }
	)
	|
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentAssignment_6_1_1()); }
		(rule__PatternComponent__ContentAssignment_6_1_1)
		{ after(grammarAccess.getPatternComponentAccess().getContentAssignment_6_1_1()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Alternatives_2_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortAccess().getMultiplicityValueAssignment_2_1_0()); }
		(rule__PatternPort__MultiplicityValueAssignment_2_1_0)
		{ after(grammarAccess.getPatternPortAccess().getMultiplicityValueAssignment_2_1_0()); }
	)
	|
	(
		{ before(grammarAccess.getPatternPortAccess().getCardinalityElementAssignment_2_1_1()); }
		(rule__PatternPort__CardinalityElementAssignment_2_1_1)
		{ after(grammarAccess.getPatternPortAccess().getCardinalityElementAssignment_2_1_1()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPortDirection__Alternatives
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0()); }
		('unspec')
		{ after(grammarAccess.getPatternPortDirectionAccess().getUNSPECIFIEDEnumLiteralDeclaration_0()); }
	)
	|
	(
		{ before(grammarAccess.getPatternPortDirectionAccess().getINEnumLiteralDeclaration_1()); }
		('in')
		{ after(grammarAccess.getPatternPortDirectionAccess().getINEnumLiteralDeclaration_1()); }
	)
	|
	(
		{ before(grammarAccess.getPatternPortDirectionAccess().getOUTEnumLiteralDeclaration_2()); }
		('out')
		{ after(grammarAccess.getPatternPortDirectionAccess().getOUTEnumLiteralDeclaration_2()); }
	)
	|
	(
		{ before(grammarAccess.getPatternPortDirectionAccess().getINOUTEnumLiteralDeclaration_3()); }
		('inout')
		{ after(grammarAccess.getPatternPortDirectionAccess().getINOUTEnumLiteralDeclaration_3()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__LinkType__Alternatives
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getLinkTypeAccess().getTRANSPOSEEnumLiteralDeclaration_0()); }
		('-{Transpose}->')
		{ after(grammarAccess.getLinkTypeAccess().getTRANSPOSEEnumLiteralDeclaration_0()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getIDENTITYEnumLiteralDeclaration_1()); }
		('-{Identity}->')
		{ after(grammarAccess.getLinkTypeAccess().getIDENTITYEnumLiteralDeclaration_1()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getFIRSTEnumLiteralDeclaration_2()); }
		('-{First}->')
		{ after(grammarAccess.getLinkTypeAccess().getFIRSTEnumLiteralDeclaration_2()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getROTATEEnumLiteralDeclaration_3()); }
		('-{Rotate}->')
		{ after(grammarAccess.getLinkTypeAccess().getROTATEEnumLiteralDeclaration_3()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getSHIFTCEnumLiteralDeclaration_4()); }
		('-{ShiftC}->')
		{ after(grammarAccess.getLinkTypeAccess().getSHIFTCEnumLiteralDeclaration_4()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getSHIFTPEnumLiteralDeclaration_5()); }
		('-{ShiftP}->')
		{ after(grammarAccess.getLinkTypeAccess().getSHIFTPEnumLiteralDeclaration_5()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getFLATTENCEnumLiteralDeclaration_6()); }
		('-{FlattenC}->')
		{ after(grammarAccess.getLinkTypeAccess().getFLATTENCEnumLiteralDeclaration_6()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getFORKCEnumLiteralDeclaration_7()); }
		('-{ForkC}->')
		{ after(grammarAccess.getLinkTypeAccess().getFORKCEnumLiteralDeclaration_7()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getFORKPEnumLiteralDeclaration_8()); }
		('-{ForkP}->')
		{ after(grammarAccess.getLinkTypeAccess().getFORKPEnumLiteralDeclaration_8()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getJOINCEnumLiteralDeclaration_9()); }
		('-{JoinC}->')
		{ after(grammarAccess.getLinkTypeAccess().getJOINCEnumLiteralDeclaration_9()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getJOINPEnumLiteralDeclaration_10()); }
		('-{JoinP}->')
		{ after(grammarAccess.getLinkTypeAccess().getJOINPEnumLiteralDeclaration_10()); }
	)
	|
	(
		{ before(grammarAccess.getLinkTypeAccess().getLASTEnumLiteralDeclaration_11()); }
		('-{Last}->')
		{ after(grammarAccess.getLinkTypeAccess().getLASTEnumLiteralDeclaration_11()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__0__Impl
	rule__Pattern__Group__1
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getPatternKeyword_0()); }
	'pattern'
	{ after(grammarAccess.getPatternAccess().getPatternKeyword_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__1__Impl
	rule__Pattern__Group__2
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getNameAssignment_1()); }
	(rule__Pattern__NameAssignment_1)
	{ after(grammarAccess.getPatternAccess().getNameAssignment_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__2__Impl
	rule__Pattern__Group__3
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getLeftParenthesisKeyword_2()); }
	'('
	{ after(grammarAccess.getPatternAccess().getLeftParenthesisKeyword_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__3
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__3__Impl
	rule__Pattern__Group__4
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__3__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getGroup_3()); }
	(rule__Pattern__Group_3__0)?
	{ after(grammarAccess.getPatternAccess().getGroup_3()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__4
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__4__Impl
	rule__Pattern__Group__5
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__4__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getRightParenthesisKeyword_4()); }
	')'
	{ after(grammarAccess.getPatternAccess().getRightParenthesisKeyword_4()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__5
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group__5__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group__5__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getGroup_5()); }
	(rule__Pattern__Group_5__0)?
	{ after(grammarAccess.getPatternAccess().getGroup_5()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__Pattern__Group_3__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_3__0__Impl
	rule__Pattern__Group_3__1
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getCardinalityElementsAssignment_3_0()); }
	(rule__Pattern__CardinalityElementsAssignment_3_0)
	{ after(grammarAccess.getPatternAccess().getCardinalityElementsAssignment_3_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_3__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getGroup_3_1()); }
	(rule__Pattern__Group_3_1__0)*
	{ after(grammarAccess.getPatternAccess().getGroup_3_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__Pattern__Group_3_1__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_3_1__0__Impl
	rule__Pattern__Group_3_1__1
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3_1__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getCommaKeyword_3_1_0()); }
	','
	{ after(grammarAccess.getPatternAccess().getCommaKeyword_3_1_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3_1__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_3_1__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_3_1__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getCardinalityElementsAssignment_3_1_1()); }
	(rule__Pattern__CardinalityElementsAssignment_3_1_1)
	{ after(grammarAccess.getPatternAccess().getCardinalityElementsAssignment_3_1_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__Pattern__Group_5__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_5__0__Impl
	rule__Pattern__Group_5__1
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_5__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getLeftCurlyBracketKeyword_5_0()); }
	'{'
	{ after(grammarAccess.getPatternAccess().getLeftCurlyBracketKeyword_5_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_5__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_5__1__Impl
	rule__Pattern__Group_5__2
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_5__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getAlternatives_5_1()); }
	(rule__Pattern__Alternatives_5_1)*
	{ after(grammarAccess.getPatternAccess().getAlternatives_5_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_5__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__Pattern__Group_5__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__Group_5__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternAccess().getRightCurlyBracketKeyword_5_2()); }
	'}'
	{ after(grammarAccess.getPatternAccess().getRightCurlyBracketKeyword_5_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternComponent__Group__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__0__Impl
	rule__PatternComponent__Group__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getComponentKeyword_0()); }
	'component'
	{ after(grammarAccess.getPatternComponentAccess().getComponentKeyword_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__1__Impl
	rule__PatternComponent__Group__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getNameAssignment_1()); }
	(rule__PatternComponent__NameAssignment_1)
	{ after(grammarAccess.getPatternComponentAccess().getNameAssignment_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__2__Impl
	rule__PatternComponent__Group__3
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getGroup_2()); }
	(rule__PatternComponent__Group_2__0)?
	{ after(grammarAccess.getPatternComponentAccess().getGroup_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__3
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__3__Impl
	rule__PatternComponent__Group__4
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__3__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getLeftParenthesisKeyword_3()); }
	'('
	{ after(grammarAccess.getPatternComponentAccess().getLeftParenthesisKeyword_3()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__4
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__4__Impl
	rule__PatternComponent__Group__5
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__4__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getGroup_4()); }
	(rule__PatternComponent__Group_4__0)?
	{ after(grammarAccess.getPatternComponentAccess().getGroup_4()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__5
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__5__Impl
	rule__PatternComponent__Group__6
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__5__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getRightParenthesisKeyword_5()); }
	')'
	{ after(grammarAccess.getPatternComponentAccess().getRightParenthesisKeyword_5()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__6
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group__6__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group__6__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getGroup_6()); }
	(rule__PatternComponent__Group_6__0)?
	{ after(grammarAccess.getPatternComponentAccess().getGroup_6()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternComponent__Group_2__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_2__0__Impl
	rule__PatternComponent__Group_2__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_2__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getLeftSquareBracketKeyword_2_0()); }
	'['
	{ after(grammarAccess.getPatternComponentAccess().getLeftSquareBracketKeyword_2_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_2__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_2__1__Impl
	rule__PatternComponent__Group_2__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_2__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getAlternatives_2_1()); }
	(rule__PatternComponent__Alternatives_2_1)
	{ after(grammarAccess.getPatternComponentAccess().getAlternatives_2_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_2__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_2__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_2__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getRightSquareBracketKeyword_2_2()); }
	']'
	{ after(grammarAccess.getPatternComponentAccess().getRightSquareBracketKeyword_2_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternComponent__Group_4__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_4__0__Impl
	rule__PatternComponent__Group_4__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getContentAssignment_4_0()); }
	(rule__PatternComponent__ContentAssignment_4_0)
	{ after(grammarAccess.getPatternComponentAccess().getContentAssignment_4_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_4__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getGroup_4_1()); }
	(rule__PatternComponent__Group_4_1__0)*
	{ after(grammarAccess.getPatternComponentAccess().getGroup_4_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternComponent__Group_4_1__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_4_1__0__Impl
	rule__PatternComponent__Group_4_1__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4_1__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getCommaKeyword_4_1_0()); }
	','
	{ after(grammarAccess.getPatternComponentAccess().getCommaKeyword_4_1_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4_1__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_4_1__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_4_1__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getContentAssignment_4_1_1()); }
	(rule__PatternComponent__ContentAssignment_4_1_1)
	{ after(grammarAccess.getPatternComponentAccess().getContentAssignment_4_1_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternComponent__Group_6__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_6__0__Impl
	rule__PatternComponent__Group_6__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_6__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getLeftCurlyBracketKeyword_6_0()); }
	'{'
	{ after(grammarAccess.getPatternComponentAccess().getLeftCurlyBracketKeyword_6_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_6__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_6__1__Impl
	rule__PatternComponent__Group_6__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_6__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getAlternatives_6_1()); }
	(rule__PatternComponent__Alternatives_6_1)*
	{ after(grammarAccess.getPatternComponentAccess().getAlternatives_6_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_6__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternComponent__Group_6__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__Group_6__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternComponentAccess().getRightCurlyBracketKeyword_6_2()); }
	'}'
	{ after(grammarAccess.getPatternComponentAccess().getRightCurlyBracketKeyword_6_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternPort__Group__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group__0__Impl
	rule__PatternPort__Group__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getDirAssignment_0()); }
	(rule__PatternPort__DirAssignment_0)
	{ after(grammarAccess.getPatternPortAccess().getDirAssignment_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group__1__Impl
	rule__PatternPort__Group__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getNameAssignment_1()); }
	(rule__PatternPort__NameAssignment_1)
	{ after(grammarAccess.getPatternPortAccess().getNameAssignment_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getGroup_2()); }
	(rule__PatternPort__Group_2__0)?
	{ after(grammarAccess.getPatternPortAccess().getGroup_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternPort__Group_2__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group_2__0__Impl
	rule__PatternPort__Group_2__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group_2__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getLeftSquareBracketKeyword_2_0()); }
	'['
	{ after(grammarAccess.getPatternPortAccess().getLeftSquareBracketKeyword_2_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group_2__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group_2__1__Impl
	rule__PatternPort__Group_2__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group_2__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getAlternatives_2_1()); }
	(rule__PatternPort__Alternatives_2_1)
	{ after(grammarAccess.getPatternPortAccess().getAlternatives_2_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group_2__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternPort__Group_2__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__Group_2__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternPortAccess().getRightSquareBracketKeyword_2_2()); }
	']'
	{ after(grammarAccess.getPatternPortAccess().getRightSquareBracketKeyword_2_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__PatternLink__Group__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternLink__Group__0__Impl
	rule__PatternLink__Group__1
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__Group__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternLinkAccess().getSrcAssignment_0()); }
	(rule__PatternLink__SrcAssignment_0)
	{ after(grammarAccess.getPatternLinkAccess().getSrcAssignment_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__Group__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternLink__Group__1__Impl
	rule__PatternLink__Group__2
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__Group__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternLinkAccess().getLinkTypeAssignment_1()); }
	(rule__PatternLink__LinkTypeAssignment_1)
	{ after(grammarAccess.getPatternLinkAccess().getLinkTypeAssignment_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__Group__2
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__PatternLink__Group__2__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__Group__2__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getPatternLinkAccess().getDstAssignment_2()); }
	(rule__PatternLink__DstAssignment_2)
	{ after(grammarAccess.getPatternLinkAccess().getDstAssignment_2()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__QualifiedID__Group__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__QualifiedID__Group__0__Impl
	rule__QualifiedID__Group__1
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0()); }
	RULE_ID
	{ after(grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__QualifiedID__Group__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getQualifiedIDAccess().getGroup_1()); }
	(rule__QualifiedID__Group_1__0)*
	{ after(grammarAccess.getQualifiedIDAccess().getGroup_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__QualifiedID__Group_1__0
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__QualifiedID__Group_1__0__Impl
	rule__QualifiedID__Group_1__1
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group_1__0__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getQualifiedIDAccess().getFullStopKeyword_1_0()); }
	'.'
	{ after(grammarAccess.getQualifiedIDAccess().getFullStopKeyword_1_0()); }
)
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group_1__1
	@init {
		int stackSize = keepStackSize();
	}
:
	rule__QualifiedID__Group_1__1__Impl
;
finally {
	restoreStackSize(stackSize);
}

rule__QualifiedID__Group_1__1__Impl
	@init {
		int stackSize = keepStackSize();
	}
:
(
	{ before(grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_1_1()); }
	RULE_ID
	{ after(grammarAccess.getQualifiedIDAccess().getIDTerminalRuleCall_1_1()); }
)
;
finally {
	restoreStackSize(stackSize);
}


rule__Pattern__NameAssignment_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getNameIDTerminalRuleCall_1_0()); }
		RULE_ID
		{ after(grammarAccess.getPatternAccess().getNameIDTerminalRuleCall_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__CardinalityElementsAssignment_3_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_0_0()); }
		ruleCardinalityElement
		{ after(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__CardinalityElementsAssignment_3_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0()); }
		ruleCardinalityElement
		{ after(grammarAccess.getPatternAccess().getCardinalityElementsCardinalityElementParserRuleCall_3_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__ModelElementsAssignment_5_1_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getModelElementsPatternComponentParserRuleCall_5_1_0_0()); }
		rulePatternComponent
		{ after(grammarAccess.getPatternAccess().getModelElementsPatternComponentParserRuleCall_5_1_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__Pattern__ModelElementsAssignment_5_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternAccess().getModelElementsPatternLinkParserRuleCall_5_1_1_0()); }
		rulePatternLink
		{ after(grammarAccess.getPatternAccess().getModelElementsPatternLinkParserRuleCall_5_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__NameAssignment_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getNameIDTerminalRuleCall_1_0()); }
		RULE_ID
		{ after(grammarAccess.getPatternComponentAccess().getNameIDTerminalRuleCall_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__MultiplicityValueAssignment_2_1_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0()); }
		RULE_INT
		{ after(grammarAccess.getPatternComponentAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__CardinalityElementAssignment_2_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0()); }
		(
			{ before(grammarAccess.getPatternComponentAccess().getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1()); }
			RULE_ID
			{ after(grammarAccess.getPatternComponentAccess().getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1()); }
		)
		{ after(grammarAccess.getPatternComponentAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__ContentAssignment_4_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_0_0()); }
		rulePatternPort
		{ after(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__ContentAssignment_4_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_1_1_0()); }
		rulePatternPort
		{ after(grammarAccess.getPatternComponentAccess().getContentPatternPortParserRuleCall_4_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__ContentAssignment_6_1_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentPatternComponentParserRuleCall_6_1_0_0()); }
		rulePatternComponent
		{ after(grammarAccess.getPatternComponentAccess().getContentPatternComponentParserRuleCall_6_1_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternComponent__ContentAssignment_6_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternComponentAccess().getContentPatternLinkParserRuleCall_6_1_1_0()); }
		rulePatternLink
		{ after(grammarAccess.getPatternComponentAccess().getContentPatternLinkParserRuleCall_6_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__DirAssignment_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortAccess().getDirPatternPortDirectionEnumRuleCall_0_0()); }
		rulePatternPortDirection
		{ after(grammarAccess.getPatternPortAccess().getDirPatternPortDirectionEnumRuleCall_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__NameAssignment_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortAccess().getNameIDTerminalRuleCall_1_0()); }
		RULE_ID
		{ after(grammarAccess.getPatternPortAccess().getNameIDTerminalRuleCall_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__MultiplicityValueAssignment_2_1_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0()); }
		RULE_INT
		{ after(grammarAccess.getPatternPortAccess().getMultiplicityValueINTTerminalRuleCall_2_1_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternPort__CardinalityElementAssignment_2_1_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternPortAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0()); }
		(
			{ before(grammarAccess.getPatternPortAccess().getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1()); }
			RULE_ID
			{ after(grammarAccess.getPatternPortAccess().getCardinalityElementCardinalityElementIDTerminalRuleCall_2_1_1_0_1()); }
		)
		{ after(grammarAccess.getPatternPortAccess().getCardinalityElementCardinalityElementCrossReference_2_1_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__CardinalityElement__NameAssignment
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getCardinalityElementAccess().getNameIDTerminalRuleCall_0()); }
		RULE_ID
		{ after(grammarAccess.getCardinalityElementAccess().getNameIDTerminalRuleCall_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__SrcAssignment_0
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternLinkAccess().getSrcPatternPortCrossReference_0_0()); }
		(
			{ before(grammarAccess.getPatternLinkAccess().getSrcPatternPortQualifiedIDParserRuleCall_0_0_1()); }
			ruleQualifiedID
			{ after(grammarAccess.getPatternLinkAccess().getSrcPatternPortQualifiedIDParserRuleCall_0_0_1()); }
		)
		{ after(grammarAccess.getPatternLinkAccess().getSrcPatternPortCrossReference_0_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__LinkTypeAssignment_1
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternLinkAccess().getLinkTypeLinkTypeEnumRuleCall_1_0()); }
		ruleLinkType
		{ after(grammarAccess.getPatternLinkAccess().getLinkTypeLinkTypeEnumRuleCall_1_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

rule__PatternLink__DstAssignment_2
	@init {
		int stackSize = keepStackSize();
	}
:
	(
		{ before(grammarAccess.getPatternLinkAccess().getDstPatternPortCrossReference_2_0()); }
		(
			{ before(grammarAccess.getPatternLinkAccess().getDstPatternPortQualifiedIDParserRuleCall_2_0_1()); }
			ruleQualifiedID
			{ after(grammarAccess.getPatternLinkAccess().getDstPatternPortQualifiedIDParserRuleCall_2_0_1()); }
		)
		{ after(grammarAccess.getPatternLinkAccess().getDstPatternPortCrossReference_2_0()); }
	)
;
finally {
	restoreStackSize(stackSize);
}

RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;

RULE_INT : ('0'..'9')+;

RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');

RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';

RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;

RULE_WS : (' '|'\t'|'\r'|'\n')+;

RULE_ANY_OTHER : .;
