Search in sources :

Example 11 with UnorderedGroupState

use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.

the class InternalBeeLangTestLanguageParser method ruleRequiredCapability.

// $ANTLR end "entryRuleRequiredCapability"
// $ANTLR start "ruleRequiredCapability"
// InternalBeeLangTestLanguage.g:1097:1: ruleRequiredCapability returns [EObject current=null] : ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' ) ) ;
public final EObject ruleRequiredCapability() throws RecognitionException {
    EObject current = null;
    int ruleRequiredCapability_StartIndex = input.index();
    Token lv_nameSpace_1_0 = null;
    Token otherlv_2 = null;
    Token lv_name_3_0 = null;
    Token otherlv_4 = null;
    Token otherlv_6 = null;
    Token otherlv_7 = null;
    Token otherlv_9 = null;
    Token lv_greedy_10_0 = null;
    Token otherlv_11 = null;
    Token otherlv_12 = null;
    Token otherlv_13 = null;
    Token lv_min_14_0 = null;
    Token otherlv_15 = null;
    Token otherlv_16 = null;
    Token otherlv_17 = null;
    Token lv_max_18_0 = null;
    Token otherlv_19 = null;
    Token otherlv_20 = null;
    Token otherlv_21 = null;
    Token lv_versionRange_22_0 = null;
    Token otherlv_23 = null;
    Token otherlv_24 = null;
    EObject lv_condExpr_8_0 = null;
    enterRule();
    UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 10)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:1106:2: ( ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' ) ) )
        // InternalBeeLangTestLanguage.g:1107:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' ) )
        {
            // InternalBeeLangTestLanguage.g:1107:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' ) )
            // InternalBeeLangTestLanguage.g:1108:3: () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' )
            {
                // InternalBeeLangTestLanguage.g:1108:3: ()
                // InternalBeeLangTestLanguage.g:1109:4:
                {
                    if (state.backtracking == 0) {
                    /* */
                    }
                    if (state.backtracking == 0) {
                        current = forceCreateModelElement(grammarAccess.getRequiredCapabilityAccess().getRequiredCapabilityAction_0(), current);
                    }
                }
                // InternalBeeLangTestLanguage.g:1118:3: ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= 'unit' )
                int alt20 = 2;
                int LA20_0 = input.LA(1);
                if ((LA20_0 == RULE_ID)) {
                    alt20 = 1;
                } else if ((LA20_0 == 13)) {
                    alt20 = 2;
                } else {
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return current;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 20, 0, input);
                    throw nvae;
                }
                switch(alt20) {
                    case 1:
                        // InternalBeeLangTestLanguage.g:1119:4: ( (lv_nameSpace_1_0= RULE_ID ) )
                        {
                            // InternalBeeLangTestLanguage.g:1119:4: ( (lv_nameSpace_1_0= RULE_ID ) )
                            // InternalBeeLangTestLanguage.g:1120:5: (lv_nameSpace_1_0= RULE_ID )
                            {
                                // InternalBeeLangTestLanguage.g:1120:5: (lv_nameSpace_1_0= RULE_ID )
                                // InternalBeeLangTestLanguage.g:1121:6: lv_nameSpace_1_0= RULE_ID
                                {
                                    lv_nameSpace_1_0 = (Token) match(input, RULE_ID, FOLLOW_8);
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        newLeafNode(lv_nameSpace_1_0, grammarAccess.getRequiredCapabilityAccess().getNameSpaceIDTerminalRuleCall_1_0_0());
                                    }
                                    if (state.backtracking == 0) {
                                        if (current == null) {
                                            current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                                        }
                                        setWithLastConsumed(current, "nameSpace", lv_nameSpace_1_0, "org.eclipse.xtext.common.Terminals.ID");
                                    }
                                }
                            }
                        }
                        break;
                    case 2:
                        // InternalBeeLangTestLanguage.g:1138:4: otherlv_2= 'unit'
                        {
                            otherlv_2 = (Token) match(input, 13, FOLLOW_8);
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                newLeafNode(otherlv_2, grammarAccess.getRequiredCapabilityAccess().getUnitKeyword_1_1());
                            }
                        }
                        break;
                }
                // InternalBeeLangTestLanguage.g:1143:3: ( (lv_name_3_0= RULE_ID ) )
                // InternalBeeLangTestLanguage.g:1144:4: (lv_name_3_0= RULE_ID )
                {
                    // InternalBeeLangTestLanguage.g:1144:4: (lv_name_3_0= RULE_ID )
                    // InternalBeeLangTestLanguage.g:1145:5: lv_name_3_0= RULE_ID
                    {
                        lv_name_3_0 = (Token) match(input, RULE_ID, FOLLOW_22);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            newLeafNode(lv_name_3_0, grammarAccess.getRequiredCapabilityAccess().getNameIDTerminalRuleCall_2_0());
                        }
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                            }
                            setWithLastConsumed(current, "name", lv_name_3_0, "org.eclipse.xtext.common.Terminals.ID");
                        }
                    }
                }
                // InternalBeeLangTestLanguage.g:1161:3: (otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}' )
                // InternalBeeLangTestLanguage.g:1162:4: otherlv_4= '{' ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) ) otherlv_24= '}'
                {
                    otherlv_4 = (Token) match(input, 17, FOLLOW_23);
                    if (state.failed)
                        return current;
                    if (state.backtracking == 0) {
                        newLeafNode(otherlv_4, grammarAccess.getRequiredCapabilityAccess().getLeftCurlyBracketKeyword_3_0());
                    }
                    // InternalBeeLangTestLanguage.g:1166:4: ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) ) )
                    // InternalBeeLangTestLanguage.g:1167:5: ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) )
                    {
                        // InternalBeeLangTestLanguage.g:1167:5: ( ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* ) )
                        // InternalBeeLangTestLanguage.g:1168:6: ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* )
                        {
                            getUnorderedGroupHelper().enter(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                            // InternalBeeLangTestLanguage.g:1171:6: ( ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )* )
                            // InternalBeeLangTestLanguage.g:1172:7: ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )*
                            {
                                // InternalBeeLangTestLanguage.g:1172:7: ( ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) ) )*
                                loop21: do {
                                    int alt21 = 6;
                                    int LA21_0 = input.LA(1);
                                    if (LA21_0 == 26 && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)) {
                                        alt21 = 1;
                                    } else if (LA21_0 == 29 && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)) {
                                        alt21 = 2;
                                    } else if (LA21_0 == 30 && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)) {
                                        alt21 = 3;
                                    } else if (LA21_0 == 31 && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)) {
                                        alt21 = 4;
                                    } else if (LA21_0 == 14 && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)) {
                                        alt21 = 5;
                                    }
                                    switch(alt21) {
                                        case 1:
                                            // InternalBeeLangTestLanguage.g:1173:5: ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) )
                                            {
                                                // InternalBeeLangTestLanguage.g:1173:5: ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) )
                                                // InternalBeeLangTestLanguage.g:1174:6: {...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) )
                                                {
                                                    if (!getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)) {
                                                        if (state.backtracking > 0) {
                                                            state.failed = true;
                                                            return current;
                                                        }
                                                        throw new FailedPredicateException(input, "ruleRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)");
                                                    }
                                                    // InternalBeeLangTestLanguage.g:1174:118: ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) )
                                                    // InternalBeeLangTestLanguage.g:1175:7: ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) )
                                                    {
                                                        getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0);
                                                        // InternalBeeLangTestLanguage.g:1178:10: ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) )
                                                        // InternalBeeLangTestLanguage.g:1178:11: {...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' )
                                                        {
                                                            if (!((true))) {
                                                                if (state.backtracking > 0) {
                                                                    state.failed = true;
                                                                    return current;
                                                                }
                                                                throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
                                                            }
                                                            // InternalBeeLangTestLanguage.g:1178:20: (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' )
                                                            // InternalBeeLangTestLanguage.g:1178:21: otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';'
                                                            {
                                                                otherlv_6 = (Token) match(input, 26, FOLLOW_12);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_6, grammarAccess.getRequiredCapabilityAccess().getWhenKeyword_3_1_0_0());
                                                                }
                                                                otherlv_7 = (Token) match(input, 19, FOLLOW_19);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_7, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_0_1());
                                                                }
                                                                // InternalBeeLangTestLanguage.g:1186:10: ( (lv_condExpr_8_0= ruleExpression ) )
                                                                // InternalBeeLangTestLanguage.g:1187:11: (lv_condExpr_8_0= ruleExpression )
                                                                {
                                                                    // InternalBeeLangTestLanguage.g:1187:11: (lv_condExpr_8_0= ruleExpression )
                                                                    // InternalBeeLangTestLanguage.g:1188:12: lv_condExpr_8_0= ruleExpression
                                                                    {
                                                                        if (state.backtracking == 0) {
                                                                            newCompositeNode(grammarAccess.getRequiredCapabilityAccess().getCondExprExpressionParserRuleCall_3_1_0_2_0());
                                                                        }
                                                                        pushFollow(FOLLOW_14);
                                                                        lv_condExpr_8_0 = ruleExpression();
                                                                        state._fsp--;
                                                                        if (state.failed)
                                                                            return current;
                                                                        if (state.backtracking == 0) {
                                                                            if (current == null) {
                                                                                current = createModelElementForParent(grammarAccess.getRequiredCapabilityRule());
                                                                            }
                                                                            set(current, "condExpr", lv_condExpr_8_0, "org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage.Expression");
                                                                            afterParserOrEnumRuleCall();
                                                                        }
                                                                    }
                                                                }
                                                                otherlv_9 = (Token) match(input, 20, FOLLOW_23);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_9, grammarAccess.getRequiredCapabilityAccess().getSemicolonKeyword_3_1_0_3());
                                                                }
                                                            }
                                                        }
                                                        getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                                                    }
                                                }
                                            }
                                            break;
                                        case 2:
                                            // InternalBeeLangTestLanguage.g:1215:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) )
                                            {
                                                // InternalBeeLangTestLanguage.g:1215:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) )
                                                // InternalBeeLangTestLanguage.g:1216:6: {...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) )
                                                {
                                                    if (!getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)) {
                                                        if (state.backtracking > 0) {
                                                            state.failed = true;
                                                            return current;
                                                        }
                                                        throw new FailedPredicateException(input, "ruleRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)");
                                                    }
                                                    // InternalBeeLangTestLanguage.g:1216:118: ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) )
                                                    // InternalBeeLangTestLanguage.g:1217:7: ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) )
                                                    {
                                                        getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1);
                                                        // InternalBeeLangTestLanguage.g:1220:10: ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) )
                                                        // InternalBeeLangTestLanguage.g:1220:11: {...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' )
                                                        {
                                                            if (!((true))) {
                                                                if (state.backtracking > 0) {
                                                                    state.failed = true;
                                                                    return current;
                                                                }
                                                                throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
                                                            }
                                                            // InternalBeeLangTestLanguage.g:1220:20: ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' )
                                                            // InternalBeeLangTestLanguage.g:1220:21: ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';'
                                                            {
                                                                // InternalBeeLangTestLanguage.g:1220:21: ( (lv_greedy_10_0= 'greedy' ) )
                                                                // InternalBeeLangTestLanguage.g:1221:11: (lv_greedy_10_0= 'greedy' )
                                                                {
                                                                    // InternalBeeLangTestLanguage.g:1221:11: (lv_greedy_10_0= 'greedy' )
                                                                    // InternalBeeLangTestLanguage.g:1222:12: lv_greedy_10_0= 'greedy'
                                                                    {
                                                                        lv_greedy_10_0 = (Token) match(input, 29, FOLLOW_14);
                                                                        if (state.failed)
                                                                            return current;
                                                                        if (state.backtracking == 0) {
                                                                            newLeafNode(lv_greedy_10_0, grammarAccess.getRequiredCapabilityAccess().getGreedyGreedyKeyword_3_1_1_0_0());
                                                                        }
                                                                        if (state.backtracking == 0) {
                                                                            if (current == null) {
                                                                                current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                                                                            }
                                                                            setWithLastConsumed(current, "greedy", true, "greedy");
                                                                        }
                                                                    }
                                                                }
                                                                otherlv_11 = (Token) match(input, 20, FOLLOW_23);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_11, grammarAccess.getRequiredCapabilityAccess().getSemicolonKeyword_3_1_1_1());
                                                                }
                                                            }
                                                        }
                                                        getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                                                    }
                                                }
                                            }
                                            break;
                                        case 3:
                                            // InternalBeeLangTestLanguage.g:1244:5: ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) )
                                            {
                                                // InternalBeeLangTestLanguage.g:1244:5: ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) )
                                                // InternalBeeLangTestLanguage.g:1245:6: {...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) )
                                                {
                                                    if (!getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)) {
                                                        if (state.backtracking > 0) {
                                                            state.failed = true;
                                                            return current;
                                                        }
                                                        throw new FailedPredicateException(input, "ruleRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)");
                                                    }
                                                    // InternalBeeLangTestLanguage.g:1245:118: ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) )
                                                    // InternalBeeLangTestLanguage.g:1246:7: ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) )
                                                    {
                                                        getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2);
                                                        // InternalBeeLangTestLanguage.g:1249:10: ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) )
                                                        // InternalBeeLangTestLanguage.g:1249:11: {...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' )
                                                        {
                                                            if (!((true))) {
                                                                if (state.backtracking > 0) {
                                                                    state.failed = true;
                                                                    return current;
                                                                }
                                                                throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
                                                            }
                                                            // InternalBeeLangTestLanguage.g:1249:20: (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' )
                                                            // InternalBeeLangTestLanguage.g:1249:21: otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';'
                                                            {
                                                                otherlv_12 = (Token) match(input, 30, FOLLOW_12);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_12, grammarAccess.getRequiredCapabilityAccess().getRequiresMinKeyword_3_1_2_0());
                                                                }
                                                                otherlv_13 = (Token) match(input, 19, FOLLOW_24);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_13, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_2_1());
                                                                }
                                                                // InternalBeeLangTestLanguage.g:1257:10: ( (lv_min_14_0= RULE_INT ) )
                                                                // InternalBeeLangTestLanguage.g:1258:11: (lv_min_14_0= RULE_INT )
                                                                {
                                                                    // InternalBeeLangTestLanguage.g:1258:11: (lv_min_14_0= RULE_INT )
                                                                    // InternalBeeLangTestLanguage.g:1259:12: lv_min_14_0= RULE_INT
                                                                    {
                                                                        lv_min_14_0 = (Token) match(input, RULE_INT, FOLLOW_14);
                                                                        if (state.failed)
                                                                            return current;
                                                                        if (state.backtracking == 0) {
                                                                            newLeafNode(lv_min_14_0, grammarAccess.getRequiredCapabilityAccess().getMinINTTerminalRuleCall_3_1_2_2_0());
                                                                        }
                                                                        if (state.backtracking == 0) {
                                                                            if (current == null) {
                                                                                current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                                                                            }
                                                                            setWithLastConsumed(current, "min", lv_min_14_0, "org.eclipse.xtext.common.Terminals.INT");
                                                                        }
                                                                    }
                                                                }
                                                                otherlv_15 = (Token) match(input, 20, FOLLOW_23);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_15, grammarAccess.getRequiredCapabilityAccess().getSemicolonKeyword_3_1_2_3());
                                                                }
                                                            }
                                                        }
                                                        getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                                                    }
                                                }
                                            }
                                            break;
                                        case 4:
                                            // InternalBeeLangTestLanguage.g:1285:5: ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) )
                                            {
                                                // InternalBeeLangTestLanguage.g:1285:5: ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) )
                                                // InternalBeeLangTestLanguage.g:1286:6: {...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) )
                                                {
                                                    if (!getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)) {
                                                        if (state.backtracking > 0) {
                                                            state.failed = true;
                                                            return current;
                                                        }
                                                        throw new FailedPredicateException(input, "ruleRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)");
                                                    }
                                                    // InternalBeeLangTestLanguage.g:1286:118: ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) )
                                                    // InternalBeeLangTestLanguage.g:1287:7: ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) )
                                                    {
                                                        getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3);
                                                        // InternalBeeLangTestLanguage.g:1290:10: ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) )
                                                        // InternalBeeLangTestLanguage.g:1290:11: {...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' )
                                                        {
                                                            if (!((true))) {
                                                                if (state.backtracking > 0) {
                                                                    state.failed = true;
                                                                    return current;
                                                                }
                                                                throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
                                                            }
                                                            // InternalBeeLangTestLanguage.g:1290:20: (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' )
                                                            // InternalBeeLangTestLanguage.g:1290:21: otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';'
                                                            {
                                                                otherlv_16 = (Token) match(input, 31, FOLLOW_12);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_16, grammarAccess.getRequiredCapabilityAccess().getRequiresMaxKeyword_3_1_3_0());
                                                                }
                                                                otherlv_17 = (Token) match(input, 19, FOLLOW_24);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_17, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_3_1());
                                                                }
                                                                // InternalBeeLangTestLanguage.g:1298:10: ( (lv_max_18_0= RULE_INT ) )
                                                                // InternalBeeLangTestLanguage.g:1299:11: (lv_max_18_0= RULE_INT )
                                                                {
                                                                    // InternalBeeLangTestLanguage.g:1299:11: (lv_max_18_0= RULE_INT )
                                                                    // InternalBeeLangTestLanguage.g:1300:12: lv_max_18_0= RULE_INT
                                                                    {
                                                                        lv_max_18_0 = (Token) match(input, RULE_INT, FOLLOW_14);
                                                                        if (state.failed)
                                                                            return current;
                                                                        if (state.backtracking == 0) {
                                                                            newLeafNode(lv_max_18_0, grammarAccess.getRequiredCapabilityAccess().getMaxINTTerminalRuleCall_3_1_3_2_0());
                                                                        }
                                                                        if (state.backtracking == 0) {
                                                                            if (current == null) {
                                                                                current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                                                                            }
                                                                            setWithLastConsumed(current, "max", lv_max_18_0, "org.eclipse.xtext.common.Terminals.INT");
                                                                        }
                                                                    }
                                                                }
                                                                otherlv_19 = (Token) match(input, 20, FOLLOW_23);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_19, grammarAccess.getRequiredCapabilityAccess().getSemicolonKeyword_3_1_3_3());
                                                                }
                                                            }
                                                        }
                                                        getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                                                    }
                                                }
                                            }
                                            break;
                                        case 5:
                                            // InternalBeeLangTestLanguage.g:1326:5: ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) )
                                            {
                                                // InternalBeeLangTestLanguage.g:1326:5: ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) )
                                                // InternalBeeLangTestLanguage.g:1327:6: {...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) )
                                                {
                                                    if (!getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)) {
                                                        if (state.backtracking > 0) {
                                                            state.failed = true;
                                                            return current;
                                                        }
                                                        throw new FailedPredicateException(input, "ruleRequiredCapability", "getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)");
                                                    }
                                                    // InternalBeeLangTestLanguage.g:1327:118: ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) )
                                                    // InternalBeeLangTestLanguage.g:1328:7: ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) )
                                                    {
                                                        getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4);
                                                        // InternalBeeLangTestLanguage.g:1331:10: ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) )
                                                        // InternalBeeLangTestLanguage.g:1331:11: {...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' )
                                                        {
                                                            if (!((true))) {
                                                                if (state.backtracking > 0) {
                                                                    state.failed = true;
                                                                    return current;
                                                                }
                                                                throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
                                                            }
                                                            // InternalBeeLangTestLanguage.g:1331:20: (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' )
                                                            // InternalBeeLangTestLanguage.g:1331:21: otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';'
                                                            {
                                                                otherlv_20 = (Token) match(input, 14, FOLLOW_12);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_20, grammarAccess.getRequiredCapabilityAccess().getVersionKeyword_3_1_4_0());
                                                                }
                                                                otherlv_21 = (Token) match(input, 19, FOLLOW_8);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_21, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_4_1());
                                                                }
                                                                // InternalBeeLangTestLanguage.g:1339:10: ( (lv_versionRange_22_0= RULE_ID ) )
                                                                // InternalBeeLangTestLanguage.g:1340:11: (lv_versionRange_22_0= RULE_ID )
                                                                {
                                                                    // InternalBeeLangTestLanguage.g:1340:11: (lv_versionRange_22_0= RULE_ID )
                                                                    // InternalBeeLangTestLanguage.g:1341:12: lv_versionRange_22_0= RULE_ID
                                                                    {
                                                                        lv_versionRange_22_0 = (Token) match(input, RULE_ID, FOLLOW_14);
                                                                        if (state.failed)
                                                                            return current;
                                                                        if (state.backtracking == 0) {
                                                                            newLeafNode(lv_versionRange_22_0, grammarAccess.getRequiredCapabilityAccess().getVersionRangeIDTerminalRuleCall_3_1_4_2_0());
                                                                        }
                                                                        if (state.backtracking == 0) {
                                                                            if (current == null) {
                                                                                current = createModelElement(grammarAccess.getRequiredCapabilityRule());
                                                                            }
                                                                            setWithLastConsumed(current, "versionRange", lv_versionRange_22_0, "org.eclipse.xtext.common.Terminals.ID");
                                                                        }
                                                                    }
                                                                }
                                                                otherlv_23 = (Token) match(input, 20, FOLLOW_23);
                                                                if (state.failed)
                                                                    return current;
                                                                if (state.backtracking == 0) {
                                                                    newLeafNode(otherlv_23, grammarAccess.getRequiredCapabilityAccess().getSemicolonKeyword_3_1_4_3());
                                                                }
                                                            }
                                                        }
                                                        getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                                                    }
                                                }
                                            }
                                            break;
                                        default:
                                            break loop21;
                                    }
                                } while (true);
                            }
                        }
                        getUnorderedGroupHelper().leave(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
                    }
                    otherlv_24 = (Token) match(input, 25, FOLLOW_2);
                    if (state.failed)
                        return current;
                    if (state.backtracking == 0) {
                        newLeafNode(otherlv_24, grammarAccess.getRequiredCapabilityAccess().getRightCurlyBracketKeyword_3_2());
                    }
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 10, ruleRequiredCapability_StartIndex);
        }
        myUnorderedGroupState.restore();
    }
    return current;
}
Also used : UnorderedGroupState(org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 12 with UnorderedGroupState

use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.

the class InternalBeeLangTestLanguageParser method entryRuleUnit.

// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleUnit"
// InternalBeeLangTestLanguage.g:130:1: entryRuleUnit returns [EObject current=null] : iv_ruleUnit= ruleUnit EOF ;
public final EObject entryRuleUnit() throws RecognitionException {
    EObject current = null;
    int entryRuleUnit_StartIndex = input.index();
    EObject iv_ruleUnit = null;
    UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getUnitAccess().getUnorderedGroup_7());
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 3)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:134:2: (iv_ruleUnit= ruleUnit EOF )
        // InternalBeeLangTestLanguage.g:135:2: iv_ruleUnit= ruleUnit EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getUnitRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleUnit = ruleUnit();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleUnit;
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 3, entryRuleUnit_StartIndex);
        }
        myUnorderedGroupState.restore();
    }
    return current;
}
Also used : UnorderedGroupState(org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState) EObject(org.eclipse.emf.ecore.EObject)

