Search in sources :

Example 11 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalNetModelParser method ruleBooleanValue.

// $ANTLR end "ruleHttpMethodType"
// $ANTLR start "ruleBooleanValue"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2394:1: ruleBooleanValue returns [Enumerator current=null] : ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) ) ;
public final Enumerator ruleBooleanValue() throws RecognitionException {
    Enumerator current = null;
    Token enumLiteral_0 = null;
    Token enumLiteral_1 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2396:28: ( ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2397:1: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2397:1: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) )
            int alt40 = 2;
            int LA40_0 = input.LA(1);
            if ((LA40_0 == 41)) {
                alt40 = 1;
            } else if ((LA40_0 == 42)) {
                alt40 = 2;
            } else {
                NoViableAltException nvae = new NoViableAltException("", 40, 0, input);
                throw nvae;
            }
            switch(alt40) {
                case 1:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2397:2: (enumLiteral_0= 'true' )
                    {
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2397:2: (enumLiteral_0= 'true' )
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2397:4: enumLiteral_0= 'true'
                        {
                            enumLiteral_0 = (Token) match(input, 41, FOLLOW_41_in_ruleBooleanValue5516);
                            current = grammarAccess.getBooleanValueAccess().getTrueEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_0, grammarAccess.getBooleanValueAccess().getTrueEnumLiteralDeclaration_0());
                        }
                    }
                    break;
                case 2:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2403:6: (enumLiteral_1= 'false' )
                    {
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2403:6: (enumLiteral_1= 'false' )
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2403:8: enumLiteral_1= 'false'
                        {
                            enumLiteral_1 = (Token) match(input, 42, FOLLOW_42_in_ruleBooleanValue5533);
                            current = grammarAccess.getBooleanValueAccess().getFalseEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_1, grammarAccess.getBooleanValueAccess().getFalseEnumLiteralDeclaration_1());
                        }
                    }
                    break;
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 12 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalNetModelParser method ruleLiteral.

