use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalBeeLangTestLanguageParser method entryRuleProvidedCapability.
// $ANTLR end "ruleUnit"
// $ANTLR start "entryRuleProvidedCapability"
// InternalBeeLangTestLanguage.g:550:1: entryRuleProvidedCapability returns [EObject current=null] : iv_ruleProvidedCapability= ruleProvidedCapability EOF ;
public final EObject entryRuleProvidedCapability() throws RecognitionException {
EObject current = null;
int entryRuleProvidedCapability_StartIndex = input.index();
EObject iv_ruleProvidedCapability = null;
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 5)) {
return current;
}
// InternalBeeLangTestLanguage.g:554:2: (iv_ruleProvidedCapability= ruleProvidedCapability EOF )
// InternalBeeLangTestLanguage.g:555:2: iv_ruleProvidedCapability= ruleProvidedCapability EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getProvidedCapabilityRule());
}
pushFollow(FOLLOW_1);
iv_ruleProvidedCapability = ruleProvidedCapability();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleProvidedCapability;
}
match(input, EOF, FOLLOW_2);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 5, entryRuleProvidedCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalBeeLangTestLanguageParser method ruleProvidedCapability.
// $ANTLR end "entryRuleProvidedCapability"
// $ANTLR start "ruleProvidedCapability"
// InternalBeeLangTestLanguage.g:564:1: ruleProvidedCapability returns [EObject current=null] : ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )? ) ;
public final EObject ruleProvidedCapability() throws RecognitionException {
EObject current = null;
int ruleProvidedCapability_StartIndex = input.index();
Token lv_nameSpace_1_0 = null;
Token otherlv_2 = null;
Token otherlv_3 = null;
Token otherlv_5 = null;
Token otherlv_6 = null;
Token otherlv_8 = null;
Token otherlv_9 = null;
Token otherlv_10 = null;
Token lv_name_11_0 = null;
Token otherlv_12 = null;
Token otherlv_13 = null;
Token otherlv_14 = null;
Token lv_version_15_0 = null;
Token otherlv_16 = null;
Token otherlv_17 = null;
EObject lv_condExpr_7_0 = null;
enterRule();
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 6)) {
return current;
}
// InternalBeeLangTestLanguage.g:573:2: ( ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )? ) )
// InternalBeeLangTestLanguage.g:574:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )? )
{
// InternalBeeLangTestLanguage.g:574:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )? )
// InternalBeeLangTestLanguage.g:575:3: () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )?
{
// InternalBeeLangTestLanguage.g:575:3: ()
// InternalBeeLangTestLanguage.g:576:4:
{
if (state.backtracking == 0) {
/* */
}
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getProvidedCapabilityAccess().getProvidedCapabilityAction_0(), current);
}
}
// InternalBeeLangTestLanguage.g:585:3: ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' )
int alt14 = 2;
int LA14_0 = input.LA(1);
if ((LA14_0 == RULE_ID)) {
alt14 = 1;
} else if ((LA14_0 == 13)) {
alt14 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 14, 0, input);
throw nvae;
}
switch(alt14) {
case 1:
// InternalBeeLangTestLanguage.g:586:4: ( (lv_nameSpace_1_0= RULE_ID ) )
{
// InternalBeeLangTestLanguage.g:586:4: ( (lv_nameSpace_1_0= RULE_ID ) )
// InternalBeeLangTestLanguage.g:587:5: (lv_nameSpace_1_0= RULE_ID )
{
// InternalBeeLangTestLanguage.g:587:5: (lv_nameSpace_1_0= RULE_ID )
// InternalBeeLangTestLanguage.g:588:6: lv_nameSpace_1_0= RULE_ID
{
lv_nameSpace_1_0 = (Token) match(input, RULE_ID, FOLLOW_17);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_nameSpace_1_0, grammarAccess.getProvidedCapabilityAccess().getNameSpaceIDTerminalRuleCall_1_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getProvidedCapabilityRule());
}
setWithLastConsumed(current, "nameSpace", lv_nameSpace_1_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
}
break;
case 2:
// InternalBeeLangTestLanguage.g:605:4: otherlv_2= 'unit'
{
otherlv_2 = (Token) match(input, 13, FOLLOW_17);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getProvidedCapabilityAccess().getUnitKeyword_1_1());
}
}
break;
}
// InternalBeeLangTestLanguage.g:610:3: (otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}' )?
int alt16 = 2;
int LA16_0 = input.LA(1);
if ((LA16_0 == 17)) {
alt16 = 1;
}
switch(alt16) {
case 1:
// InternalBeeLangTestLanguage.g:611:4: otherlv_3= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) ) otherlv_17= '}'
{
otherlv_3 = (Token) match(input, 17, FOLLOW_18);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_3, grammarAccess.getProvidedCapabilityAccess().getLeftCurlyBracketKeyword_2_0());
}
// InternalBeeLangTestLanguage.g:615:4: ( ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) ) )
// InternalBeeLangTestLanguage.g:616:5: ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) )
{
// InternalBeeLangTestLanguage.g:616:5: ( ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?) )
// InternalBeeLangTestLanguage.g:617:6: ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?)
{
getUnorderedGroupHelper().enter(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
// InternalBeeLangTestLanguage.g:620:6: ( ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?)
// InternalBeeLangTestLanguage.g:621:7: ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+ {...}?
{
// InternalBeeLangTestLanguage.g:621:7: ( ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) ) )+
int cnt15 = 0;
loop15: do {
int alt15 = 4;
int LA15_0 = input.LA(1);
if (LA15_0 == 26 && getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 0)) {
alt15 = 1;
} else if (LA15_0 == 27 && getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 1)) {
alt15 = 2;
} else if (LA15_0 == 14 && getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 2)) {
alt15 = 3;
}
switch(alt15) {
case 1:
// InternalBeeLangTestLanguage.g:622:5: ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) )
{
// InternalBeeLangTestLanguage.g:622:5: ({...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) ) )
// InternalBeeLangTestLanguage.g:623:6: {...}? => ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 0)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 0)");
}
// InternalBeeLangTestLanguage.g:623:118: ( ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) ) )
// InternalBeeLangTestLanguage.g:624:7: ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 0);
// InternalBeeLangTestLanguage.g:627:10: ({...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' ) )
// InternalBeeLangTestLanguage.g:627:11: {...}? => (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "true");
}
// InternalBeeLangTestLanguage.g:627:20: (otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';' )
// InternalBeeLangTestLanguage.g:627:21: otherlv_5= 'when' otherlv_6= ':' ( (lv_condExpr_7_0= ruleExpression ) ) otherlv_8= ';'
{
otherlv_5 = (Token) match(input, 26, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_5, grammarAccess.getProvidedCapabilityAccess().getWhenKeyword_2_1_0_0());
}
otherlv_6 = (Token) match(input, 19, FOLLOW_19);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getProvidedCapabilityAccess().getColonKeyword_2_1_0_1());
}
// InternalBeeLangTestLanguage.g:635:10: ( (lv_condExpr_7_0= ruleExpression ) )
// InternalBeeLangTestLanguage.g:636:11: (lv_condExpr_7_0= ruleExpression )
{
// InternalBeeLangTestLanguage.g:636:11: (lv_condExpr_7_0= ruleExpression )
// InternalBeeLangTestLanguage.g:637:12: lv_condExpr_7_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getProvidedCapabilityAccess().getCondExprExpressionParserRuleCall_2_1_0_2_0());
}
pushFollow(FOLLOW_14);
lv_condExpr_7_0 = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getProvidedCapabilityRule());
}
set(current, "condExpr", lv_condExpr_7_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Expression");
afterParserOrEnumRuleCall();
}
}
}
otherlv_8 = (Token) match(input, 20, FOLLOW_20);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getProvidedCapabilityAccess().getSemicolonKeyword_2_1_0_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
}
}
}
break;
case 2:
// InternalBeeLangTestLanguage.g:664:5: ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) )
{
// InternalBeeLangTestLanguage.g:664:5: ({...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) ) )
// InternalBeeLangTestLanguage.g:665:6: {...}? => ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 1)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 1)");
}
// InternalBeeLangTestLanguage.g:665:118: ( ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) ) )
// InternalBeeLangTestLanguage.g:666:7: ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 1);
// InternalBeeLangTestLanguage.g:669:10: ({...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' ) )
// InternalBeeLangTestLanguage.g:669:11: {...}? => (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "true");
}
// InternalBeeLangTestLanguage.g:669:20: (otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';' )
// InternalBeeLangTestLanguage.g:669:21: otherlv_9= 'name' otherlv_10= ':' ( (lv_name_11_0= RULE_ID ) ) otherlv_12= ';'
{
otherlv_9 = (Token) match(input, 27, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_9, grammarAccess.getProvidedCapabilityAccess().getNameKeyword_2_1_1_0());
}
otherlv_10 = (Token) match(input, 19, FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getProvidedCapabilityAccess().getColonKeyword_2_1_1_1());
}
// InternalBeeLangTestLanguage.g:677:10: ( (lv_name_11_0= RULE_ID ) )
// InternalBeeLangTestLanguage.g:678:11: (lv_name_11_0= RULE_ID )
{
// InternalBeeLangTestLanguage.g:678:11: (lv_name_11_0= RULE_ID )
// InternalBeeLangTestLanguage.g:679:12: lv_name_11_0= RULE_ID
{
lv_name_11_0 = (Token) match(input, RULE_ID, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_11_0, grammarAccess.getProvidedCapabilityAccess().getNameIDTerminalRuleCall_2_1_1_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getProvidedCapabilityRule());
}
setWithLastConsumed(current, "name", lv_name_11_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
otherlv_12 = (Token) match(input, 20, FOLLOW_20);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getProvidedCapabilityAccess().getSemicolonKeyword_2_1_1_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
}
}
}
break;
case 3:
// InternalBeeLangTestLanguage.g:705:5: ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) )
{
// InternalBeeLangTestLanguage.g:705:5: ({...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) ) )
// InternalBeeLangTestLanguage.g:706:6: {...}? => ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 2)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 2)");
}
// InternalBeeLangTestLanguage.g:706:118: ( ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) ) )
// InternalBeeLangTestLanguage.g:707:7: ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1(), 2);
// InternalBeeLangTestLanguage.g:710:10: ({...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' ) )
// InternalBeeLangTestLanguage.g:710:11: {...}? => (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "true");
}
// InternalBeeLangTestLanguage.g:710:20: (otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';' )
// InternalBeeLangTestLanguage.g:710:21: otherlv_13= 'version' otherlv_14= ':' ( (lv_version_15_0= RULE_ID ) ) otherlv_16= ';'
{
otherlv_13 = (Token) match(input, 14, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getProvidedCapabilityAccess().getVersionKeyword_2_1_2_0());
}
otherlv_14 = (Token) match(input, 19, FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_14, grammarAccess.getProvidedCapabilityAccess().getColonKeyword_2_1_2_1());
}
// InternalBeeLangTestLanguage.g:718:10: ( (lv_version_15_0= RULE_ID ) )
// InternalBeeLangTestLanguage.g:719:11: (lv_version_15_0= RULE_ID )
{
// InternalBeeLangTestLanguage.g:719:11: (lv_version_15_0= RULE_ID )
// InternalBeeLangTestLanguage.g:720:12: lv_version_15_0= RULE_ID
{
lv_version_15_0 = (Token) match(input, RULE_ID, FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_version_15_0, grammarAccess.getProvidedCapabilityAccess().getVersionIDTerminalRuleCall_2_1_2_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getProvidedCapabilityRule());
}
setWithLastConsumed(current, "version", lv_version_15_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
otherlv_16 = (Token) match(input, 20, FOLLOW_20);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_16, grammarAccess.getProvidedCapabilityAccess().getSemicolonKeyword_2_1_2_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
}
}
}
break;
default:
if (cnt15 >= 1)
break loop15;
if (state.backtracking > 0) {
state.failed = true;
return current;
}
EarlyExitException eee = new EarlyExitException(15, input);
throw eee;
}
cnt15++;
} while (true);
if (!getUnorderedGroupHelper().canLeave(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1())) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleProvidedCapability", "getUnorderedGroupHelper().canLeave(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1())");
}
}
}
getUnorderedGroupHelper().leave(grammarAccess.getProvidedCapabilityAccess().getUnorderedGroup_2_1());
}
otherlv_17 = (Token) match(input, 25, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getProvidedCapabilityAccess().getRightCurlyBracketKeyword_2_2());
}
}
break;
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 6, ruleProvidedCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method entryRuleAliasedRequiredCapability.
// $ANTLR end "ruleProvidedCapability"
// $ANTLR start "entryRuleAliasedRequiredCapability"
// InternalExBeeLangTestLanguageParser.g:787:1: entryRuleAliasedRequiredCapability returns [EObject current=null] : iv_ruleAliasedRequiredCapability= ruleAliasedRequiredCapability EOF ;
public final EObject entryRuleAliasedRequiredCapability() throws RecognitionException {
EObject current = null;
int entryRuleAliasedRequiredCapability_StartIndex = input.index();
EObject iv_ruleAliasedRequiredCapability = null;
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 9)) {
return current;
}
// InternalExBeeLangTestLanguageParser.g:791:2: (iv_ruleAliasedRequiredCapability= ruleAliasedRequiredCapability EOF )
// InternalExBeeLangTestLanguageParser.g:792:2: iv_ruleAliasedRequiredCapability= ruleAliasedRequiredCapability EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getAliasedRequiredCapabilityRule());
}
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleAliasedRequiredCapability = ruleAliasedRequiredCapability();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleAliasedRequiredCapability;
}
match(input, EOF, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 9, entryRuleAliasedRequiredCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method ruleAliasedRequiredCapability.
// $ANTLR end "entryRuleAliasedRequiredCapability"
// $ANTLR start "ruleAliasedRequiredCapability"
// InternalExBeeLangTestLanguageParser.g:801:1: ruleAliasedRequiredCapability returns [EObject current=null] : ( ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )? (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket ) ) ;
public final EObject ruleAliasedRequiredCapability() throws RecognitionException {
EObject current = null;
int ruleAliasedRequiredCapability_StartIndex = input.index();
Token lv_nameSpace_0_0 = null;
Token otherlv_1 = null;
Token lv_name_2_0 = null;
Token otherlv_3 = null;
Token lv_alias_4_0 = null;
Token otherlv_5 = null;
Token otherlv_7 = null;
Token otherlv_8 = null;
Token otherlv_10 = null;
Token lv_greedy_11_0 = null;
Token otherlv_12 = null;
Token otherlv_13 = null;
Token otherlv_14 = null;
Token lv_min_15_0 = null;
Token otherlv_16 = null;
Token otherlv_17 = null;
Token otherlv_18 = null;
Token lv_max_19_0 = null;
Token otherlv_20 = null;
Token otherlv_21 = null;
Token otherlv_22 = null;
Token lv_versionRange_23_0 = null;
Token otherlv_24 = null;
Token otherlv_25 = null;
EObject lv_condExpr_9_0 = null;
enterRule();
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 10)) {
return current;
}
// InternalExBeeLangTestLanguageParser.g:810:2: ( ( ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )? (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket ) ) )
// InternalExBeeLangTestLanguageParser.g:811:2: ( ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )? (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket ) )
{
// InternalExBeeLangTestLanguageParser.g:811:2: ( ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )? (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket ) )
// InternalExBeeLangTestLanguageParser.g:812:3: ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )? (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket )
{
// InternalExBeeLangTestLanguageParser.g:812:3: ( ( (lv_nameSpace_0_0= RULE_ID ) ) | otherlv_1= Unit )
int alt17 = 2;
int LA17_0 = input.LA(1);
if ((LA17_0 == RULE_ID)) {
alt17 = 1;
} else if ((LA17_0 == Unit)) {
alt17 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 17, 0, input);
throw nvae;
}
switch(alt17) {
case 1:
// InternalExBeeLangTestLanguageParser.g:813:4: ( (lv_nameSpace_0_0= RULE_ID ) )
{
// InternalExBeeLangTestLanguageParser.g:813:4: ( (lv_nameSpace_0_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:814:5: (lv_nameSpace_0_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:814:5: (lv_nameSpace_0_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:815:6: lv_nameSpace_0_0= RULE_ID
{
lv_nameSpace_0_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_nameSpace_0_0, grammarAccess.getAliasedRequiredCapabilityAccess().getNameSpaceIDTerminalRuleCall_0_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "nameSpace", lv_nameSpace_0_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
}
break;
case 2:
// InternalExBeeLangTestLanguageParser.g:832:4: otherlv_1= Unit
{
otherlv_1 = (Token) match(input, Unit, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getAliasedRequiredCapabilityAccess().getUnitKeyword_0_1());
}
}
break;
}
// InternalExBeeLangTestLanguageParser.g:837:3: ( (lv_name_2_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:838:4: (lv_name_2_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:838:4: (lv_name_2_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:839:5: lv_name_2_0= RULE_ID
{
lv_name_2_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_21);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_2_0, grammarAccess.getAliasedRequiredCapabilityAccess().getNameIDTerminalRuleCall_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "name", lv_name_2_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
// InternalExBeeLangTestLanguageParser.g:855:3: (otherlv_3= As ( (lv_alias_4_0= RULE_ID ) ) )?
int alt18 = 2;
int LA18_0 = input.LA(1);
if ((LA18_0 == As)) {
alt18 = 1;
}
switch(alt18) {
case 1:
// InternalExBeeLangTestLanguageParser.g:856:4: otherlv_3= As ( (lv_alias_4_0= RULE_ID ) )
{
otherlv_3 = (Token) match(input, As, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_3, grammarAccess.getAliasedRequiredCapabilityAccess().getAsKeyword_2_0());
}
// InternalExBeeLangTestLanguageParser.g:860:4: ( (lv_alias_4_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:861:5: (lv_alias_4_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:861:5: (lv_alias_4_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:862:6: lv_alias_4_0= RULE_ID
{
lv_alias_4_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_22);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_alias_4_0, grammarAccess.getAliasedRequiredCapabilityAccess().getAliasIDTerminalRuleCall_2_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "alias", lv_alias_4_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
}
break;
}
// InternalExBeeLangTestLanguageParser.g:879:3: (otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket )
// InternalExBeeLangTestLanguageParser.g:880:4: otherlv_5= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) ) otherlv_25= RightCurlyBracket
{
otherlv_5 = (Token) match(input, LeftCurlyBracket, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_5, grammarAccess.getAliasedRequiredCapabilityAccess().getLeftCurlyBracketKeyword_3_0());
}
// InternalExBeeLangTestLanguageParser.g:884:4: ( ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) ) )
// InternalExBeeLangTestLanguageParser.g:885:5: ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) )
{
// InternalExBeeLangTestLanguageParser.g:885:5: ( ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* ) )
// InternalExBeeLangTestLanguageParser.g:886:6: ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* )
{
getUnorderedGroupHelper().enter(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
// InternalExBeeLangTestLanguageParser.g:889:6: ( ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )* )
// InternalExBeeLangTestLanguageParser.g:890:7: ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )*
{
// InternalExBeeLangTestLanguageParser.g:890:7: ( ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) ) )*
loop19: do {
int alt19 = 6;
int LA19_0 = input.LA(1);
if (LA19_0 == When && getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)) {
alt19 = 1;
} else if (LA19_0 == Greedy && getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)) {
alt19 = 2;
} else if (LA19_0 == RequiresMin && getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)) {
alt19 = 3;
} else if (LA19_0 == RequiresMax && getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)) {
alt19 = 4;
} else if (LA19_0 == Version && getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)) {
alt19 = 5;
}
switch(alt19) {
case 1:
// InternalExBeeLangTestLanguageParser.g:891:5: ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:891:5: ({...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:892:6: {...}? => ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)");
}
// InternalExBeeLangTestLanguageParser.g:892:125: ( ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:893:7: ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0);
// InternalExBeeLangTestLanguageParser.g:896:10: ({...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:896:11: {...}? => (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:896:20: (otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon )
// InternalExBeeLangTestLanguageParser.g:896:21: otherlv_7= When otherlv_8= Colon ( (lv_condExpr_9_0= ruleExpression ) ) otherlv_10= Semicolon
{
otherlv_7 = (Token) match(input, When, FollowSets000.FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_7, grammarAccess.getAliasedRequiredCapabilityAccess().getWhenKeyword_3_1_0_0());
}
otherlv_8 = (Token) match(input, Colon, FollowSets000.FOLLOW_19);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getAliasedRequiredCapabilityAccess().getColonKeyword_3_1_0_1());
}
// InternalExBeeLangTestLanguageParser.g:904:10: ( (lv_condExpr_9_0= ruleExpression ) )
// InternalExBeeLangTestLanguageParser.g:905:11: (lv_condExpr_9_0= ruleExpression )
{
// InternalExBeeLangTestLanguageParser.g:905:11: (lv_condExpr_9_0= ruleExpression )
// InternalExBeeLangTestLanguageParser.g:906:12: lv_condExpr_9_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getAliasedRequiredCapabilityAccess().getCondExprExpressionParserRuleCall_3_1_0_2_0());
}
pushFollow(FollowSets000.FOLLOW_14);
lv_condExpr_9_0 = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getAliasedRequiredCapabilityRule());
}
set(current, "condExpr", lv_condExpr_9_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Expression");
afterParserOrEnumRuleCall();
}
}
}
otherlv_10 = (Token) match(input, Semicolon, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getAliasedRequiredCapabilityAccess().getSemicolonKeyword_3_1_0_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
}
}
break;
case 2:
// InternalExBeeLangTestLanguageParser.g:933:5: ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:933:5: ({...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:934:6: {...}? => ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)");
}
// InternalExBeeLangTestLanguageParser.g:934:125: ( ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:935:7: ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1);
// InternalExBeeLangTestLanguageParser.g:938:10: ({...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:938:11: {...}? => ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:938:20: ( ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon )
// InternalExBeeLangTestLanguageParser.g:938:21: ( (lv_greedy_11_0= Greedy ) ) otherlv_12= Semicolon
{
// InternalExBeeLangTestLanguageParser.g:938:21: ( (lv_greedy_11_0= Greedy ) )
// InternalExBeeLangTestLanguageParser.g:939:11: (lv_greedy_11_0= Greedy )
{
// InternalExBeeLangTestLanguageParser.g:939:11: (lv_greedy_11_0= Greedy )
// InternalExBeeLangTestLanguageParser.g:940:12: lv_greedy_11_0= Greedy
{
lv_greedy_11_0 = (Token) match(input, Greedy, FollowSets000.FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_greedy_11_0, grammarAccess.getAliasedRequiredCapabilityAccess().getGreedyGreedyKeyword_3_1_1_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "greedy", true, "greedy");
}
}
}
otherlv_12 = (Token) match(input, Semicolon, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getAliasedRequiredCapabilityAccess().getSemicolonKeyword_3_1_1_1());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
}
}
break;
case 3:
// InternalExBeeLangTestLanguageParser.g:962:5: ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:962:5: ({...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:963:6: {...}? => ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)");
}
// InternalExBeeLangTestLanguageParser.g:963:125: ( ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:964:7: ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2);
// InternalExBeeLangTestLanguageParser.g:967:10: ({...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:967:11: {...}? => (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:967:20: (otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon )
// InternalExBeeLangTestLanguageParser.g:967:21: otherlv_13= RequiresMin otherlv_14= Colon ( (lv_min_15_0= RULE_INT ) ) otherlv_16= Semicolon
{
otherlv_13 = (Token) match(input, RequiresMin, FollowSets000.FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getAliasedRequiredCapabilityAccess().getRequiresMinKeyword_3_1_2_0());
}
otherlv_14 = (Token) match(input, Colon, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_14, grammarAccess.getAliasedRequiredCapabilityAccess().getColonKeyword_3_1_2_1());
}
// InternalExBeeLangTestLanguageParser.g:975:10: ( (lv_min_15_0= RULE_INT ) )
// InternalExBeeLangTestLanguageParser.g:976:11: (lv_min_15_0= RULE_INT )
{
// InternalExBeeLangTestLanguageParser.g:976:11: (lv_min_15_0= RULE_INT )
// InternalExBeeLangTestLanguageParser.g:977:12: lv_min_15_0= RULE_INT
{
lv_min_15_0 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_min_15_0, grammarAccess.getAliasedRequiredCapabilityAccess().getMinINTTerminalRuleCall_3_1_2_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "min", lv_min_15_0, "org.eclipse.xtext.common.Terminals.INT");
}
}
}
otherlv_16 = (Token) match(input, Semicolon, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_16, grammarAccess.getAliasedRequiredCapabilityAccess().getSemicolonKeyword_3_1_2_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
}
}
break;
case 4:
// InternalExBeeLangTestLanguageParser.g:1003:5: ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1003:5: ({...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1004:6: {...}? => ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)");
}
// InternalExBeeLangTestLanguageParser.g:1004:125: ( ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1005:7: ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3);
// InternalExBeeLangTestLanguageParser.g:1008:10: ({...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1008:11: {...}? => (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1008:20: (otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1008:21: otherlv_17= RequiresMax otherlv_18= Colon ( (lv_max_19_0= RULE_INT ) ) otherlv_20= Semicolon
{
otherlv_17 = (Token) match(input, RequiresMax, FollowSets000.FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getAliasedRequiredCapabilityAccess().getRequiresMaxKeyword_3_1_3_0());
}
otherlv_18 = (Token) match(input, Colon, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_18, grammarAccess.getAliasedRequiredCapabilityAccess().getColonKeyword_3_1_3_1());
}
// InternalExBeeLangTestLanguageParser.g:1016:10: ( (lv_max_19_0= RULE_INT ) )
// InternalExBeeLangTestLanguageParser.g:1017:11: (lv_max_19_0= RULE_INT )
{
// InternalExBeeLangTestLanguageParser.g:1017:11: (lv_max_19_0= RULE_INT )
// InternalExBeeLangTestLanguageParser.g:1018:12: lv_max_19_0= RULE_INT
{
lv_max_19_0 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_max_19_0, grammarAccess.getAliasedRequiredCapabilityAccess().getMaxINTTerminalRuleCall_3_1_3_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "max", lv_max_19_0, "org.eclipse.xtext.common.Terminals.INT");
}
}
}
otherlv_20 = (Token) match(input, Semicolon, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_20, grammarAccess.getAliasedRequiredCapabilityAccess().getSemicolonKeyword_3_1_3_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
}
}
break;
case 5:
// InternalExBeeLangTestLanguageParser.g:1044:5: ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1044:5: ({...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1045:6: {...}? => ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)");
}
// InternalExBeeLangTestLanguageParser.g:1045:125: ( ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1046:7: ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4);
// InternalExBeeLangTestLanguageParser.g:1049:10: ({...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1049:11: {...}? => (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleAliasedRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1049:20: (otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1049:21: otherlv_21= Version otherlv_22= Colon ( (lv_versionRange_23_0= RULE_ID ) ) otherlv_24= Semicolon
{
otherlv_21 = (Token) match(input, Version, FollowSets000.FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getAliasedRequiredCapabilityAccess().getVersionKeyword_3_1_4_0());
}
otherlv_22 = (Token) match(input, Colon, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_22, grammarAccess.getAliasedRequiredCapabilityAccess().getColonKeyword_3_1_4_1());
}
// InternalExBeeLangTestLanguageParser.g:1057:10: ( (lv_versionRange_23_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:1058:11: (lv_versionRange_23_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:1058:11: (lv_versionRange_23_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:1059:12: lv_versionRange_23_0= RULE_ID
{
lv_versionRange_23_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_14);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_versionRange_23_0, grammarAccess.getAliasedRequiredCapabilityAccess().getVersionRangeIDTerminalRuleCall_3_1_4_2_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getAliasedRequiredCapabilityRule());
}
setWithLastConsumed(current, "versionRange", lv_versionRange_23_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
otherlv_24 = (Token) match(input, Semicolon, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_24, grammarAccess.getAliasedRequiredCapabilityAccess().getSemicolonKeyword_3_1_4_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
}
}
break;
default:
break loop19;
}
} while (true);
}
}
getUnorderedGroupHelper().leave(grammarAccess.getAliasedRequiredCapabilityAccess().getUnorderedGroup_3_1());
}
otherlv_25 = (Token) match(input, RightCurlyBracket, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_25, grammarAccess.getAliasedRequiredCapabilityAccess().getRightCurlyBracketKeyword_3_2());
}
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 10, ruleAliasedRequiredCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalBeeLangTestLanguageParser method ruleUnit.
// $ANTLR end "entryRuleUnit"
// $ANTLR start "ruleUnit"
// InternalBeeLangTestLanguage.g:144:1: ruleUnit returns [EObject current=null] : ( () ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )? otherlv_2= 'unit' ( (lv_name_3_0= RULE_ID ) )? (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )? (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )? otherlv_10= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) ) otherlv_34= '}' ) ;
public final EObject ruleUnit() throws RecognitionException {
EObject current = null;
int ruleUnit_StartIndex = input.index();
Token lv_documentation_1_0 = null;
Token otherlv_2 = null;
Token lv_name_3_0 = null;
Token otherlv_4 = null;
Token lv_version_5_0 = null;
Token otherlv_6 = null;
Token otherlv_8 = null;
Token otherlv_10 = null;
Token otherlv_12 = null;
Token otherlv_13 = null;
Token otherlv_15 = null;
Token otherlv_16 = null;
Token otherlv_17 = null;
Token otherlv_19 = null;
Token otherlv_20 = null;
Token otherlv_21 = null;
Token otherlv_23 = null;
Token otherlv_24 = null;
Token otherlv_25 = null;
Token otherlv_27 = null;
Token otherlv_28 = null;
Token otherlv_29 = null;
Token otherlv_30 = null;
Token otherlv_32 = null;
Token otherlv_34 = null;
EObject lv_implements_7_0 = null;
EObject lv_implements_9_0 = null;
AntlrDatatypeRuleToken lv_sourceLocation_14_0 = null;
AntlrDatatypeRuleToken lv_outputLocation_18_0 = null;
EObject lv_providedCapabilities_22_0 = null;
EObject lv_requiredCapabilities_26_0 = null;
EObject lv_metaRequiredCapabilities_31_0 = null;
EObject lv_functions_33_0 = null;
enterRule();
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getUnitAccess().getUnorderedGroup_7());
try {
if (state.backtracking > 0 && alreadyParsedRule(input, 4)) {
return current;
}
// InternalBeeLangTestLanguage.g:153:2: ( ( () ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )? otherlv_2= 'unit' ( (lv_name_3_0= RULE_ID ) )? (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )? (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )? otherlv_10= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) ) otherlv_34= '}' ) )
// InternalBeeLangTestLanguage.g:154:2: ( () ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )? otherlv_2= 'unit' ( (lv_name_3_0= RULE_ID ) )? (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )? (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )? otherlv_10= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) ) otherlv_34= '}' )
{
// InternalBeeLangTestLanguage.g:154:2: ( () ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )? otherlv_2= 'unit' ( (lv_name_3_0= RULE_ID ) )? (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )? (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )? otherlv_10= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) ) otherlv_34= '}' )
// InternalBeeLangTestLanguage.g:155:3: () ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )? otherlv_2= 'unit' ( (lv_name_3_0= RULE_ID ) )? (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )? (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )? otherlv_10= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) ) otherlv_34= '}'
{
// InternalBeeLangTestLanguage.g:155:3: ()
// InternalBeeLangTestLanguage.g:156:4:
{
if (state.backtracking == 0) {
/* */
}
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getUnitAccess().getUnitAction_0(), current);
}
}
// InternalBeeLangTestLanguage.g:165:3: ( (lv_documentation_1_0= RULE_DOCUMENTATION ) )?
int alt4 = 2;
int LA4_0 = input.LA(1);
if ((LA4_0 == RULE_DOCUMENTATION)) {
alt4 = 1;
}
switch(alt4) {
case 1:
// InternalBeeLangTestLanguage.g:166:4: (lv_documentation_1_0= RULE_DOCUMENTATION )
{
// InternalBeeLangTestLanguage.g:166:4: (lv_documentation_1_0= RULE_DOCUMENTATION )
// InternalBeeLangTestLanguage.g:167:5: lv_documentation_1_0= RULE_DOCUMENTATION
{
lv_documentation_1_0 = (Token) match(input, RULE_DOCUMENTATION, FOLLOW_5);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_documentation_1_0, grammarAccess.getUnitAccess().getDocumentationDOCUMENTATIONTerminalRuleCall_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getUnitRule());
}
setWithLastConsumed(current, "documentation", lv_documentation_1_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.DOCUMENTATION");
}
}
}
break;
}
otherlv_2 = (Token) match(input, 13, FOLLOW_6);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getUnitAccess().getUnitKeyword_2());
}
// InternalBeeLangTestLanguage.g:187:3: ( (lv_name_3_0= RULE_ID ) )?
int alt5 = 2;
int LA5_0 = input.LA(1);
if ((LA5_0 == RULE_ID)) {
alt5 = 1;
}
switch(alt5) {
case 1:
// InternalBeeLangTestLanguage.g:188:4: (lv_name_3_0= RULE_ID )
{
// InternalBeeLangTestLanguage.g:188:4: (lv_name_3_0= RULE_ID )
// InternalBeeLangTestLanguage.g:189:5: lv_name_3_0= RULE_ID
{
lv_name_3_0 = (Token) match(input, RULE_ID, FOLLOW_7);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_3_0, grammarAccess.getUnitAccess().getNameIDTerminalRuleCall_3_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getUnitRule());
}
setWithLastConsumed(current, "name", lv_name_3_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
break;
}
// InternalBeeLangTestLanguage.g:205:3: (otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) ) )?
int alt6 = 2;
int LA6_0 = input.LA(1);
if ((LA6_0 == 14)) {
alt6 = 1;
}
switch(alt6) {
case 1:
// InternalBeeLangTestLanguage.g:206:4: otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) )
{
otherlv_4 = (Token) match(input, 14, FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getUnitAccess().getVersionKeyword_4_0());
}
// InternalBeeLangTestLanguage.g:210:4: ( (lv_version_5_0= RULE_ID ) )
// InternalBeeLangTestLanguage.g:211:5: (lv_version_5_0= RULE_ID )
{
// InternalBeeLangTestLanguage.g:211:5: (lv_version_5_0= RULE_ID )
// InternalBeeLangTestLanguage.g:212:6: lv_version_5_0= RULE_ID
{
lv_version_5_0 = (Token) match(input, RULE_ID, FOLLOW_9);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_version_5_0, grammarAccess.getUnitAccess().getVersionIDTerminalRuleCall_4_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getUnitRule());
}
setWithLastConsumed(current, "version", lv_version_5_0, "org.eclipse.xtext.common.Terminals.ID");
}
}
}
}
break;
}
// InternalBeeLangTestLanguage.g:229:3: (otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )* )?
int alt8 = 2;
int LA8_0 = input.LA(1);
if ((LA8_0 == 15)) {
alt8 = 1;
}
switch(alt8) {
case 1:
// InternalBeeLangTestLanguage.g:230:4: otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )*
{
otherlv_6 = (Token) match(input, 15, FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getUnitAccess().getImplementsKeyword_5_0());
}
// InternalBeeLangTestLanguage.g:234:4: ( (lv_implements_7_0= ruleSimpleTypeRef ) )
// InternalBeeLangTestLanguage.g:235:5: (lv_implements_7_0= ruleSimpleTypeRef )
{
// InternalBeeLangTestLanguage.g:235:5: (lv_implements_7_0= ruleSimpleTypeRef )
// InternalBeeLangTestLanguage.g:236:6: lv_implements_7_0= ruleSimpleTypeRef
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getImplementsSimpleTypeRefParserRuleCall_5_1_0());
}
pushFollow(FOLLOW_10);
lv_implements_7_0 = ruleSimpleTypeRef();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "implements", lv_implements_7_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.SimpleTypeRef");
afterParserOrEnumRuleCall();
}
}
}
// InternalBeeLangTestLanguage.g:253:4: (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )*
loop7: do {
int alt7 = 2;
int LA7_0 = input.LA(1);
if ((LA7_0 == 16)) {
alt7 = 1;
}
switch(alt7) {
case 1:
// InternalBeeLangTestLanguage.g:254:5: otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) )
{
otherlv_8 = (Token) match(input, 16, FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getUnitAccess().getCommaKeyword_5_2_0());
}
// InternalBeeLangTestLanguage.g:258:5: ( (lv_implements_9_0= ruleSimpleTypeRef ) )
// InternalBeeLangTestLanguage.g:259:6: (lv_implements_9_0= ruleSimpleTypeRef )
{
// InternalBeeLangTestLanguage.g:259:6: (lv_implements_9_0= ruleSimpleTypeRef )
// InternalBeeLangTestLanguage.g:260:7: lv_implements_9_0= ruleSimpleTypeRef
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getImplementsSimpleTypeRefParserRuleCall_5_2_1_0());
}
pushFollow(FOLLOW_10);
lv_implements_9_0 = ruleSimpleTypeRef();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "implements", lv_implements_9_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.SimpleTypeRef");
afterParserOrEnumRuleCall();
}
}
}
}
break;
default:
break loop7;
}
} while (true);
}
break;
}
otherlv_10 = (Token) match(input, 17, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getUnitAccess().getLeftCurlyBracketKeyword_6());
}
// InternalBeeLangTestLanguage.g:283:3: ( ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) ) )
// InternalBeeLangTestLanguage.g:284:4: ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) )
{
// InternalBeeLangTestLanguage.g:284:4: ( ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* ) )
// InternalBeeLangTestLanguage.g:285:5: ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* )
{
getUnorderedGroupHelper().enter(grammarAccess.getUnitAccess().getUnorderedGroup_7());
// InternalBeeLangTestLanguage.g:288:5: ( ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )* )
// InternalBeeLangTestLanguage.g:289:6: ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )*
{
// InternalBeeLangTestLanguage.g:289:6: ( ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) ) | ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) ) | ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) ) )*
loop13: do {
int alt13 = 7;
alt13 = dfa13.predict(input);
switch(alt13) {
case 1:
// InternalBeeLangTestLanguage.g:290:4: ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) )
{
// InternalBeeLangTestLanguage.g:290:4: ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) )
// InternalBeeLangTestLanguage.g:291:5: {...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 0)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 0)");
}
// InternalBeeLangTestLanguage.g:291:101: ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) )
// InternalBeeLangTestLanguage.g:292:6: ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 0);
// InternalBeeLangTestLanguage.g:295:9: ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) )
// InternalBeeLangTestLanguage.g:295:10: {...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:295:19: (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' )
// InternalBeeLangTestLanguage.g:295:20: otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';'
{
otherlv_12 = (Token) match(input, 18, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getUnitAccess().getSourceKeyword_7_0_0());
}
otherlv_13 = (Token) match(input, 19, FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getUnitAccess().getColonKeyword_7_0_1());
}
// InternalBeeLangTestLanguage.g:303:9: ( (lv_sourceLocation_14_0= rulePath ) )
// InternalBeeLangTestLanguage.g:304:10: (lv_sourceLocation_14_0= rulePath )
{
// InternalBeeLangTestLanguage.g:304:10: (lv_sourceLocation_14_0= rulePath )
// InternalBeeLangTestLanguage.g:305:11: lv_sourceLocation_14_0= rulePath
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getSourceLocationPathParserRuleCall_7_0_2_0());
}
pushFollow(FOLLOW_14);
lv_sourceLocation_14_0 = rulePath();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
set(current, "sourceLocation", lv_sourceLocation_14_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Path");
afterParserOrEnumRuleCall();
}
}
}
otherlv_15 = (Token) match(input, 20, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_15, grammarAccess.getUnitAccess().getSemicolonKeyword_7_0_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
case 2:
// InternalBeeLangTestLanguage.g:332:4: ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) )
{
// InternalBeeLangTestLanguage.g:332:4: ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) )
// InternalBeeLangTestLanguage.g:333:5: {...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 1)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 1)");
}
// InternalBeeLangTestLanguage.g:333:101: ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) )
// InternalBeeLangTestLanguage.g:334:6: ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 1);
// InternalBeeLangTestLanguage.g:337:9: ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) )
// InternalBeeLangTestLanguage.g:337:10: {...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:337:19: (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' )
// InternalBeeLangTestLanguage.g:337:20: otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';'
{
otherlv_16 = (Token) match(input, 21, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_16, grammarAccess.getUnitAccess().getOutputKeyword_7_1_0());
}
otherlv_17 = (Token) match(input, 19, FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getUnitAccess().getColonKeyword_7_1_1());
}
// InternalBeeLangTestLanguage.g:345:9: ( (lv_outputLocation_18_0= rulePath ) )
// InternalBeeLangTestLanguage.g:346:10: (lv_outputLocation_18_0= rulePath )
{
// InternalBeeLangTestLanguage.g:346:10: (lv_outputLocation_18_0= rulePath )
// InternalBeeLangTestLanguage.g:347:11: lv_outputLocation_18_0= rulePath
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getOutputLocationPathParserRuleCall_7_1_2_0());
}
pushFollow(FOLLOW_14);
lv_outputLocation_18_0 = rulePath();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
set(current, "outputLocation", lv_outputLocation_18_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Path");
afterParserOrEnumRuleCall();
}
}
}
otherlv_19 = (Token) match(input, 20, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_19, grammarAccess.getUnitAccess().getSemicolonKeyword_7_1_3());
}
}
}
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
case 3:
// InternalBeeLangTestLanguage.g:374:4: ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) )
{
// InternalBeeLangTestLanguage.g:374:4: ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) )
// InternalBeeLangTestLanguage.g:375:5: {...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 2)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 2)");
}
// InternalBeeLangTestLanguage.g:375:101: ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ )
// InternalBeeLangTestLanguage.g:376:6: ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 2);
// InternalBeeLangTestLanguage.g:379:9: ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+
int cnt9 = 0;
loop9: do {
int alt9 = 2;
int LA9_0 = input.LA(1);
if ((LA9_0 == 22)) {
int LA9_2 = input.LA(2);
if (((synpred11_InternalBeeLangTestLanguage() && (true)))) {
alt9 = 1;
}
}
switch(alt9) {
case 1:
// InternalBeeLangTestLanguage.g:379:10: {...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:379:19: (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' )
// InternalBeeLangTestLanguage.g:379:20: otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';'
{
otherlv_20 = (Token) match(input, 22, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_20, grammarAccess.getUnitAccess().getProvidesKeyword_7_2_0());
}
otherlv_21 = (Token) match(input, 19, FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getUnitAccess().getColonKeyword_7_2_1());
}
// InternalBeeLangTestLanguage.g:387:9: ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) )
// InternalBeeLangTestLanguage.g:388:10: (lv_providedCapabilities_22_0= ruleProvidedCapability )
{
// InternalBeeLangTestLanguage.g:388:10: (lv_providedCapabilities_22_0= ruleProvidedCapability )
// InternalBeeLangTestLanguage.g:389:11: lv_providedCapabilities_22_0= ruleProvidedCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getProvidedCapabilitiesProvidedCapabilityParserRuleCall_7_2_2_0());
}
pushFollow(FOLLOW_14);
lv_providedCapabilities_22_0 = ruleProvidedCapability();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "providedCapabilities", lv_providedCapabilities_22_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.ProvidedCapability");
afterParserOrEnumRuleCall();
}
}
}
otherlv_23 = (Token) match(input, 20, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_23, grammarAccess.getUnitAccess().getSemicolonKeyword_7_2_3());
}
}
}
break;
default:
if (cnt9 >= 1)
break loop9;
if (state.backtracking > 0) {
state.failed = true;
return current;
}
EarlyExitException eee = new EarlyExitException(9, input);
throw eee;
}
cnt9++;
} while (true);
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
case 4:
// InternalBeeLangTestLanguage.g:416:4: ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) )
{
// InternalBeeLangTestLanguage.g:416:4: ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) )
// InternalBeeLangTestLanguage.g:417:5: {...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 3)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 3)");
}
// InternalBeeLangTestLanguage.g:417:101: ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ )
// InternalBeeLangTestLanguage.g:418:6: ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 3);
// InternalBeeLangTestLanguage.g:421:9: ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+
int cnt10 = 0;
loop10: do {
int alt10 = 2;
int LA10_0 = input.LA(1);
if ((LA10_0 == 23)) {
int LA10_2 = input.LA(2);
if (((synpred13_InternalBeeLangTestLanguage() && (true)))) {
alt10 = 1;
}
}
switch(alt10) {
case 1:
// InternalBeeLangTestLanguage.g:421:10: {...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:421:19: (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' )
// InternalBeeLangTestLanguage.g:421:20: otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';'
{
otherlv_24 = (Token) match(input, 23, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_24, grammarAccess.getUnitAccess().getRequiresKeyword_7_3_0());
}
otherlv_25 = (Token) match(input, 19, FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_25, grammarAccess.getUnitAccess().getColonKeyword_7_3_1());
}
// InternalBeeLangTestLanguage.g:429:9: ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) )
// InternalBeeLangTestLanguage.g:430:10: (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability )
{
// InternalBeeLangTestLanguage.g:430:10: (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability )
// InternalBeeLangTestLanguage.g:431:11: lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getRequiredCapabilitiesAliasedRequiredCapabilityParserRuleCall_7_3_2_0());
}
pushFollow(FOLLOW_14);
lv_requiredCapabilities_26_0 = ruleAliasedRequiredCapability();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "requiredCapabilities", lv_requiredCapabilities_26_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.AliasedRequiredCapability");
afterParserOrEnumRuleCall();
}
}
}
otherlv_27 = (Token) match(input, 20, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_27, grammarAccess.getUnitAccess().getSemicolonKeyword_7_3_3());
}
}
}
break;
default:
if (cnt10 >= 1)
break loop10;
if (state.backtracking > 0) {
state.failed = true;
return current;
}
EarlyExitException eee = new EarlyExitException(10, input);
throw eee;
}
cnt10++;
} while (true);
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
case 5:
// InternalBeeLangTestLanguage.g:458:4: ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) )
{
// InternalBeeLangTestLanguage.g:458:4: ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) )
// InternalBeeLangTestLanguage.g:459:5: {...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 4)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 4)");
}
// InternalBeeLangTestLanguage.g:459:101: ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ )
// InternalBeeLangTestLanguage.g:460:6: ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 4);
// InternalBeeLangTestLanguage.g:463:9: ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+
int cnt11 = 0;
loop11: do {
int alt11 = 2;
int LA11_0 = input.LA(1);
if ((LA11_0 == 23)) {
int LA11_2 = input.LA(2);
if (((synpred15_InternalBeeLangTestLanguage() && (true)))) {
alt11 = 1;
}
}
switch(alt11) {
case 1:
// InternalBeeLangTestLanguage.g:463:10: {...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:463:19: (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' )
// InternalBeeLangTestLanguage.g:463:20: otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';'
{
otherlv_28 = (Token) match(input, 23, FOLLOW_16);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_28, grammarAccess.getUnitAccess().getRequiresKeyword_7_4_0());
}
otherlv_29 = (Token) match(input, 24, FOLLOW_12);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_29, grammarAccess.getUnitAccess().getEnvKeyword_7_4_1());
}
otherlv_30 = (Token) match(input, 19, FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_30, grammarAccess.getUnitAccess().getColonKeyword_7_4_2());
}
// InternalBeeLangTestLanguage.g:475:9: ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) )
// InternalBeeLangTestLanguage.g:476:10: (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability )
{
// InternalBeeLangTestLanguage.g:476:10: (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability )
// InternalBeeLangTestLanguage.g:477:11: lv_metaRequiredCapabilities_31_0= ruleRequiredCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getMetaRequiredCapabilitiesRequiredCapabilityParserRuleCall_7_4_3_0());
}
pushFollow(FOLLOW_14);
lv_metaRequiredCapabilities_31_0 = ruleRequiredCapability();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "metaRequiredCapabilities", lv_metaRequiredCapabilities_31_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.RequiredCapability");
afterParserOrEnumRuleCall();
}
}
}
otherlv_32 = (Token) match(input, 20, FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_32, grammarAccess.getUnitAccess().getSemicolonKeyword_7_4_4());
}
}
}
break;
default:
if (cnt11 >= 1)
break loop11;
if (state.backtracking > 0) {
state.failed = true;
return current;
}
EarlyExitException eee = new EarlyExitException(11, input);
throw eee;
}
cnt11++;
} while (true);
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
case 6:
// InternalBeeLangTestLanguage.g:504:4: ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) )
{
// InternalBeeLangTestLanguage.g:504:4: ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) )
// InternalBeeLangTestLanguage.g:505:5: {...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ )
{
if (!getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 5)) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "getUnorderedGroupHelper().canSelect(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 5)");
}
// InternalBeeLangTestLanguage.g:505:101: ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ )
// InternalBeeLangTestLanguage.g:506:6: ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 5);
// InternalBeeLangTestLanguage.g:509:9: ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+
int cnt12 = 0;
loop12: do {
int alt12 = 2;
switch(input.LA(1)) {
case RULE_DOCUMENTATION:
{
int LA12_2 = input.LA(2);
if (((synpred17_InternalBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case RULE_ID:
{
int LA12_3 = input.LA(2);
if (((synpred17_InternalBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case 33:
{
int LA12_4 = input.LA(2);
if (((synpred17_InternalBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case 34:
{
int LA12_5 = input.LA(2);
if (((synpred17_InternalBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
}
switch(alt12) {
case 1:
// InternalBeeLangTestLanguage.g:509:10: {...}? => ( (lv_functions_33_0= ruleFunction ) )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalBeeLangTestLanguage.g:509:19: ( (lv_functions_33_0= ruleFunction ) )
// InternalBeeLangTestLanguage.g:509:20: (lv_functions_33_0= ruleFunction )
{
// InternalBeeLangTestLanguage.g:509:20: (lv_functions_33_0= ruleFunction )
// InternalBeeLangTestLanguage.g:510:10: lv_functions_33_0= ruleFunction
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getFunctionsFunctionParserRuleCall_7_5_0());
}
pushFollow(FOLLOW_11);
lv_functions_33_0 = ruleFunction();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getUnitRule());
}
add(current, "functions", lv_functions_33_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Function");
afterParserOrEnumRuleCall();
}
}
}
}
break;
default:
if (cnt12 >= 1)
break loop12;
if (state.backtracking > 0) {
state.failed = true;
return current;
}
EarlyExitException eee = new EarlyExitException(12, input);
throw eee;
}
cnt12++;
} while (true);
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
}
}
break;
default:
break loop13;
}
} while (true);
}
}
getUnorderedGroupHelper().leave(grammarAccess.getUnitAccess().getUnorderedGroup_7());
}
otherlv_34 = (Token) match(input, 25, FOLLOW_2);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_34, grammarAccess.getUnitAccess().getRightCurlyBracketKeyword_8());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
if (state.backtracking > 0) {
memoize(input, 4, ruleUnit_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
Aggregations