use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalExBacktrackingBug325745TestLanguageParser method entryRuleExpression.
// $ANTLR end "ruleDataType"
// $ANTLR start "entryRuleExpression"
// InternalExBacktrackingBug325745TestLanguage.g:287:1: entryRuleExpression returns [EObject current=null] : iv_ruleExpression= ruleExpression EOF ;
public final EObject entryRuleExpression() throws RecognitionException {
EObject current = null;
EObject iv_ruleExpression = null;
UnorderedGroupState myUnorderedGroupState = getUnorderedGroupHelper().snapShot(grammarAccess.getExpressionAccess().getUnorderedGroup_1(), grammarAccess.getExpressionAccess().getUnorderedGroup_3());
try {
// InternalExBacktrackingBug325745TestLanguage.g:292:2: (iv_ruleExpression= ruleExpression EOF )
// InternalExBacktrackingBug325745TestLanguage.g:293:2: iv_ruleExpression= ruleExpression EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getExpressionRule());
}
pushFollow(FollowSets000.FOLLOW_1);
iv_ruleExpression = ruleExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleExpression;
}
match(input, EOF, FollowSets000.FOLLOW_2);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalSimpleBeeLangTestLanguageParser method ruleUnit.
// $ANTLR end "entryRuleUnit"
// $ANTLR start "ruleUnit"
// InternalSimpleBeeLangTestLanguage.g:172: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, 6)) {
return current;
}
// InternalSimpleBeeLangTestLanguage.g:181: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= '}' ) )
// InternalSimpleBeeLangTestLanguage.g:182: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= '}' )
{
// InternalSimpleBeeLangTestLanguage.g:182: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= '}' )
// InternalSimpleBeeLangTestLanguage.g:183: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= '}'
{
// InternalSimpleBeeLangTestLanguage.g:183:3: ()
// InternalSimpleBeeLangTestLanguage.g:184:4:
{
if (state.backtracking == 0) {
/* */
}
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getUnitAccess().getUnitAction_0(), current);
}
}
// InternalSimpleBeeLangTestLanguage.g:193: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:
// InternalSimpleBeeLangTestLanguage.g:194:4: (lv_documentation_1_0= RULE_DOCUMENTATION )
{
// InternalSimpleBeeLangTestLanguage.g:194:4: (lv_documentation_1_0= RULE_DOCUMENTATION )
// InternalSimpleBeeLangTestLanguage.g:195:5: lv_documentation_1_0= RULE_DOCUMENTATION
{
lv_documentation_1_0 = (Token) match(input, RULE_DOCUMENTATION, FollowSets000.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, FollowSets000.FOLLOW_6);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getUnitAccess().getUnitKeyword_2());
}
// InternalSimpleBeeLangTestLanguage.g:215: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:
// InternalSimpleBeeLangTestLanguage.g:216:4: (lv_name_3_0= RULE_ID )
{
// InternalSimpleBeeLangTestLanguage.g:216:4: (lv_name_3_0= RULE_ID )
// InternalSimpleBeeLangTestLanguage.g:217:5: lv_name_3_0= RULE_ID
{
lv_name_3_0 = (Token) match(input, RULE_ID, FollowSets000.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;
}
// InternalSimpleBeeLangTestLanguage.g:233: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:
// InternalSimpleBeeLangTestLanguage.g:234:4: otherlv_4= 'version' ( (lv_version_5_0= RULE_ID ) )
{
otherlv_4 = (Token) match(input, 14, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getUnitAccess().getVersionKeyword_4_0());
}
// InternalSimpleBeeLangTestLanguage.g:238:4: ( (lv_version_5_0= RULE_ID ) )
// InternalSimpleBeeLangTestLanguage.g:239:5: (lv_version_5_0= RULE_ID )
{
// InternalSimpleBeeLangTestLanguage.g:239:5: (lv_version_5_0= RULE_ID )
// InternalSimpleBeeLangTestLanguage.g:240:6: lv_version_5_0= RULE_ID
{
lv_version_5_0 = (Token) match(input, RULE_ID, FollowSets000.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;
}
// InternalSimpleBeeLangTestLanguage.g:257: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:
// InternalSimpleBeeLangTestLanguage.g:258:4: otherlv_6= 'implements' ( (lv_implements_7_0= ruleSimpleTypeRef ) ) (otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) ) )*
{
otherlv_6 = (Token) match(input, 15, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getUnitAccess().getImplementsKeyword_5_0());
}
// InternalSimpleBeeLangTestLanguage.g:262:4: ( (lv_implements_7_0= ruleSimpleTypeRef ) )
// InternalSimpleBeeLangTestLanguage.g:263:5: (lv_implements_7_0= ruleSimpleTypeRef )
{
// InternalSimpleBeeLangTestLanguage.g:263:5: (lv_implements_7_0= ruleSimpleTypeRef )
// InternalSimpleBeeLangTestLanguage.g:264:6: lv_implements_7_0= ruleSimpleTypeRef
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getImplementsSimpleTypeRefParserRuleCall_5_1_0());
}
pushFollow(FollowSets000.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();
}
}
}
// InternalSimpleBeeLangTestLanguage.g:281: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:
// InternalSimpleBeeLangTestLanguage.g:282:5: otherlv_8= ',' ( (lv_implements_9_0= ruleSimpleTypeRef ) )
{
otherlv_8 = (Token) match(input, 16, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getUnitAccess().getCommaKeyword_5_2_0());
}
// InternalSimpleBeeLangTestLanguage.g:286:5: ( (lv_implements_9_0= ruleSimpleTypeRef ) )
// InternalSimpleBeeLangTestLanguage.g:287:6: (lv_implements_9_0= ruleSimpleTypeRef )
{
// InternalSimpleBeeLangTestLanguage.g:287:6: (lv_implements_9_0= ruleSimpleTypeRef )
// InternalSimpleBeeLangTestLanguage.g:288:7: lv_implements_9_0= ruleSimpleTypeRef
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getImplementsSimpleTypeRefParserRuleCall_5_2_1_0());
}
pushFollow(FollowSets000.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, FollowSets000.FOLLOW_11);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getUnitAccess().getLeftCurlyBracketKeyword_6());
}
// InternalSimpleBeeLangTestLanguage.g:311: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 ) ) )+ ) ) )* ) ) )
// InternalSimpleBeeLangTestLanguage.g:312: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 ) ) )+ ) ) )* ) )
{
// InternalSimpleBeeLangTestLanguage.g:312: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 ) ) )+ ) ) )* ) )
// InternalSimpleBeeLangTestLanguage.g:313: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());
// InternalSimpleBeeLangTestLanguage.g:316: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 ) ) )+ ) ) )* )
// InternalSimpleBeeLangTestLanguage.g:317: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 ) ) )+ ) ) )*
{
// InternalSimpleBeeLangTestLanguage.g:317: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:
// InternalSimpleBeeLangTestLanguage.g:318:4: ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:318:4: ({...}? => ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:319: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)");
}
// InternalSimpleBeeLangTestLanguage.g:319:101: ( ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:320:6: ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 0);
// InternalSimpleBeeLangTestLanguage.g:323:9: ({...}? => (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:323: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");
}
// InternalSimpleBeeLangTestLanguage.g:323:19: (otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';' )
// InternalSimpleBeeLangTestLanguage.g:323:20: otherlv_12= 'source' otherlv_13= ':' ( (lv_sourceLocation_14_0= rulePath ) ) otherlv_15= ';'
{
otherlv_12 = (Token) match(input, 18, FollowSets000.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, FollowSets000.FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getUnitAccess().getColonKeyword_7_0_1());
}
// InternalSimpleBeeLangTestLanguage.g:331:9: ( (lv_sourceLocation_14_0= rulePath ) )
// InternalSimpleBeeLangTestLanguage.g:332:10: (lv_sourceLocation_14_0= rulePath )
{
// InternalSimpleBeeLangTestLanguage.g:332:10: (lv_sourceLocation_14_0= rulePath )
// InternalSimpleBeeLangTestLanguage.g:333:11: lv_sourceLocation_14_0= rulePath
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getSourceLocationPathParserRuleCall_7_0_2_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:360:4: ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:360:4: ({...}? => ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:361: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)");
}
// InternalSimpleBeeLangTestLanguage.g:361:101: ( ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:362:6: ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 1);
// InternalSimpleBeeLangTestLanguage.g:365:9: ({...}? => (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:365: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");
}
// InternalSimpleBeeLangTestLanguage.g:365:19: (otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';' )
// InternalSimpleBeeLangTestLanguage.g:365:20: otherlv_16= 'output' otherlv_17= ':' ( (lv_outputLocation_18_0= rulePath ) ) otherlv_19= ';'
{
otherlv_16 = (Token) match(input, 21, FollowSets000.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, FollowSets000.FOLLOW_13);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getUnitAccess().getColonKeyword_7_1_1());
}
// InternalSimpleBeeLangTestLanguage.g:373:9: ( (lv_outputLocation_18_0= rulePath ) )
// InternalSimpleBeeLangTestLanguage.g:374:10: (lv_outputLocation_18_0= rulePath )
{
// InternalSimpleBeeLangTestLanguage.g:374:10: (lv_outputLocation_18_0= rulePath )
// InternalSimpleBeeLangTestLanguage.g:375:11: lv_outputLocation_18_0= rulePath
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getOutputLocationPathParserRuleCall_7_1_2_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:402:4: ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) )
{
// InternalSimpleBeeLangTestLanguage.g:402:4: ({...}? => ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ ) )
// InternalSimpleBeeLangTestLanguage.g:403: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)");
}
// InternalSimpleBeeLangTestLanguage.g:403:101: ( ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+ )
// InternalSimpleBeeLangTestLanguage.g:404:6: ({...}? => (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 2);
// InternalSimpleBeeLangTestLanguage.g:407: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_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt9 = 1;
}
}
switch(alt9) {
case 1:
// InternalSimpleBeeLangTestLanguage.g:407: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");
}
// InternalSimpleBeeLangTestLanguage.g:407:19: (otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';' )
// InternalSimpleBeeLangTestLanguage.g:407:20: otherlv_20= 'provides' otherlv_21= ':' ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) ) otherlv_23= ';'
{
otherlv_20 = (Token) match(input, 22, FollowSets000.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, FollowSets000.FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getUnitAccess().getColonKeyword_7_2_1());
}
// InternalSimpleBeeLangTestLanguage.g:415:9: ( (lv_providedCapabilities_22_0= ruleProvidedCapability ) )
// InternalSimpleBeeLangTestLanguage.g:416:10: (lv_providedCapabilities_22_0= ruleProvidedCapability )
{
// InternalSimpleBeeLangTestLanguage.g:416:10: (lv_providedCapabilities_22_0= ruleProvidedCapability )
// InternalSimpleBeeLangTestLanguage.g:417:11: lv_providedCapabilities_22_0= ruleProvidedCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getProvidedCapabilitiesProvidedCapabilityParserRuleCall_7_2_2_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:444:4: ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) )
{
// InternalSimpleBeeLangTestLanguage.g:444:4: ({...}? => ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ ) )
// InternalSimpleBeeLangTestLanguage.g:445: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)");
}
// InternalSimpleBeeLangTestLanguage.g:445:101: ( ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+ )
// InternalSimpleBeeLangTestLanguage.g:446:6: ({...}? => (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 3);
// InternalSimpleBeeLangTestLanguage.g:449: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_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt10 = 1;
}
}
switch(alt10) {
case 1:
// InternalSimpleBeeLangTestLanguage.g:449: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");
}
// InternalSimpleBeeLangTestLanguage.g:449:19: (otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';' )
// InternalSimpleBeeLangTestLanguage.g:449:20: otherlv_24= 'requires' otherlv_25= ':' ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) ) otherlv_27= ';'
{
otherlv_24 = (Token) match(input, 23, FollowSets000.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, FollowSets000.FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_25, grammarAccess.getUnitAccess().getColonKeyword_7_3_1());
}
// InternalSimpleBeeLangTestLanguage.g:457:9: ( (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability ) )
// InternalSimpleBeeLangTestLanguage.g:458:10: (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability )
{
// InternalSimpleBeeLangTestLanguage.g:458:10: (lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability )
// InternalSimpleBeeLangTestLanguage.g:459:11: lv_requiredCapabilities_26_0= ruleAliasedRequiredCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getRequiredCapabilitiesAliasedRequiredCapabilityParserRuleCall_7_3_2_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:486:4: ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) )
{
// InternalSimpleBeeLangTestLanguage.g:486:4: ({...}? => ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ ) )
// InternalSimpleBeeLangTestLanguage.g:487: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)");
}
// InternalSimpleBeeLangTestLanguage.g:487:101: ( ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+ )
// InternalSimpleBeeLangTestLanguage.g:488:6: ({...}? => (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 4);
// InternalSimpleBeeLangTestLanguage.g:491: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_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt11 = 1;
}
}
switch(alt11) {
case 1:
// InternalSimpleBeeLangTestLanguage.g:491: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");
}
// InternalSimpleBeeLangTestLanguage.g:491:19: (otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';' )
// InternalSimpleBeeLangTestLanguage.g:491:20: otherlv_28= 'requires' otherlv_29= 'env' otherlv_30= ':' ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) ) otherlv_32= ';'
{
otherlv_28 = (Token) match(input, 23, FollowSets000.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, FollowSets000.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, FollowSets000.FOLLOW_15);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_30, grammarAccess.getUnitAccess().getColonKeyword_7_4_2());
}
// InternalSimpleBeeLangTestLanguage.g:503:9: ( (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability ) )
// InternalSimpleBeeLangTestLanguage.g:504:10: (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability )
{
// InternalSimpleBeeLangTestLanguage.g:504:10: (lv_metaRequiredCapabilities_31_0= ruleRequiredCapability )
// InternalSimpleBeeLangTestLanguage.g:505:11: lv_metaRequiredCapabilities_31_0= ruleRequiredCapability
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getMetaRequiredCapabilitiesRequiredCapabilityParserRuleCall_7_4_3_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:532:4: ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) )
{
// InternalSimpleBeeLangTestLanguage.g:532:4: ({...}? => ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ ) )
// InternalSimpleBeeLangTestLanguage.g:533: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)");
}
// InternalSimpleBeeLangTestLanguage.g:533:101: ( ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+ )
// InternalSimpleBeeLangTestLanguage.g:534:6: ({...}? => ( (lv_functions_33_0= ruleFunction ) ) )+
{
getUnorderedGroupHelper().select(grammarAccess.getUnitAccess().getUnorderedGroup_7(), 5);
// InternalSimpleBeeLangTestLanguage.g:537: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_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case RULE_ID:
{
int LA12_3 = input.LA(2);
if (((synpred17_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case 33:
{
int LA12_4 = input.LA(2);
if (((synpred17_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
case 34:
{
int LA12_5 = input.LA(2);
if (((synpred17_InternalSimpleBeeLangTestLanguage() && (true)))) {
alt12 = 1;
}
}
break;
}
switch(alt12) {
case 1:
// InternalSimpleBeeLangTestLanguage.g:537:10: {...}? => ( (lv_functions_33_0= ruleFunction ) )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleUnit", "true");
}
// InternalSimpleBeeLangTestLanguage.g:537:19: ( (lv_functions_33_0= ruleFunction ) )
// InternalSimpleBeeLangTestLanguage.g:537:20: (lv_functions_33_0= ruleFunction )
{
// InternalSimpleBeeLangTestLanguage.g:537:20: (lv_functions_33_0= ruleFunction )
// InternalSimpleBeeLangTestLanguage.g:538:10: lv_functions_33_0= ruleFunction
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getUnitAccess().getFunctionsFunctionParserRuleCall_7_5_0());
}
pushFollow(FollowSets000.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, FollowSets000.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, 6, ruleUnit_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalSimpleBeeLangTestLanguageParser method ruleRequiredCapability.
// $ANTLR end "entryRuleRequiredCapability"
// $ANTLR start "ruleRequiredCapability"
// InternalSimpleBeeLangTestLanguage.g:1125: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, 12)) {
return current;
}
// InternalSimpleBeeLangTestLanguage.g:1134: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= '}' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1135: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= '}' ) )
{
// InternalSimpleBeeLangTestLanguage.g:1135: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= '}' ) )
// InternalSimpleBeeLangTestLanguage.g:1136: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= '}' )
{
// InternalSimpleBeeLangTestLanguage.g:1136:3: ()
// InternalSimpleBeeLangTestLanguage.g:1137:4:
{
if (state.backtracking == 0) {
/* */
}
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getRequiredCapabilityAccess().getRequiredCapabilityAction_0(), current);
}
}
// InternalSimpleBeeLangTestLanguage.g:1146: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:
// InternalSimpleBeeLangTestLanguage.g:1147:4: ( (lv_nameSpace_1_0= RULE_ID ) )
{
// InternalSimpleBeeLangTestLanguage.g:1147:4: ( (lv_nameSpace_1_0= RULE_ID ) )
// InternalSimpleBeeLangTestLanguage.g:1148:5: (lv_nameSpace_1_0= RULE_ID )
{
// InternalSimpleBeeLangTestLanguage.g:1148:5: (lv_nameSpace_1_0= RULE_ID )
// InternalSimpleBeeLangTestLanguage.g:1149:6: lv_nameSpace_1_0= RULE_ID
{
lv_nameSpace_1_0 = (Token) match(input, RULE_ID, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:1166:4: otherlv_2= 'unit'
{
otherlv_2 = (Token) match(input, 13, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getRequiredCapabilityAccess().getUnitKeyword_1_1());
}
}
break;
}
// InternalSimpleBeeLangTestLanguage.g:1171:3: ( (lv_name_3_0= RULE_ID ) )
// InternalSimpleBeeLangTestLanguage.g:1172:4: (lv_name_3_0= RULE_ID )
{
// InternalSimpleBeeLangTestLanguage.g:1172:4: (lv_name_3_0= RULE_ID )
// InternalSimpleBeeLangTestLanguage.g:1173:5: lv_name_3_0= RULE_ID
{
lv_name_3_0 = (Token) match(input, RULE_ID, FollowSets000.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");
}
}
}
// InternalSimpleBeeLangTestLanguage.g:1189: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= '}' )
// InternalSimpleBeeLangTestLanguage.g:1190: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, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getRequiredCapabilityAccess().getLeftCurlyBracketKeyword_3_0());
}
// InternalSimpleBeeLangTestLanguage.g:1194: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= ';' ) ) ) ) )* ) ) )
// InternalSimpleBeeLangTestLanguage.g:1195: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= ';' ) ) ) ) )* ) )
{
// InternalSimpleBeeLangTestLanguage.g:1195: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= ';' ) ) ) ) )* ) )
// InternalSimpleBeeLangTestLanguage.g:1196: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());
// InternalSimpleBeeLangTestLanguage.g:1199: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= ';' ) ) ) ) )* )
// InternalSimpleBeeLangTestLanguage.g:1200: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= ';' ) ) ) ) )*
{
// InternalSimpleBeeLangTestLanguage.g:1200: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:
// InternalSimpleBeeLangTestLanguage.g:1201:5: ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:1201:5: ({...}? => ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:1202: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)");
}
// InternalSimpleBeeLangTestLanguage.g:1202:118: ( ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1203:7: ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0);
// InternalSimpleBeeLangTestLanguage.g:1206:10: ({...}? => (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:1206: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");
}
// InternalSimpleBeeLangTestLanguage.g:1206:20: (otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';' )
// InternalSimpleBeeLangTestLanguage.g:1206:21: otherlv_6= 'when' otherlv_7= ':' ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= ';'
{
otherlv_6 = (Token) match(input, 26, FollowSets000.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, FollowSets000.FOLLOW_19);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_7, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_0_1());
}
// InternalSimpleBeeLangTestLanguage.g:1214:10: ( (lv_condExpr_8_0= ruleExpression ) )
// InternalSimpleBeeLangTestLanguage.g:1215:11: (lv_condExpr_8_0= ruleExpression )
{
// InternalSimpleBeeLangTestLanguage.g:1215:11: (lv_condExpr_8_0= ruleExpression )
// InternalSimpleBeeLangTestLanguage.g:1216:12: lv_condExpr_8_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getRequiredCapabilityAccess().getCondExprExpressionParserRuleCall_3_1_0_2_0());
}
pushFollow(FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:1243:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:1243:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:1244: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)");
}
// InternalSimpleBeeLangTestLanguage.g:1244:118: ( ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1245:7: ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1);
// InternalSimpleBeeLangTestLanguage.g:1248:10: ({...}? => ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:1248: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");
}
// InternalSimpleBeeLangTestLanguage.g:1248:20: ( ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';' )
// InternalSimpleBeeLangTestLanguage.g:1248:21: ( (lv_greedy_10_0= 'greedy' ) ) otherlv_11= ';'
{
// InternalSimpleBeeLangTestLanguage.g:1248:21: ( (lv_greedy_10_0= 'greedy' ) )
// InternalSimpleBeeLangTestLanguage.g:1249:11: (lv_greedy_10_0= 'greedy' )
{
// InternalSimpleBeeLangTestLanguage.g:1249:11: (lv_greedy_10_0= 'greedy' )
// InternalSimpleBeeLangTestLanguage.g:1250:12: lv_greedy_10_0= 'greedy'
{
lv_greedy_10_0 = (Token) match(input, 29, FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:1272:5: ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:1272:5: ({...}? => ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:1273: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)");
}
// InternalSimpleBeeLangTestLanguage.g:1273:118: ( ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1274:7: ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2);
// InternalSimpleBeeLangTestLanguage.g:1277:10: ({...}? => (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:1277: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");
}
// InternalSimpleBeeLangTestLanguage.g:1277:20: (otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';' )
// InternalSimpleBeeLangTestLanguage.g:1277:21: otherlv_12= 'requires-min' otherlv_13= ':' ( (lv_min_14_0= RULE_INT ) ) otherlv_15= ';'
{
otherlv_12 = (Token) match(input, 30, FollowSets000.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, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_2_1());
}
// InternalSimpleBeeLangTestLanguage.g:1285:10: ( (lv_min_14_0= RULE_INT ) )
// InternalSimpleBeeLangTestLanguage.g:1286:11: (lv_min_14_0= RULE_INT )
{
// InternalSimpleBeeLangTestLanguage.g:1286:11: (lv_min_14_0= RULE_INT )
// InternalSimpleBeeLangTestLanguage.g:1287:12: lv_min_14_0= RULE_INT
{
lv_min_14_0 = (Token) match(input, RULE_INT, FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:1313:5: ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:1313:5: ({...}? => ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:1314: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)");
}
// InternalSimpleBeeLangTestLanguage.g:1314:118: ( ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1315:7: ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3);
// InternalSimpleBeeLangTestLanguage.g:1318:10: ({...}? => (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:1318: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");
}
// InternalSimpleBeeLangTestLanguage.g:1318:20: (otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';' )
// InternalSimpleBeeLangTestLanguage.g:1318:21: otherlv_16= 'requires-max' otherlv_17= ':' ( (lv_max_18_0= RULE_INT ) ) otherlv_19= ';'
{
otherlv_16 = (Token) match(input, 31, FollowSets000.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, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_3_1());
}
// InternalSimpleBeeLangTestLanguage.g:1326:10: ( (lv_max_18_0= RULE_INT ) )
// InternalSimpleBeeLangTestLanguage.g:1327:11: (lv_max_18_0= RULE_INT )
{
// InternalSimpleBeeLangTestLanguage.g:1327:11: (lv_max_18_0= RULE_INT )
// InternalSimpleBeeLangTestLanguage.g:1328:12: lv_max_18_0= RULE_INT
{
lv_max_18_0 = (Token) match(input, RULE_INT, FollowSets000.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, FollowSets000.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:
// InternalSimpleBeeLangTestLanguage.g:1354:5: ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) )
{
// InternalSimpleBeeLangTestLanguage.g:1354:5: ({...}? => ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) ) )
// InternalSimpleBeeLangTestLanguage.g:1355: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)");
}
// InternalSimpleBeeLangTestLanguage.g:1355:118: ( ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) ) )
// InternalSimpleBeeLangTestLanguage.g:1356:7: ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4);
// InternalSimpleBeeLangTestLanguage.g:1359:10: ({...}? => (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' ) )
// InternalSimpleBeeLangTestLanguage.g:1359: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");
}
// InternalSimpleBeeLangTestLanguage.g:1359:20: (otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';' )
// InternalSimpleBeeLangTestLanguage.g:1359:21: otherlv_20= 'version' otherlv_21= ':' ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= ';'
{
otherlv_20 = (Token) match(input, 14, FollowSets000.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, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_4_1());
}
// InternalSimpleBeeLangTestLanguage.g:1367:10: ( (lv_versionRange_22_0= RULE_ID ) )
// InternalSimpleBeeLangTestLanguage.g:1368:11: (lv_versionRange_22_0= RULE_ID )
{
// InternalSimpleBeeLangTestLanguage.g:1368:11: (lv_versionRange_22_0= RULE_ID )
// InternalSimpleBeeLangTestLanguage.g:1369:12: lv_versionRange_22_0= RULE_ID
{
lv_versionRange_22_0 = (Token) match(input, RULE_ID, FollowSets000.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, FollowSets000.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, FollowSets000.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, 12, ruleRequiredCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method ruleRequiredCapability.
// $ANTLR end "entryRuleRequiredCapability"
// $ANTLR start "ruleRequiredCapability"
// InternalExBeeLangTestLanguageParser.g:1118:1: ruleRequiredCapability returns [EObject current=null] : ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= Unit ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket ) ) ;
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, 12)) {
return current;
}
// InternalExBeeLangTestLanguageParser.g:1127:2: ( ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= Unit ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket ) ) )
// InternalExBeeLangTestLanguageParser.g:1128:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= Unit ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket ) )
{
// InternalExBeeLangTestLanguageParser.g:1128:2: ( () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= Unit ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket ) )
// InternalExBeeLangTestLanguageParser.g:1129:3: () ( ( (lv_nameSpace_1_0= RULE_ID ) ) | otherlv_2= Unit ) ( (lv_name_3_0= RULE_ID ) ) (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket )
{
// InternalExBeeLangTestLanguageParser.g:1129:3: ()
// InternalExBeeLangTestLanguageParser.g:1130:4:
{
if (state.backtracking == 0) {
/* */
}
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getRequiredCapabilityAccess().getRequiredCapabilityAction_0(), current);
}
}
// InternalExBeeLangTestLanguageParser.g:1139: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 == Unit)) {
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:
// InternalExBeeLangTestLanguageParser.g:1140:4: ( (lv_nameSpace_1_0= RULE_ID ) )
{
// InternalExBeeLangTestLanguageParser.g:1140:4: ( (lv_nameSpace_1_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:1141:5: (lv_nameSpace_1_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:1141:5: (lv_nameSpace_1_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:1142:6: lv_nameSpace_1_0= RULE_ID
{
lv_nameSpace_1_0 = (Token) match(input, RULE_ID, FollowSets000.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:
// InternalExBeeLangTestLanguageParser.g:1159:4: otherlv_2= Unit
{
otherlv_2 = (Token) match(input, Unit, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getRequiredCapabilityAccess().getUnitKeyword_1_1());
}
}
break;
}
// InternalExBeeLangTestLanguageParser.g:1164:3: ( (lv_name_3_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:1165:4: (lv_name_3_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:1165:4: (lv_name_3_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:1166:5: lv_name_3_0= RULE_ID
{
lv_name_3_0 = (Token) match(input, RULE_ID, FollowSets000.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");
}
}
}
// InternalExBeeLangTestLanguageParser.g:1182:3: (otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket )
// InternalExBeeLangTestLanguageParser.g:1183:4: otherlv_4= LeftCurlyBracket ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) ) otherlv_24= RightCurlyBracket
{
otherlv_4 = (Token) match(input, LeftCurlyBracket, FollowSets000.FOLLOW_23);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getRequiredCapabilityAccess().getLeftCurlyBracketKeyword_3_0());
}
// InternalExBeeLangTestLanguageParser.g:1187:4: ( ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) ) )
// InternalExBeeLangTestLanguageParser.g:1188:5: ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) )
{
// InternalExBeeLangTestLanguageParser.g:1188:5: ( ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* ) )
// InternalExBeeLangTestLanguageParser.g:1189:6: ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* )
{
getUnorderedGroupHelper().enter(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1());
// InternalExBeeLangTestLanguageParser.g:1192:6: ( ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )* )
// InternalExBeeLangTestLanguageParser.g:1193:7: ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )*
{
// InternalExBeeLangTestLanguageParser.g:1193:7: ( ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) ) | ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) ) | ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) ) )*
loop21: do {
int alt21 = 6;
int LA21_0 = input.LA(1);
if (LA21_0 == When && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0)) {
alt21 = 1;
} else if (LA21_0 == Greedy && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1)) {
alt21 = 2;
} else if (LA21_0 == RequiresMin && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2)) {
alt21 = 3;
} else if (LA21_0 == RequiresMax && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3)) {
alt21 = 4;
} else if (LA21_0 == Version && getUnorderedGroupHelper().canSelect(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4)) {
alt21 = 5;
}
switch(alt21) {
case 1:
// InternalExBeeLangTestLanguageParser.g:1194:5: ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1194:5: ({...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1195:6: {...}? => ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) )
{
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)");
}
// InternalExBeeLangTestLanguageParser.g:1195:118: ( ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1196:7: ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 0);
// InternalExBeeLangTestLanguageParser.g:1199:10: ({...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1199:11: {...}? => (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1199:20: (otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1199:21: otherlv_6= When otherlv_7= Colon ( (lv_condExpr_8_0= ruleExpression ) ) otherlv_9= Semicolon
{
otherlv_6 = (Token) match(input, When, FollowSets000.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, Colon, FollowSets000.FOLLOW_19);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_7, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_0_1());
}
// InternalExBeeLangTestLanguageParser.g:1207:10: ( (lv_condExpr_8_0= ruleExpression ) )
// InternalExBeeLangTestLanguageParser.g:1208:11: (lv_condExpr_8_0= ruleExpression )
{
// InternalExBeeLangTestLanguageParser.g:1208:11: (lv_condExpr_8_0= ruleExpression )
// InternalExBeeLangTestLanguageParser.g:1209:12: lv_condExpr_8_0= ruleExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getRequiredCapabilityAccess().getCondExprExpressionParserRuleCall_3_1_0_2_0());
}
pushFollow(FollowSets000.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, Semicolon, FollowSets000.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:
// InternalExBeeLangTestLanguageParser.g:1236:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1236:5: ({...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1237:6: {...}? => ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) )
{
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)");
}
// InternalExBeeLangTestLanguageParser.g:1237:118: ( ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1238:7: ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 1);
// InternalExBeeLangTestLanguageParser.g:1241:10: ({...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1241:11: {...}? => ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1241:20: ( ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1241:21: ( (lv_greedy_10_0= Greedy ) ) otherlv_11= Semicolon
{
// InternalExBeeLangTestLanguageParser.g:1241:21: ( (lv_greedy_10_0= Greedy ) )
// InternalExBeeLangTestLanguageParser.g:1242:11: (lv_greedy_10_0= Greedy )
{
// InternalExBeeLangTestLanguageParser.g:1242:11: (lv_greedy_10_0= Greedy )
// InternalExBeeLangTestLanguageParser.g:1243:12: lv_greedy_10_0= Greedy
{
lv_greedy_10_0 = (Token) match(input, Greedy, FollowSets000.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, Semicolon, FollowSets000.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:
// InternalExBeeLangTestLanguageParser.g:1265:5: ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1265:5: ({...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1266:6: {...}? => ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) )
{
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)");
}
// InternalExBeeLangTestLanguageParser.g:1266:118: ( ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1267:7: ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 2);
// InternalExBeeLangTestLanguageParser.g:1270:10: ({...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1270:11: {...}? => (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1270:20: (otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1270:21: otherlv_12= RequiresMin otherlv_13= Colon ( (lv_min_14_0= RULE_INT ) ) otherlv_15= Semicolon
{
otherlv_12 = (Token) match(input, RequiresMin, FollowSets000.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, Colon, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_2_1());
}
// InternalExBeeLangTestLanguageParser.g:1278:10: ( (lv_min_14_0= RULE_INT ) )
// InternalExBeeLangTestLanguageParser.g:1279:11: (lv_min_14_0= RULE_INT )
{
// InternalExBeeLangTestLanguageParser.g:1279:11: (lv_min_14_0= RULE_INT )
// InternalExBeeLangTestLanguageParser.g:1280:12: lv_min_14_0= RULE_INT
{
lv_min_14_0 = (Token) match(input, RULE_INT, FollowSets000.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, Semicolon, FollowSets000.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:
// InternalExBeeLangTestLanguageParser.g:1306:5: ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1306:5: ({...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1307:6: {...}? => ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) )
{
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)");
}
// InternalExBeeLangTestLanguageParser.g:1307:118: ( ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1308:7: ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 3);
// InternalExBeeLangTestLanguageParser.g:1311:10: ({...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1311:11: {...}? => (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1311:20: (otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1311:21: otherlv_16= RequiresMax otherlv_17= Colon ( (lv_max_18_0= RULE_INT ) ) otherlv_19= Semicolon
{
otherlv_16 = (Token) match(input, RequiresMax, FollowSets000.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, Colon, FollowSets000.FOLLOW_24);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_3_1());
}
// InternalExBeeLangTestLanguageParser.g:1319:10: ( (lv_max_18_0= RULE_INT ) )
// InternalExBeeLangTestLanguageParser.g:1320:11: (lv_max_18_0= RULE_INT )
{
// InternalExBeeLangTestLanguageParser.g:1320:11: (lv_max_18_0= RULE_INT )
// InternalExBeeLangTestLanguageParser.g:1321:12: lv_max_18_0= RULE_INT
{
lv_max_18_0 = (Token) match(input, RULE_INT, FollowSets000.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, Semicolon, FollowSets000.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:
// InternalExBeeLangTestLanguageParser.g:1347:5: ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) )
{
// InternalExBeeLangTestLanguageParser.g:1347:5: ({...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) ) )
// InternalExBeeLangTestLanguageParser.g:1348:6: {...}? => ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) )
{
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)");
}
// InternalExBeeLangTestLanguageParser.g:1348:118: ( ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) ) )
// InternalExBeeLangTestLanguageParser.g:1349:7: ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) )
{
getUnorderedGroupHelper().select(grammarAccess.getRequiredCapabilityAccess().getUnorderedGroup_3_1(), 4);
// InternalExBeeLangTestLanguageParser.g:1352:10: ({...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon ) )
// InternalExBeeLangTestLanguageParser.g:1352:11: {...}? => (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon )
{
if (!((true))) {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
throw new FailedPredicateException(input, "ruleRequiredCapability", "true");
}
// InternalExBeeLangTestLanguageParser.g:1352:20: (otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon )
// InternalExBeeLangTestLanguageParser.g:1352:21: otherlv_20= Version otherlv_21= Colon ( (lv_versionRange_22_0= RULE_ID ) ) otherlv_23= Semicolon
{
otherlv_20 = (Token) match(input, Version, FollowSets000.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, Colon, FollowSets000.FOLLOW_8);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getRequiredCapabilityAccess().getColonKeyword_3_1_4_1());
}
// InternalExBeeLangTestLanguageParser.g:1360:10: ( (lv_versionRange_22_0= RULE_ID ) )
// InternalExBeeLangTestLanguageParser.g:1361:11: (lv_versionRange_22_0= RULE_ID )
{
// InternalExBeeLangTestLanguageParser.g:1361:11: (lv_versionRange_22_0= RULE_ID )
// InternalExBeeLangTestLanguageParser.g:1362:12: lv_versionRange_22_0= RULE_ID
{
lv_versionRange_22_0 = (Token) match(input, RULE_ID, FollowSets000.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, Semicolon, FollowSets000.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, RightCurlyBracket, FollowSets000.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, 12, ruleRequiredCapability_StartIndex);
}
myUnorderedGroupState.restore();
}
return current;
}
use of org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState in project xtext-core by eclipse.
the class InternalExBeeLangTestLanguageParser method entryRuleUnit.
// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleUnit"
// InternalExBeeLangTestLanguageParser.g:151: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;
}
// InternalExBeeLangTestLanguageParser.g:155:2: (iv_ruleUnit= ruleUnit EOF )
// InternalExBeeLangTestLanguageParser.g:156: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;
}
Aggregations