Example 13 with UnorderedGroupState

use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.

the class InternalBeeLangTestLanguageParser method entryRuleRequiredCapability.

// $ANTLR end "ruleAliasedRequiredCapability"
// $ANTLR start "entryRuleRequiredCapability"
// InternalBeeLangTestLanguage.g:1083:1: entryRuleRequiredCapability returns [EObject current=null] : iv_ruleRequiredCapability= ruleRequiredCapability EOF ;
public final EObject entryRuleRequiredCapability() throws RecognitionException {
    EObject current = null;
    int entryRuleRequiredCapability_StartIndex = input.index();
    EObject iv_ruleRequiredCapability = null;
    UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 9)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:1087:2: (iv_ruleRequiredCapability= ruleRequiredCapability EOF )
        // InternalBeeLangTestLanguage.g:1088:2: iv_ruleRequiredCapability= ruleRequiredCapability EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getRequiredCapabilityRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleRequiredCapability = ruleRequiredCapability();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleRequiredCapability;
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 9, entryRuleRequiredCapability_StartIndex);
        }
        myUnorderedGroupState.restore();
    }
    return current;
}
Also used : UnorderedGroupState(org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState) EObject(org.eclipse.emf.ecore.EObject)

Example 14 with UnorderedGroupState

use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.

the class InternalBeeLangTestLanguageParser method entryRuleAliasedRequiredCapability.

