// $ANTLR start "entryRuleLocation" // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:128:1: entryRuleLocation returns [EObject current=null] : iv_ruleLocation= ruleLocation EOF ; public final EObject entryRuleLocation() throws RecognitionException { EObject current = null; EObject iv_ruleLocation = null; try { // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:129:2: (iv_ruleLocation= ruleLocation EOF ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:130:2: iv_ruleLocation= ruleLocation EOF { newCompositeNode(grammarAccess.getLocationRule()); pushFollow(FOLLOW_ruleLocation_in_entryRuleLocation201); iv_ruleLocation = ruleLocation(); state._fsp--; current = iv_ruleLocation; match(input, EOF, FOLLOW_EOF_in_entryRuleLocation211); } } catch (RecognitionException re) { recover(input, re); appendSkippedTokens(); } finally { } return current; }
// $ANTLR start "ruleLocation" // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:137:1: ruleLocation returns [EObject current=null] : (otherlv_0= 'location' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_elements_3_0= ruleLocationElement ) )* otherlv_4= '}' ) ; public final EObject ruleLocation() throws RecognitionException { EObject current = null; Token otherlv_0 = null; Token lv_name_1_0 = null; Token otherlv_2 = null; Token otherlv_4 = null; EObject lv_elements_3_0 = null; enterRule(); try { // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:140:28: ( (otherlv_0= 'location' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_elements_3_0= ruleLocationElement ) )* otherlv_4= '}' ) ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:141:1: (otherlv_0= 'location' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_elements_3_0= ruleLocationElement ) )* otherlv_4= '}' ) { // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:141:1: (otherlv_0= 'location' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_elements_3_0= ruleLocationElement ) )* otherlv_4= '}' ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:141:3: otherlv_0= 'location' ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '{' ( (lv_elements_3_0= ruleLocationElement ) )* otherlv_4= '}' { otherlv_0 = (Token) match(input, 12, FOLLOW_12_in_ruleLocation248); newLeafNode(otherlv_0, grammarAccess.getLocationAccess().getLocationKeyword_0()); // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:145:1: ( (lv_name_1_0= RULE_ID ) ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:146:1: (lv_name_1_0= RULE_ID ) { // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:146:1: (lv_name_1_0= RULE_ID ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:147:3: lv_name_1_0= RULE_ID { lv_name_1_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleLocation265); newLeafNode( lv_name_1_0, grammarAccess.getLocationAccess().getNameIDTerminalRuleCall_1_0()); if (current == null) { current = createModelElement(grammarAccess.getLocationRule()); } setWithLastConsumed(current, "name", lv_name_1_0, "ID"); } } otherlv_2 = (Token) match(input, 13, FOLLOW_13_in_ruleLocation282); newLeafNode(otherlv_2, grammarAccess.getLocationAccess().getLeftCurlyBracketKeyword_2()); // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:167:1: ( (lv_elements_3_0= ruleLocationElement ) )* loop2: do { int alt2 = 2; int LA2_0 = input.LA(1); if (((LA2_0 >= 15 && LA2_0 <= 16))) { alt2 = 1; } switch (alt2) { case 1: // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:168:1: (lv_elements_3_0= ruleLocationElement ) { // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:168:1: (lv_elements_3_0= ruleLocationElement ) // ../org.eclipse.eclipsecon.location/src-gen/org/eclipse/eclipsecon/parser/antlr/internal/InternalLocation.g:169:3: lv_elements_3_0= ruleLocationElement { newCompositeNode( grammarAccess .getLocationAccess() .getElementsLocationElementParserRuleCall_3_0()); pushFollow(FOLLOW_ruleLocationElement_in_ruleLocation303); lv_elements_3_0 = ruleLocationElement(); state._fsp--; if (current == null) { current = createModelElementForParent(grammarAccess.getLocationRule()); } add(current, "elements", lv_elements_3_0, "LocationElement"); afterParserOrEnumRuleCall(); } } break; default: break loop2; } } while (true); otherlv_4 = (Token) match(input, 14, FOLLOW_14_in_ruleLocation316); newLeafNode(otherlv_4, grammarAccess.getLocationAccess().getRightCurlyBracketKeyword_4()); } } leaveRule(); } catch (RecognitionException re) { recover(input, re); appendSkippedTokens(); } finally { } return current; }