// $ANTLR end "entryRuleLiteral"
// $ANTLR start "ruleLiteral"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:892:1: ruleLiteral returns [EObject current=null] : ( ( () ( (lv_literal_1_0= ruleBooleanValue ) ) ) | ( () ( (lv_literal_3_0= RULE_STRING ) ) ) | ( () ( (lv_literal_5_0= ruleSignedNumber ) ) ) ) ;
public final EObject ruleLiteral() throws RecognitionException {
    EObject current = null;
    Token lv_literal_3_0 = null;
    Enumerator lv_literal_1_0 = null;
    AntlrDatatypeRuleToken lv_literal_5_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:895:28: ( ( ( () ( (lv_literal_1_0= ruleBooleanValue ) ) ) | ( () ( (lv_literal_3_0= RULE_STRING ) ) ) | ( () ( (lv_literal_5_0= ruleSignedNumber ) ) ) ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:1: ( ( () ( (lv_literal_1_0= ruleBooleanValue ) ) ) | ( () ( (lv_literal_3_0= RULE_STRING ) ) ) | ( () ( (lv_literal_5_0= ruleSignedNumber ) ) ) )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:1: ( ( () ( (lv_literal_1_0= ruleBooleanValue ) ) ) | ( () ( (lv_literal_3_0= RULE_STRING ) ) ) | ( () ( (lv_literal_5_0= ruleSignedNumber ) ) ) )
            int alt16 = 3;
            switch(input.LA(1)) {
                case 41:
                case 42:
                    {
                        alt16 = 1;
                    }
                    break;
                case RULE_STRING:
                    {
                        alt16 = 2;
                    }
                    break;
                case RULE_NUMBER:
                case 20:
                    {
                        alt16 = 3;
                    }
                    break;
                default:
                    NoViableAltException nvae = new NoViableAltException("", 16, 0, input);
                    throw nvae;
            }
            switch(alt16) {
                case 1:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:2: ( () ( (lv_literal_1_0= ruleBooleanValue ) ) )
                    {
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:2: ( () ( (lv_literal_1_0= ruleBooleanValue ) ) )
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:3: () ( (lv_literal_1_0= ruleBooleanValue ) )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:896:3: ()
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:897:5: 
                            {
                                current = forceCreateModelElement(grammarAccess.getLiteralAccess().getBooleanLiteralAction_0_0(), current);
                            }
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:902:2: ( (lv_literal_1_0= ruleBooleanValue ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:903:1: (lv_literal_1_0= ruleBooleanValue )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:903:1: (lv_literal_1_0= ruleBooleanValue )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:904:3: lv_literal_1_0= ruleBooleanValue
                                {
                                    newCompositeNode(grammarAccess.getLiteralAccess().getLiteralBooleanValueEnumRuleCall_0_1_0());
                                    pushFollow(FOLLOW_ruleBooleanValue_in_ruleLiteral1959);
                                    lv_literal_1_0 = ruleBooleanValue();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getLiteralRule());
                                    }
                                    set(current, "literal", lv_literal_1_0, "BooleanValue");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                        }
                    }
                    break;
                case 2:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:921:6: ( () ( (lv_literal_3_0= RULE_STRING ) ) )
                    {
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:921:6: ( () ( (lv_literal_3_0= RULE_STRING ) ) )
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:921:7: () ( (lv_literal_3_0= RULE_STRING ) )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:921:7: ()
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:922:5: 
                            {
                                current = forceCreateModelElement(grammarAccess.getLiteralAccess().getStringLiteralAction_1_0(), current);
                            }
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:927:2: ( (lv_literal_3_0= RULE_STRING ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:928:1: (lv_literal_3_0= RULE_STRING )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:928:1: (lv_literal_3_0= RULE_STRING )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:929:3: lv_literal_3_0= RULE_STRING
                                {
                                    lv_literal_3_0 = (Token) match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleLiteral1993);
                                    newLeafNode(lv_literal_3_0, grammarAccess.getLiteralAccess().getLiteralSTRINGTerminalRuleCall_1_1_0());
                                    if (current == null) {
                                        current = createModelElement(grammarAccess.getLiteralRule());
                                    }
                                    setWithLastConsumed(current, "literal", lv_literal_3_0, "STRING");
                                }
                            }
                        }
                    }
                    break;
                case 3:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:946:6: ( () ( (lv_literal_5_0= ruleSignedNumber ) ) )
                    {
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:946:6: ( () ( (lv_literal_5_0= ruleSignedNumber ) ) )
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:946:7: () ( (lv_literal_5_0= ruleSignedNumber ) )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:946:7: ()
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:947:5: 
                            {
                                current = forceCreateModelElement(grammarAccess.getLiteralAccess().getNumericLiteralAction_2_0(), current);
                            }
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:952:2: ( (lv_literal_5_0= ruleSignedNumber ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:953:1: (lv_literal_5_0= ruleSignedNumber )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:953:1: (lv_literal_5_0= ruleSignedNumber )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:954:3: lv_literal_5_0= ruleSignedNumber
                                {
                                    newCompositeNode(grammarAccess.getLiteralAccess().getLiteralSignedNumberParserRuleCall_2_1_0());
                                    pushFollow(FOLLOW_ruleSignedNumber_in_ruleLiteral2036);
                                    lv_literal_5_0 = ruleSignedNumber();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getLiteralRule());
                                    }
                                    set(current, "literal", lv_literal_5_0, "SignedNumber");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                        }
                    }
                    break;
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 13 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project applause by applause.

the class InternalApplauseDslParser method ruleScreen.

// $ANTLR end "entryRuleScreen"
// $ANTLR start "ruleScreen"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1436:1: ruleScreen returns [EObject current=null] : (otherlv_0= 'screen' ( (lv_kind_1_0= ruleScreenKind ) ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )? otherlv_6= '{' (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )? (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )? otherlv_13= 'sections' otherlv_14= '{' ( (lv_sections_15_0= ruleScreenSection ) )* otherlv_16= '}' (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )? otherlv_21= '}' ) ;
public final EObject ruleScreen() throws RecognitionException {
    EObject current = null;
    Token otherlv_0 = null;
    Token lv_name_2_0 = null;
    Token otherlv_3 = null;
    Token otherlv_5 = null;
    Token otherlv_6 = null;
    Token otherlv_7 = null;
    Token otherlv_8 = null;
    Token lv_title_9_0 = null;
    Token otherlv_10 = null;
    Token otherlv_11 = null;
    Token otherlv_13 = null;
    Token otherlv_14 = null;
    Token otherlv_16 = null;
    Token otherlv_17 = null;
    Token otherlv_18 = null;
    Token otherlv_20 = null;
    Token otherlv_21 = null;
    Enumerator lv_kind_1_0 = null;
    EObject lv_inputParameter_4_0 = null;
    EObject lv_datasource_12_0 = null;
    EObject lv_sections_15_0 = null;
    EObject lv_actions_19_0 = null;
    enterRule();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1439:28: ( (otherlv_0= 'screen' ( (lv_kind_1_0= ruleScreenKind ) ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )? otherlv_6= '{' (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )? (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )? otherlv_13= 'sections' otherlv_14= '{' ( (lv_sections_15_0= ruleScreenSection ) )* otherlv_16= '}' (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )? otherlv_21= '}' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1440:1: (otherlv_0= 'screen' ( (lv_kind_1_0= ruleScreenKind ) ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )? otherlv_6= '{' (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )? (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )? otherlv_13= 'sections' otherlv_14= '{' ( (lv_sections_15_0= ruleScreenSection ) )* otherlv_16= '}' (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )? otherlv_21= '}' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1440:1: (otherlv_0= 'screen' ( (lv_kind_1_0= ruleScreenKind ) ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )? otherlv_6= '{' (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )? (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )? otherlv_13= 'sections' otherlv_14= '{' ( (lv_sections_15_0= ruleScreenSection ) )* otherlv_16= '}' (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )? otherlv_21= '}' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1440:3: otherlv_0= 'screen' ( (lv_kind_1_0= ruleScreenKind ) ) ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )? otherlv_6= '{' (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )? (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )? otherlv_13= 'sections' otherlv_14= '{' ( (lv_sections_15_0= ruleScreenSection ) )* otherlv_16= '}' (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )? otherlv_21= '}'
            {
                otherlv_0 = (Token) match(input, 33, FOLLOW_33_in_ruleScreen3325);
                newLeafNode(otherlv_0, grammarAccess.getScreenAccess().getScreenKeyword_0());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1444:1: ( (lv_kind_1_0= ruleScreenKind ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1445:1: (lv_kind_1_0= ruleScreenKind )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1445:1: (lv_kind_1_0= ruleScreenKind )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1446:3: lv_kind_1_0= ruleScreenKind
                    {
                        newCompositeNode(grammarAccess.getScreenAccess().getKindScreenKindEnumRuleCall_1_0());
                        pushFollow(FOLLOW_ruleScreenKind_in_ruleScreen3346);
                        lv_kind_1_0 = ruleScreenKind();
                        state._fsp--;
                        if (current == null) {
                            current = createModelElementForParent(grammarAccess.getScreenRule());
                        }
                        set(current, "kind", lv_kind_1_0, "ScreenKind");
                        afterParserOrEnumRuleCall();
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1462:2: ( (lv_name_2_0= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1463:1: (lv_name_2_0= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1463:1: (lv_name_2_0= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1464:3: lv_name_2_0= RULE_ID
                    {
                        lv_name_2_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleScreen3363);
                        newLeafNode(lv_name_2_0, grammarAccess.getScreenAccess().getNameIDTerminalRuleCall_2_0());
                        if (current == null) {
                            current = createModelElement(grammarAccess.getScreenRule());
                        }
                        setWithLastConsumed(current, "name", lv_name_2_0, "ID");
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1480:2: (otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')' )?
                int alt21 = 2;
                int LA21_0 = input.LA(1);
                if ((LA21_0 == 27)) {
                    alt21 = 1;
                }
                switch(alt21) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1480:4: otherlv_3= '(' ( (lv_inputParameter_4_0= ruleParameter ) ) otherlv_5= ')'
                        {
                            otherlv_3 = (Token) match(input, 27, FOLLOW_27_in_ruleScreen3381);
                            newLeafNode(otherlv_3, grammarAccess.getScreenAccess().getLeftParenthesisKeyword_3_0());
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1484:1: ( (lv_inputParameter_4_0= ruleParameter ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1485:1: (lv_inputParameter_4_0= ruleParameter )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1485:1: (lv_inputParameter_4_0= ruleParameter )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1486:3: lv_inputParameter_4_0= ruleParameter
                                {
                                    newCompositeNode(grammarAccess.getScreenAccess().getInputParameterParameterParserRuleCall_3_1_0());
                                    pushFollow(FOLLOW_ruleParameter_in_ruleScreen3402);
                                    lv_inputParameter_4_0 = ruleParameter();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getScreenRule());
                                    }
                                    set(current, "inputParameter", lv_inputParameter_4_0, "Parameter");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                            otherlv_5 = (Token) match(input, 29, FOLLOW_29_in_ruleScreen3414);
                            newLeafNode(otherlv_5, grammarAccess.getScreenAccess().getRightParenthesisKeyword_3_2());
                        }
                        break;
                }
                otherlv_6 = (Token) match(input, 19, FOLLOW_19_in_ruleScreen3428);
                newLeafNode(otherlv_6, grammarAccess.getScreenAccess().getLeftCurlyBracketKeyword_4());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1510:1: (otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) ) )?
                int alt22 = 2;
                int LA22_0 = input.LA(1);
                if ((LA22_0 == 11)) {
                    alt22 = 1;
                }
                switch(alt22) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1510:3: otherlv_7= 'title' otherlv_8= '=' ( (lv_title_9_0= RULE_STRING ) )
                        {
                            otherlv_7 = (Token) match(input, 11, FOLLOW_11_in_ruleScreen3441);
                            newLeafNode(otherlv_7, grammarAccess.getScreenAccess().getTitleKeyword_5_0());
                            otherlv_8 = (Token) match(input, 34, FOLLOW_34_in_ruleScreen3453);
                            newLeafNode(otherlv_8, grammarAccess.getScreenAccess().getEqualsSignKeyword_5_1());
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1518:1: ( (lv_title_9_0= RULE_STRING ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1519:1: (lv_title_9_0= RULE_STRING )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1519:1: (lv_title_9_0= RULE_STRING )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1520:3: lv_title_9_0= RULE_STRING
                                {
                                    lv_title_9_0 = (Token) match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleScreen3470);
                                    newLeafNode(lv_title_9_0, grammarAccess.getScreenAccess().getTitleSTRINGTerminalRuleCall_5_2_0());
                                    if (current == null) {
                                        current = createModelElement(grammarAccess.getScreenRule());
                                    }
                                    setWithLastConsumed(current, "title", lv_title_9_0, "STRING");
                                }
                            }
                        }
                        break;
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1536:4: (otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) ) )?
                int alt23 = 2;
                int LA23_0 = input.LA(1);
                if ((LA23_0 == 24)) {
                    alt23 = 1;
                }
                switch(alt23) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1536:6: otherlv_10= 'datasource' otherlv_11= '=' ( (lv_datasource_12_0= ruleDataSourceCall ) )
                        {
                            otherlv_10 = (Token) match(input, 24, FOLLOW_24_in_ruleScreen3490);
                            newLeafNode(otherlv_10, grammarAccess.getScreenAccess().getDatasourceKeyword_6_0());
                            otherlv_11 = (Token) match(input, 34, FOLLOW_34_in_ruleScreen3502);
                            newLeafNode(otherlv_11, grammarAccess.getScreenAccess().getEqualsSignKeyword_6_1());
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1544:1: ( (lv_datasource_12_0= ruleDataSourceCall ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1545:1: (lv_datasource_12_0= ruleDataSourceCall )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1545:1: (lv_datasource_12_0= ruleDataSourceCall )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1546:3: lv_datasource_12_0= ruleDataSourceCall
                                {
                                    newCompositeNode(grammarAccess.getScreenAccess().getDatasourceDataSourceCallParserRuleCall_6_2_0());
                                    pushFollow(FOLLOW_ruleDataSourceCall_in_ruleScreen3523);
                                    lv_datasource_12_0 = ruleDataSourceCall();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getScreenRule());
                                    }
                                    set(current, "datasource", lv_datasource_12_0, "DataSourceCall");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                        }
                        break;
                }
                otherlv_13 = (Token) match(input, 35, FOLLOW_35_in_ruleScreen3537);
                newLeafNode(otherlv_13, grammarAccess.getScreenAccess().getSectionsKeyword_7());
                otherlv_14 = (Token) match(input, 19, FOLLOW_19_in_ruleScreen3549);
                newLeafNode(otherlv_14, grammarAccess.getScreenAccess().getLeftCurlyBracketKeyword_8());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1570:1: ( (lv_sections_15_0= ruleScreenSection ) )*
                loop24: do {
                    int alt24 = 2;
                    int LA24_0 = input.LA(1);
                    if ((LA24_0 == 14)) {
                        alt24 = 1;
                    }
                    switch(alt24) {
                        case 1:
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1571:1: (lv_sections_15_0= ruleScreenSection )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1571:1: (lv_sections_15_0= ruleScreenSection )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1572:3: lv_sections_15_0= ruleScreenSection
                                {
                                    newCompositeNode(grammarAccess.getScreenAccess().getSectionsScreenSectionParserRuleCall_9_0());
                                    pushFollow(FOLLOW_ruleScreenSection_in_ruleScreen3570);
                                    lv_sections_15_0 = ruleScreenSection();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getScreenRule());
                                    }
                                    add(current, "sections", lv_sections_15_0, "ScreenSection");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                            break;
                        default:
                            break loop24;
                    }
                } while (true);
                otherlv_16 = (Token) match(input, 20, FOLLOW_20_in_ruleScreen3583);
                newLeafNode(otherlv_16, grammarAccess.getScreenAccess().getRightCurlyBracketKeyword_10());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1592:1: (otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}' )?
                int alt26 = 2;
                int LA26_0 = input.LA(1);
                if ((LA26_0 == 36)) {
                    alt26 = 1;
                }
                switch(alt26) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1592:3: otherlv_17= 'actions' otherlv_18= '{' ( (lv_actions_19_0= ruleUIAction ) )* otherlv_20= '}'
                        {
                            otherlv_17 = (Token) match(input, 36, FOLLOW_36_in_ruleScreen3596);
                            newLeafNode(otherlv_17, grammarAccess.getScreenAccess().getActionsKeyword_11_0());
                            otherlv_18 = (Token) match(input, 19, FOLLOW_19_in_ruleScreen3608);
                            newLeafNode(otherlv_18, grammarAccess.getScreenAccess().getLeftCurlyBracketKeyword_11_1());
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1600:1: ( (lv_actions_19_0= ruleUIAction ) )*
                            loop25: do {
                                int alt25 = 2;
                                int LA25_0 = input.LA(1);
                                if ((LA25_0 == 41)) {
                                    alt25 = 1;
                                }
                                switch(alt25) {
                                    case 1:
                                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1601:1: (lv_actions_19_0= ruleUIAction )
                                        {
                                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1601:1: (lv_actions_19_0= ruleUIAction )
                                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1602:3: lv_actions_19_0= ruleUIAction
                                            {
                                                newCompositeNode(grammarAccess.getScreenAccess().getActionsUIActionParserRuleCall_11_2_0());
                                                pushFollow(FOLLOW_ruleUIAction_in_ruleScreen3629);
                                                lv_actions_19_0 = ruleUIAction();
                                                state._fsp--;
                                                if (current == null) {
                                                    current = createModelElementForParent(grammarAccess.getScreenRule());
                                                }
                                                add(current, "actions", lv_actions_19_0, "UIAction");
                                                afterParserOrEnumRuleCall();
                                            }
                                        }
                                        break;
                                    default:
                                        break loop25;
                                }
                            } while (true);
                            otherlv_20 = (Token) match(input, 20, FOLLOW_20_in_ruleScreen3642);
                            newLeafNode(otherlv_20, grammarAccess.getScreenAccess().getRightCurlyBracketKeyword_11_3());
                        }
                        break;
                }
                otherlv_21 = (Token) match(input, 20, FOLLOW_20_in_ruleScreen3656);
                newLeafNode(otherlv_21, grammarAccess.getScreenAccess().getRightCurlyBracketKeyword_12());
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 14 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project applause by applause.

the class InternalApplauseDslParser method ruleScreenKind.

// $ANTLR end "ruleRESTVerb"
// $ANTLR start "ruleScreenKind"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2929:1: ruleScreenKind returns [Enumerator current=null] : ( (enumLiteral_0= 'DefaultList' ) | (enumLiteral_1= 'DefaultDetails' ) ) ;
public final Enumerator ruleScreenKind() throws RecognitionException {
    Enumerator current = null;
    Token enumLiteral_0 = null;
    Token enumLiteral_1 = null;
    enterRule();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2931:28: ( ( (enumLiteral_0= 'DefaultList' ) | (enumLiteral_1= 'DefaultDetails' ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2932:1: ( (enumLiteral_0= 'DefaultList' ) | (enumLiteral_1= 'DefaultDetails' ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2932:1: ( (enumLiteral_0= 'DefaultList' ) | (enumLiteral_1= 'DefaultDetails' ) )
            int alt47 = 2;
            int LA47_0 = input.LA(1);
            if ((LA47_0 == 52)) {
                alt47 = 1;
            } else if ((LA47_0 == 53)) {
                alt47 = 2;
            } else {
                NoViableAltException nvae = new NoViableAltException("", 47, 0, input);
                throw nvae;
            }
            switch(alt47) {
                case 1:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2932:2: (enumLiteral_0= 'DefaultList' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2932:2: (enumLiteral_0= 'DefaultList' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2932:4: enumLiteral_0= 'DefaultList'
                        {
                            enumLiteral_0 = (Token) match(input, 52, FOLLOW_52_in_ruleScreenKind6663);
                            current = grammarAccess.getScreenKindAccess().getDefaultListEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_0, grammarAccess.getScreenKindAccess().getDefaultListEnumLiteralDeclaration_0());
                        }
                    }
                    break;
                case 2:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2938:6: (enumLiteral_1= 'DefaultDetails' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2938:6: (enumLiteral_1= 'DefaultDetails' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2938:8: enumLiteral_1= 'DefaultDetails'
                        {
                            enumLiteral_1 = (Token) match(input, 53, FOLLOW_53_in_ruleScreenKind6680);
                            current = grammarAccess.getScreenKindAccess().getDefaultDetailsEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_1, grammarAccess.getScreenKindAccess().getDefaultDetailsEnumLiteralDeclaration_1());
                        }
                    }
                    break;
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 15 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project applause by applause.

the class InternalApplauseDslParser method ruleGestureKind.

// $ANTLR end "ruleScreenKind"
// $ANTLR start "ruleGestureKind"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2948:1: ruleGestureKind returns [Enumerator current=null] : ( (enumLiteral_0= 'tap' ) | (enumLiteral_1= 'swipe' ) | (enumLiteral_2= 'longpress' ) ) ;
public final Enumerator ruleGestureKind() 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:2950:28: ( ( (enumLiteral_0= 'tap' ) | (enumLiteral_1= 'swipe' ) | (enumLiteral_2= 'longpress' ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2951:1: ( (enumLiteral_0= 'tap' ) | (enumLiteral_1= 'swipe' ) | (enumLiteral_2= 'longpress' ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2951:1: ( (enumLiteral_0= 'tap' ) | (enumLiteral_1= 'swipe' ) | (enumLiteral_2= 'longpress' ) )
            int alt48 = 3;
            switch(input.LA(1)) {
                case 54:
                    {
                        alt48 = 1;
                    }
                    break;
                case 55:
                    {
                        alt48 = 2;
                    }
                    break;
                case 56:
                    {
                        alt48 = 3;
                    }
                    break;
                default:
                    NoViableAltException nvae = new NoViableAltException("", 48, 0, input);
                    throw nvae;
            }
            switch(alt48) {
                case 1:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2951:2: (enumLiteral_0= 'tap' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2951:2: (enumLiteral_0= 'tap' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2951:4: enumLiteral_0= 'tap'
                        {
                            enumLiteral_0 = (Token) match(input, 54, FOLLOW_54_in_ruleGestureKind6725);
                            current = grammarAccess.getGestureKindAccess().getTapEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_0, grammarAccess.getGestureKindAccess().getTapEnumLiteralDeclaration_0());
                        }
                    }
                    break;
                case 2:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2957:6: (enumLiteral_1= 'swipe' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2957:6: (enumLiteral_1= 'swipe' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2957:8: enumLiteral_1= 'swipe'
                        {
                            enumLiteral_1 = (Token) match(input, 55, FOLLOW_55_in_ruleGestureKind6742);
                            current = grammarAccess.getGestureKindAccess().getSwipeEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_1, grammarAccess.getGestureKindAccess().getSwipeEnumLiteralDeclaration_1());
                        }
                    }
                    break;
                case 3:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2963:6: (enumLiteral_2= 'longpress' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2963:6: (enumLiteral_2= 'longpress' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2963:8: enumLiteral_2= 'longpress'
                        {
                            enumLiteral_2 = (Token) match(input, 56, FOLLOW_56_in_ruleGestureKind6759);
                            current = grammarAccess.getGestureKindAccess().getLongpressEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
                            newLeafNode(enumLiteral_2, grammarAccess.getGestureKindAccess().getLongpressEnumLiteralDeclaration_2());
                        }
                    }
                    break;
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Aggregations

Enumerator (org.eclipse.emf.common.util.Enumerator)29 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)28 EObject (org.eclipse.emf.ecore.EObject)16