// $ANTLR end "ruleProvidedCapability"
// $ANTLR start "entryRuleAliasedRequiredCapability"
// InternalBeeLangTestLanguage.g:766: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, 7)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:770:2: (iv_ruleAliasedRequiredCapability= ruleAliasedRequiredCapability EOF )
        // InternalBeeLangTestLanguage.g:771:2: iv_ruleAliasedRequiredCapability= ruleAliasedRequiredCapability EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getAliasedRequiredCapabilityRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleAliasedRequiredCapability = ruleAliasedRequiredCapability();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleAliasedRequiredCapability;
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 7, entryRuleAliasedRequiredCapability_StartIndex);
        }
        myUnorderedGroupState.restore();
    }
    return current;
}
Also used : UnorderedGroupState(org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState) EObject(org.eclipse.emf.ecore.EObject)

Example 15 with UnorderedGroupState

use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.

the class InternalSimpleBeeLangTestLanguageParser method entryRuleUnit.

// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleUnit"
// InternalSimpleBeeLangTestLanguage.g:158:1: entryRuleUnit returns [EObject current=null] : iv_ruleUnit= ruleUnit EOF ;
public final EObject entryRuleUnit() throws RecognitionException {
    EObject current = null;
    int entryRuleUnit_StartIndex = input.index();
    EObject iv_ruleUnit = null;
    UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getUnitAccess().getUnorderedGroup_7());
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 5)) {
            return current;
        }
        // InternalSimpleBeeLangTestLanguage.g:162:2: (iv_ruleUnit= ruleUnit EOF )
        // InternalSimpleBeeLangTestLanguage.g:163:2: iv_ruleUnit= ruleUnit EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getUnitRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleUnit = ruleUnit();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleUnit;
            }
            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, 5, entryRuleUnit_StartIndex);
        }
        myUnorderedGroupState.restore();
    }
    return current;
}
Also used : UnorderedGroupState(org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState) EObject(org.eclipse.emf.ecore.EObject)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)30 UnorderedGroupState (org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState)30 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)15