use of org.eclipse.emf.common.util.Enumerator in project applause by applause.
the class InternalApplauseDslParser method ruleRESTVerb.
// $ANTLR end "ruleStringLiteral"
// $ANTLR start "ruleRESTVerb"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2898:1: ruleRESTVerb returns [Enumerator current=null] : ( (enumLiteral_0= 'GET' ) | (enumLiteral_1= 'POST' ) | (enumLiteral_2= 'PUT' ) | (enumLiteral_3= 'DELETE' ) ) ;
public final Enumerator ruleRESTVerb() throws RecognitionException {
Enumerator current = null;
Token enumLiteral_0 = null;
Token enumLiteral_1 = null;
Token enumLiteral_2 = null;
Token enumLiteral_3 = null;
enterRule();
try {
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2900:28: ( ( (enumLiteral_0= 'GET' ) | (enumLiteral_1= 'POST' ) | (enumLiteral_2= 'PUT' ) | (enumLiteral_3= 'DELETE' ) ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2901:1: ( (enumLiteral_0= 'GET' ) | (enumLiteral_1= 'POST' ) | (enumLiteral_2= 'PUT' ) | (enumLiteral_3= 'DELETE' ) )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2901:1: ( (enumLiteral_0= 'GET' ) | (enumLiteral_1= 'POST' ) | (enumLiteral_2= 'PUT' ) | (enumLiteral_3= 'DELETE' ) )
int alt46 = 4;
switch(input.LA(1)) {
case 48:
{
alt46 = 1;
}
break;
case 49:
{
alt46 = 2;
}
break;
case 50:
{
alt46 = 3;
}
break;
case 51:
{
alt46 = 4;
}
break;
default:
NoViableAltException nvae = new NoViableAltException("", 46, 0, input);
throw nvae;
}
switch(alt46) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2901:2: (enumLiteral_0= 'GET' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2901:2: (enumLiteral_0= 'GET' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2901:4: enumLiteral_0= 'GET'
{
enumLiteral_0 = (Token) match(input, 48, FOLLOW_48_in_ruleRESTVerb6567);
current = grammarAccess.getRESTVerbAccess().getGETEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_0, grammarAccess.getRESTVerbAccess().getGETEnumLiteralDeclaration_0());
}
}
break;
case 2:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2907:6: (enumLiteral_1= 'POST' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2907:6: (enumLiteral_1= 'POST' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2907:8: enumLiteral_1= 'POST'
{
enumLiteral_1 = (Token) match(input, 49, FOLLOW_49_in_ruleRESTVerb6584);
current = grammarAccess.getRESTVerbAccess().getPOSTEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_1, grammarAccess.getRESTVerbAccess().getPOSTEnumLiteralDeclaration_1());
}
}
break;
case 3:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2913:6: (enumLiteral_2= 'PUT' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2913:6: (enumLiteral_2= 'PUT' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2913:8: enumLiteral_2= 'PUT'
{
enumLiteral_2 = (Token) match(input, 50, FOLLOW_50_in_ruleRESTVerb6601);
current = grammarAccess.getRESTVerbAccess().getPUTEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_2, grammarAccess.getRESTVerbAccess().getPUTEnumLiteralDeclaration_2());
}
}
break;
case 4:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2919:6: (enumLiteral_3= 'DELETE' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2919:6: (enumLiteral_3= 'DELETE' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2919:8: enumLiteral_3= 'DELETE'
{
enumLiteral_3 = (Token) match(input, 51, FOLLOW_51_in_ruleRESTVerb6618);
current = grammarAccess.getRESTVerbAccess().getDELETEEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_3, grammarAccess.getRESTVerbAccess().getDELETEEnumLiteralDeclaration_3());
}
}
break;
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project applause by applause.
the class InternalApplauseDslParser method ruleActionVerb.
// $ANTLR end "ruleGestureKind"
// $ANTLR start "ruleActionVerb"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2973:1: ruleActionVerb returns [Enumerator current=null] : ( (enumLiteral_0= 'edit' ) | (enumLiteral_1= 'display' ) | (enumLiteral_2= 'add' ) ) ;
public final Enumerator ruleActionVerb() throws RecognitionException {
Enumerator current = null;
Token enumLiteral_0 = null;
Token enumLiteral_1 = null;
Token enumLiteral_2 = null;
enterRule();
try {
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2975:28: ( ( (enumLiteral_0= 'edit' ) | (enumLiteral_1= 'display' ) | (enumLiteral_2= 'add' ) ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2976:1: ( (enumLiteral_0= 'edit' ) | (enumLiteral_1= 'display' ) | (enumLiteral_2= 'add' ) )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2976:1: ( (enumLiteral_0= 'edit' ) | (enumLiteral_1= 'display' ) | (enumLiteral_2= 'add' ) )
int alt49 = 3;
switch(input.LA(1)) {
case 57:
{
alt49 = 1;
}
break;
case 58:
{
alt49 = 2;
}
break;
case 59:
{
alt49 = 3;
}
break;
default:
NoViableAltException nvae = new NoViableAltException("", 49, 0, input);
throw nvae;
}
switch(alt49) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2976:2: (enumLiteral_0= 'edit' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2976:2: (enumLiteral_0= 'edit' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2976:4: enumLiteral_0= 'edit'
{
enumLiteral_0 = (Token) match(input, 57, FOLLOW_57_in_ruleActionVerb6804);
current = grammarAccess.getActionVerbAccess().getEditEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_0, grammarAccess.getActionVerbAccess().getEditEnumLiteralDeclaration_0());
}
}
break;
case 2:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2982:6: (enumLiteral_1= 'display' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2982:6: (enumLiteral_1= 'display' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2982:8: enumLiteral_1= 'display'
{
enumLiteral_1 = (Token) match(input, 58, FOLLOW_58_in_ruleActionVerb6821);
current = grammarAccess.getActionVerbAccess().getDisplayEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_1, grammarAccess.getActionVerbAccess().getDisplayEnumLiteralDeclaration_1());
}
}
break;
case 3:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2988:6: (enumLiteral_2= 'add' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2988:6: (enumLiteral_2= 'add' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2988:8: enumLiteral_2= 'add'
{
enumLiteral_2 = (Token) match(input, 59, FOLLOW_59_in_ruleActionVerb6838);
current = grammarAccess.getActionVerbAccess().getAddEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_2, grammarAccess.getActionVerbAccess().getAddEnumLiteralDeclaration_2());
}
}
break;
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project applause by applause.
the class InternalApplauseDslParser method ruleUIAction.
// $ANTLR end "entryRuleUIAction"
// $ANTLR start "ruleUIAction"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1982:1: ruleUIAction returns [EObject current=null] : (otherlv_0= 'action' otherlv_1= '{' (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )? (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )? otherlv_8= 'action' otherlv_9= '=' ( (lv_action_10_0= ruleUIActionSpecification ) ) (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )? (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )? otherlv_17= '}' ) ;
public final EObject ruleUIAction() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_1 = null;
Token otherlv_2 = null;
Token otherlv_3 = null;
Token lv_title_4_0 = null;
Token otherlv_5 = null;
Token otherlv_6 = null;
Token lv_icon_7_0 = null;
Token otherlv_8 = null;
Token otherlv_9 = null;
Token otherlv_11 = null;
Token otherlv_12 = null;
Token otherlv_14 = null;
Token otherlv_15 = null;
Token lv_order_16_0 = null;
Token otherlv_17 = null;
EObject lv_action_10_0 = null;
Enumerator lv_gesture_13_0 = null;
enterRule();
try {
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1985:28: ( (otherlv_0= 'action' otherlv_1= '{' (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )? (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )? otherlv_8= 'action' otherlv_9= '=' ( (lv_action_10_0= ruleUIActionSpecification ) ) (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )? (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )? otherlv_17= '}' ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1986:1: (otherlv_0= 'action' otherlv_1= '{' (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )? (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )? otherlv_8= 'action' otherlv_9= '=' ( (lv_action_10_0= ruleUIActionSpecification ) ) (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )? (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )? otherlv_17= '}' )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1986:1: (otherlv_0= 'action' otherlv_1= '{' (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )? (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )? otherlv_8= 'action' otherlv_9= '=' ( (lv_action_10_0= ruleUIActionSpecification ) ) (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )? (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )? otherlv_17= '}' )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1986:3: otherlv_0= 'action' otherlv_1= '{' (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )? (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )? otherlv_8= 'action' otherlv_9= '=' ( (lv_action_10_0= ruleUIActionSpecification ) ) (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )? (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )? otherlv_17= '}'
{
otherlv_0 = (Token) match(input, 41, FOLLOW_41_in_ruleUIAction4474);
newLeafNode(otherlv_0, grammarAccess.getUIActionAccess().getActionKeyword_0());
otherlv_1 = (Token) match(input, 19, FOLLOW_19_in_ruleUIAction4486);
newLeafNode(otherlv_1, grammarAccess.getUIActionAccess().getLeftCurlyBracketKeyword_1());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1994:1: (otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) ) )?
int alt34 = 2;
int LA34_0 = input.LA(1);
if ((LA34_0 == 11)) {
alt34 = 1;
}
switch(alt34) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1994:3: otherlv_2= 'title' otherlv_3= '=' ( (lv_title_4_0= RULE_STRING ) )
{
otherlv_2 = (Token) match(input, 11, FOLLOW_11_in_ruleUIAction4499);
newLeafNode(otherlv_2, grammarAccess.getUIActionAccess().getTitleKeyword_2_0());
otherlv_3 = (Token) match(input, 34, FOLLOW_34_in_ruleUIAction4511);
newLeafNode(otherlv_3, grammarAccess.getUIActionAccess().getEqualsSignKeyword_2_1());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2002:1: ( (lv_title_4_0= RULE_STRING ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2003:1: (lv_title_4_0= RULE_STRING )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2003:1: (lv_title_4_0= RULE_STRING )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2004:3: lv_title_4_0= RULE_STRING
{
lv_title_4_0 = (Token) match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleUIAction4528);
newLeafNode(lv_title_4_0, grammarAccess.getUIActionAccess().getTitleSTRINGTerminalRuleCall_2_2_0());
if (current == null) {
current = createModelElement(grammarAccess.getUIActionRule());
}
setWithLastConsumed(current, "title", lv_title_4_0, "STRING");
}
}
}
break;
}
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2020:4: (otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) ) )?
int alt35 = 2;
int LA35_0 = input.LA(1);
if ((LA35_0 == 42)) {
alt35 = 1;
}
switch(alt35) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2020:6: otherlv_5= 'icon' otherlv_6= '=' ( (lv_icon_7_0= RULE_STRING ) )
{
otherlv_5 = (Token) match(input, 42, FOLLOW_42_in_ruleUIAction4548);
newLeafNode(otherlv_5, grammarAccess.getUIActionAccess().getIconKeyword_3_0());
otherlv_6 = (Token) match(input, 34, FOLLOW_34_in_ruleUIAction4560);
newLeafNode(otherlv_6, grammarAccess.getUIActionAccess().getEqualsSignKeyword_3_1());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2028:1: ( (lv_icon_7_0= RULE_STRING ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2029:1: (lv_icon_7_0= RULE_STRING )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2029:1: (lv_icon_7_0= RULE_STRING )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2030:3: lv_icon_7_0= RULE_STRING
{
lv_icon_7_0 = (Token) match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleUIAction4577);
newLeafNode(lv_icon_7_0, grammarAccess.getUIActionAccess().getIconSTRINGTerminalRuleCall_3_2_0());
if (current == null) {
current = createModelElement(grammarAccess.getUIActionRule());
}
setWithLastConsumed(current, "icon", lv_icon_7_0, "STRING");
}
}
}
break;
}
otherlv_8 = (Token) match(input, 41, FOLLOW_41_in_ruleUIAction4596);
newLeafNode(otherlv_8, grammarAccess.getUIActionAccess().getActionKeyword_4());
otherlv_9 = (Token) match(input, 34, FOLLOW_34_in_ruleUIAction4608);
newLeafNode(otherlv_9, grammarAccess.getUIActionAccess().getEqualsSignKeyword_5());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2054:1: ( (lv_action_10_0= ruleUIActionSpecification ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2055:1: (lv_action_10_0= ruleUIActionSpecification )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2055:1: (lv_action_10_0= ruleUIActionSpecification )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2056:3: lv_action_10_0= ruleUIActionSpecification
{
newCompositeNode(grammarAccess.getUIActionAccess().getActionUIActionSpecificationParserRuleCall_6_0());
pushFollow(FOLLOW_ruleUIActionSpecification_in_ruleUIAction4629);
lv_action_10_0 = ruleUIActionSpecification();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getUIActionRule());
}
set(current, "action", lv_action_10_0, "UIActionSpecification");
afterParserOrEnumRuleCall();
}
}
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2072:2: (otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) ) )?
int alt36 = 2;
int LA36_0 = input.LA(1);
if ((LA36_0 == 43)) {
alt36 = 1;
}
switch(alt36) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2072:4: otherlv_11= 'gesture' otherlv_12= '=' ( (lv_gesture_13_0= ruleGestureKind ) )
{
otherlv_11 = (Token) match(input, 43, FOLLOW_43_in_ruleUIAction4642);
newLeafNode(otherlv_11, grammarAccess.getUIActionAccess().getGestureKeyword_7_0());
otherlv_12 = (Token) match(input, 34, FOLLOW_34_in_ruleUIAction4654);
newLeafNode(otherlv_12, grammarAccess.getUIActionAccess().getEqualsSignKeyword_7_1());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2080:1: ( (lv_gesture_13_0= ruleGestureKind ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2081:1: (lv_gesture_13_0= ruleGestureKind )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2081:1: (lv_gesture_13_0= ruleGestureKind )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2082:3: lv_gesture_13_0= ruleGestureKind
{
newCompositeNode(grammarAccess.getUIActionAccess().getGestureGestureKindEnumRuleCall_7_2_0());
pushFollow(FOLLOW_ruleGestureKind_in_ruleUIAction4675);
lv_gesture_13_0 = ruleGestureKind();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getUIActionRule());
}
set(current, "gesture", lv_gesture_13_0, "GestureKind");
afterParserOrEnumRuleCall();
}
}
}
break;
}
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2098:4: (otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) ) )?
int alt37 = 2;
int LA37_0 = input.LA(1);
if ((LA37_0 == 44)) {
alt37 = 1;
}
switch(alt37) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2098:6: otherlv_14= 'order' otherlv_15= '=' ( (lv_order_16_0= RULE_INT ) )
{
otherlv_14 = (Token) match(input, 44, FOLLOW_44_in_ruleUIAction4690);
newLeafNode(otherlv_14, grammarAccess.getUIActionAccess().getOrderKeyword_8_0());
otherlv_15 = (Token) match(input, 34, FOLLOW_34_in_ruleUIAction4702);
newLeafNode(otherlv_15, grammarAccess.getUIActionAccess().getEqualsSignKeyword_8_1());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2106:1: ( (lv_order_16_0= RULE_INT ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2107:1: (lv_order_16_0= RULE_INT )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2107:1: (lv_order_16_0= RULE_INT )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2108:3: lv_order_16_0= RULE_INT
{
lv_order_16_0 = (Token) match(input, RULE_INT, FOLLOW_RULE_INT_in_ruleUIAction4719);
newLeafNode(lv_order_16_0, grammarAccess.getUIActionAccess().getOrderINTTerminalRuleCall_8_2_0());
if (current == null) {
current = createModelElement(grammarAccess.getUIActionRule());
}
setWithLastConsumed(current, "order", lv_order_16_0, "INT");
}
}
}
break;
}
otherlv_17 = (Token) match(input, 20, FOLLOW_20_in_ruleUIAction4738);
newLeafNode(otherlv_17, grammarAccess.getUIActionAccess().getRightCurlyBracketKeyword_9());
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project applause by applause.
the class InternalApplauseDslParser method ruleRESTSpecification.
// $ANTLR end "entryRuleRESTSpecification"
// $ANTLR start "ruleRESTSpecification"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:905:1: ruleRESTSpecification returns [EObject current=null] : ( ( (lv_verb_0_0= ruleRESTVerb ) ) ( (lv_path_1_0= ruleRESTURL ) ) (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )? ) ;
public final EObject ruleRESTSpecification() throws RecognitionException {
EObject current = null;
Token otherlv_2 = null;
Token otherlv_4 = null;
Enumerator lv_verb_0_0 = null;
EObject lv_path_1_0 = null;
EObject lv_body_3_0 = null;
enterRule();
try {
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:908:28: ( ( ( (lv_verb_0_0= ruleRESTVerb ) ) ( (lv_path_1_0= ruleRESTURL ) ) (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )? ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:909:1: ( ( (lv_verb_0_0= ruleRESTVerb ) ) ( (lv_path_1_0= ruleRESTURL ) ) (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )? )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:909:1: ( ( (lv_verb_0_0= ruleRESTVerb ) ) ( (lv_path_1_0= ruleRESTURL ) ) (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )? )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:909:2: ( (lv_verb_0_0= ruleRESTVerb ) ) ( (lv_path_1_0= ruleRESTURL ) ) (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )?
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:909:2: ( (lv_verb_0_0= ruleRESTVerb ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:910:1: (lv_verb_0_0= ruleRESTVerb )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:910:1: (lv_verb_0_0= ruleRESTVerb )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:911:3: lv_verb_0_0= ruleRESTVerb
{
newCompositeNode(grammarAccess.getRESTSpecificationAccess().getVerbRESTVerbEnumRuleCall_0_0());
pushFollow(FOLLOW_ruleRESTVerb_in_ruleRESTSpecification2073);
lv_verb_0_0 = ruleRESTVerb();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getRESTSpecificationRule());
}
set(current, "verb", lv_verb_0_0, "RESTVerb");
afterParserOrEnumRuleCall();
}
}
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:927:2: ( (lv_path_1_0= ruleRESTURL ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:928:1: (lv_path_1_0= ruleRESTURL )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:928:1: (lv_path_1_0= ruleRESTURL )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:929:3: lv_path_1_0= ruleRESTURL
{
newCompositeNode(grammarAccess.getRESTSpecificationAccess().getPathRESTURLParserRuleCall_1_0());
pushFollow(FOLLOW_ruleRESTURL_in_ruleRESTSpecification2094);
lv_path_1_0 = ruleRESTURL();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getRESTSpecificationRule());
}
set(current, "path", lv_path_1_0, "RESTURL");
afterParserOrEnumRuleCall();
}
}
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:945:2: (otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}' )?
int alt14 = 2;
int LA14_0 = input.LA(1);
if ((LA14_0 == 19)) {
alt14 = 1;
}
switch(alt14) {
case 1:
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:945:4: otherlv_2= '{' ( (lv_body_3_0= ruleDataSourceBodySpecification ) ) otherlv_4= '}'
{
otherlv_2 = (Token) match(input, 19, FOLLOW_19_in_ruleRESTSpecification2107);
newLeafNode(otherlv_2, grammarAccess.getRESTSpecificationAccess().getLeftCurlyBracketKeyword_2_0());
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:949:1: ( (lv_body_3_0= ruleDataSourceBodySpecification ) )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:950:1: (lv_body_3_0= ruleDataSourceBodySpecification )
{
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:950:1: (lv_body_3_0= ruleDataSourceBodySpecification )
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:951:3: lv_body_3_0= ruleDataSourceBodySpecification
{
newCompositeNode(grammarAccess.getRESTSpecificationAccess().getBodyDataSourceBodySpecificationParserRuleCall_2_1_0());
pushFollow(FOLLOW_ruleDataSourceBodySpecification_in_ruleRESTSpecification2128);
lv_body_3_0 = ruleDataSourceBodySpecification();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getRESTSpecificationRule());
}
set(current, "body", lv_body_3_0, "DataSourceBodySpecification");
afterParserOrEnumRuleCall();
}
}
otherlv_4 = (Token) match(input, 20, FOLLOW_20_in_ruleRESTSpecification2140);
newLeafNode(otherlv_4, grammarAccess.getRESTSpecificationAccess().getRightCurlyBracketKeyword_2_2());
}
break;
}
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations