Search in sources :

Example 31 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalNetModelParser method ruleBlockType.

// $ANTLR end "entryRuleBlockType"
// $ANTLR start "ruleBlockType"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1096:1: ruleBlockType returns [EObject current=null] : (this_Type_0= ruleType | this_ComplexTypeLiteral_1= ruleComplexTypeLiteral ) ;
public final EObject ruleBlockType() throws RecognitionException {
    EObject current = null;
    EObject this_Type_0 = null;
    EObject this_ComplexTypeLiteral_1 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1099:28: ( (this_Type_0= ruleType | this_ComplexTypeLiteral_1= ruleComplexTypeLiteral ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1100:1: (this_Type_0= ruleType | this_ComplexTypeLiteral_1= ruleComplexTypeLiteral )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1100:1: (this_Type_0= ruleType | this_ComplexTypeLiteral_1= ruleComplexTypeLiteral )
            int alt19 = 2;
            int LA19_0 = input.LA(1);
            if ((LA19_0 == RULE_ID || (LA19_0 >= 30 && LA19_0 <= 34))) {
                alt19 = 1;
            } else if ((LA19_0 == 14)) {
                alt19 = 2;
            } else {
                NoViableAltException nvae = new NoViableAltException("", 19, 0, input);
                throw nvae;
            }
            switch(alt19) {
                case 1:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1101:5: this_Type_0= ruleType
                    {
                        newCompositeNode(grammarAccess.getBlockTypeAccess().getTypeParserRuleCall_0());
                        pushFollow(FOLLOW_ruleType_in_ruleBlockType2383);
                        this_Type_0 = ruleType();
                        state._fsp--;
                        current = this_Type_0;
                        afterParserOrEnumRuleCall();
                    }
                    break;
                case 2:
                    // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1111:5: this_ComplexTypeLiteral_1= ruleComplexTypeLiteral
                    {
                        newCompositeNode(grammarAccess.getBlockTypeAccess().getComplexTypeLiteralParserRuleCall_1());
                        pushFollow(FOLLOW_ruleComplexTypeLiteral_in_ruleBlockType2410);
                        this_ComplexTypeLiteral_1 = ruleComplexTypeLiteral();
                        state._fsp--;
                        current = this_ComplexTypeLiteral_1;
                        afterParserOrEnumRuleCall();
                    }
                    break;
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Example 32 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalNetModelParser method entryRuleComplexTypeDeclaration.

// $ANTLR end "ruleUserTypeDeclaration"
// $ANTLR start "entryRuleComplexTypeDeclaration"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1596:1: entryRuleComplexTypeDeclaration returns [EObject current=null] : iv_ruleComplexTypeDeclaration= ruleComplexTypeDeclaration EOF ;
public final EObject entryRuleComplexTypeDeclaration() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleComplexTypeDeclaration = null;
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1597:2: (iv_ruleComplexTypeDeclaration= ruleComplexTypeDeclaration EOF )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1598:2: iv_ruleComplexTypeDeclaration= ruleComplexTypeDeclaration EOF
        {
            newCompositeNode(grammarAccess.getComplexTypeDeclarationRule());
            pushFollow(FOLLOW_ruleComplexTypeDeclaration_in_entryRuleComplexTypeDeclaration3506);
            iv_ruleComplexTypeDeclaration = ruleComplexTypeDeclaration();
            state._fsp--;
            current = iv_ruleComplexTypeDeclaration;
            match(input, EOF, FOLLOW_EOF_in_entryRuleComplexTypeDeclaration3516);
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Example 33 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalNetModelParser method ruleResponseBlock.

// $ANTLR end "entryRuleResponseBlock"
// $ANTLR start "ruleResponseBlock"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1030:1: ruleResponseBlock returns [EObject current=null] : ( () otherlv_1= 'response' (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? ( (lv_type_4_0= ruleBlockType ) )? ) ;
public final EObject ruleResponseBlock() throws RecognitionException {
    EObject current = null;
    Token otherlv_1 = null;
    Token otherlv_2 = null;
    Token otherlv_3 = null;
    EObject lv_type_4_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1033:28: ( ( () otherlv_1= 'response' (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? ( (lv_type_4_0= ruleBlockType ) )? ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1034:1: ( () otherlv_1= 'response' (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? ( (lv_type_4_0= ruleBlockType ) )? )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1034:1: ( () otherlv_1= 'response' (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? ( (lv_type_4_0= ruleBlockType ) )? )
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1034:2: () otherlv_1= 'response' (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )? ( (lv_type_4_0= ruleBlockType ) )?
            {
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1034:2: ()
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1035:5: 
                {
                    current = forceCreateModelElement(grammarAccess.getResponseBlockAccess().getResponseBlockAction_0(), current);
                }
                otherlv_1 = (Token) match(input, 24, FOLLOW_24_in_ruleResponseBlock2233);
                newLeafNode(otherlv_1, grammarAccess.getResponseBlockAccess().getResponseKeyword_1());
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1044:1: (otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) ) )?
                int alt17 = 2;
                int LA17_0 = input.LA(1);
                if ((LA17_0 == 25)) {
                    alt17 = 1;
                }
                switch(alt17) {
                    case 1:
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1044:3: otherlv_2= 'extends' ( (otherlv_3= RULE_ID ) )
                        {
                            otherlv_2 = (Token) match(input, 25, FOLLOW_25_in_ruleResponseBlock2246);
                            newLeafNode(otherlv_2, grammarAccess.getResponseBlockAccess().getExtendsKeyword_2_0());
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1048:1: ( (otherlv_3= RULE_ID ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1049:1: (otherlv_3= RULE_ID )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1049:1: (otherlv_3= RULE_ID )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1050:3: otherlv_3= RULE_ID
                                {
                                    if (current == null) {
                                        current = createModelElement(grammarAccess.getResponseBlockRule());
                                    }
                                    otherlv_3 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleResponseBlock2266);
                                    newLeafNode(otherlv_3, grammarAccess.getResponseBlockAccess().getSuperTypeComplexTypeDeclarationCrossReference_2_1_0());
                                }
                            }
                        }
                        break;
                }
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1061:4: ( (lv_type_4_0= ruleBlockType ) )?
                int alt18 = 2;
                int LA18_0 = input.LA(1);
                if ((LA18_0 == RULE_ID || LA18_0 == 14 || (LA18_0 >= 30 && LA18_0 <= 34))) {
                    alt18 = 1;
                }
                switch(alt18) {
                    case 1:
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1062:1: (lv_type_4_0= ruleBlockType )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1062:1: (lv_type_4_0= ruleBlockType )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:1063:3: lv_type_4_0= ruleBlockType
                            {
                                newCompositeNode(grammarAccess.getResponseBlockAccess().getTypeBlockTypeParserRuleCall_3_0());
                                pushFollow(FOLLOW_ruleBlockType_in_ruleResponseBlock2289);
                                lv_type_4_0 = ruleBlockType();
                                state._fsp--;
                                if (current == null) {
                                    current = createModelElementForParent(grammarAccess.getResponseBlockRule());
                                }
                                set(current, "type", lv_type_4_0, "BlockType");
                                afterParserOrEnumRuleCall();
                            }
                        }
                        break;
                }
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 34 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalNetModelParser method rulePath.

// $ANTLR end "entryRulePath"
// $ANTLR start "rulePath"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:602:1: rulePath returns [EObject current=null] : ( () otherlv_1= '/' ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) ) (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )* ) ;
public final EObject rulePath() throws RecognitionException {
    EObject current = null;
    Token otherlv_1 = null;
    Token otherlv_4 = null;
    AntlrDatatypeRuleToken lv_arb_2_0 = null;
    EObject lv_params_3_0 = null;
    AntlrDatatypeRuleToken lv_arb_5_0 = null;
    EObject lv_params_6_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:605:28: ( ( () otherlv_1= '/' ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) ) (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )* ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:606:1: ( () otherlv_1= '/' ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) ) (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )* )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:606:1: ( () otherlv_1= '/' ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) ) (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )* )
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:606:2: () otherlv_1= '/' ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) ) (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )*
            {
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:606:2: ()
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:607:5: 
                {
                    current = forceCreateModelElement(grammarAccess.getPathAccess().getPathAction_0(), current);
                }
                otherlv_1 = (Token) match(input, 19, FOLLOW_19_in_rulePath1318);
                newLeafNode(otherlv_1, grammarAccess.getPathAccess().getSolidusKeyword_1());
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:616:1: ( ( (lv_arb_2_0= ruleArbitraryPathSegment ) ) | ( (lv_params_3_0= ruleSimpleMemberAssignment ) ) )
                int alt10 = 2;
                int LA10_0 = input.LA(1);
                if ((LA10_0 == RULE_ID)) {
                    int LA10_1 = input.LA(2);
                    if ((LA10_1 == EOF || LA10_1 == 14 || (LA10_1 >= 19 && LA10_1 <= 20) || LA10_1 == 35)) {
                        alt10 = 1;
                    } else if ((LA10_1 == 18)) {
                        alt10 = 2;
                    } else {
                        NoViableAltException nvae = new NoViableAltException("", 10, 1, input);
                        throw nvae;
                    }
                } else if ((LA10_0 == RULE_STRING)) {
                    alt10 = 2;
                } else {
                    NoViableAltException nvae = new NoViableAltException("", 10, 0, input);
                    throw nvae;
                }
                switch(alt10) {
                    case 1:
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:616:2: ( (lv_arb_2_0= ruleArbitraryPathSegment ) )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:616:2: ( (lv_arb_2_0= ruleArbitraryPathSegment ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:617:1: (lv_arb_2_0= ruleArbitraryPathSegment )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:617:1: (lv_arb_2_0= ruleArbitraryPathSegment )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:618:3: lv_arb_2_0= ruleArbitraryPathSegment
                                {
                                    newCompositeNode(grammarAccess.getPathAccess().getArbArbitraryPathSegmentParserRuleCall_2_0_0());
                                    pushFollow(FOLLOW_ruleArbitraryPathSegment_in_rulePath1340);
                                    lv_arb_2_0 = ruleArbitraryPathSegment();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getPathRule());
                                    }
                                    add(current, "arb", lv_arb_2_0, "ArbitraryPathSegment");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                        }
                        break;
                    case 2:
                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:635:6: ( (lv_params_3_0= ruleSimpleMemberAssignment ) )
                        {
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:635:6: ( (lv_params_3_0= ruleSimpleMemberAssignment ) )
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:636:1: (lv_params_3_0= ruleSimpleMemberAssignment )
                            {
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:636:1: (lv_params_3_0= ruleSimpleMemberAssignment )
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:637:3: lv_params_3_0= ruleSimpleMemberAssignment
                                {
                                    newCompositeNode(grammarAccess.getPathAccess().getParamsSimpleMemberAssignmentParserRuleCall_2_1_0());
                                    pushFollow(FOLLOW_ruleSimpleMemberAssignment_in_rulePath1367);
                                    lv_params_3_0 = ruleSimpleMemberAssignment();
                                    state._fsp--;
                                    if (current == null) {
                                        current = createModelElementForParent(grammarAccess.getPathRule());
                                    }
                                    add(current, "params", lv_params_3_0, "SimpleMemberAssignment");
                                    afterParserOrEnumRuleCall();
                                }
                            }
                        }
                        break;
                }
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:653:3: (otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) ) )*
                loop12: do {
                    int alt12 = 2;
                    int LA12_0 = input.LA(1);
                    if ((LA12_0 == 19)) {
                        alt12 = 1;
                    }
                    switch(alt12) {
                        case 1:
                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:653:5: otherlv_4= '/' ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) )
                            {
                                otherlv_4 = (Token) match(input, 19, FOLLOW_19_in_rulePath1381);
                                newLeafNode(otherlv_4, grammarAccess.getPathAccess().getSolidusKeyword_3_0());
                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:657:1: ( ( (lv_arb_5_0= ruleArbitraryPathSegment ) ) | ( (lv_params_6_0= ruleSimpleMemberAssignment ) ) )
                                int alt11 = 2;
                                int LA11_0 = input.LA(1);
                                if ((LA11_0 == RULE_ID)) {
                                    int LA11_1 = input.LA(2);
                                    if ((LA11_1 == 18)) {
                                        alt11 = 2;
                                    } else if ((LA11_1 == EOF || LA11_1 == 14 || (LA11_1 >= 19 && LA11_1 <= 20) || LA11_1 == 35)) {
                                        alt11 = 1;
                                    } else {
                                        NoViableAltException nvae = new NoViableAltException("", 11, 1, input);
                                        throw nvae;
                                    }
                                } else if ((LA11_0 == RULE_STRING)) {
                                    alt11 = 2;
                                } else {
                                    NoViableAltException nvae = new NoViableAltException("", 11, 0, input);
                                    throw nvae;
                                }
                                switch(alt11) {
                                    case 1:
                                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:657:2: ( (lv_arb_5_0= ruleArbitraryPathSegment ) )
                                        {
                                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:657:2: ( (lv_arb_5_0= ruleArbitraryPathSegment ) )
                                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:658:1: (lv_arb_5_0= ruleArbitraryPathSegment )
                                            {
                                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:658:1: (lv_arb_5_0= ruleArbitraryPathSegment )
                                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:659:3: lv_arb_5_0= ruleArbitraryPathSegment
                                                {
                                                    newCompositeNode(grammarAccess.getPathAccess().getArbArbitraryPathSegmentParserRuleCall_3_1_0_0());
                                                    pushFollow(FOLLOW_ruleArbitraryPathSegment_in_rulePath1403);
                                                    lv_arb_5_0 = ruleArbitraryPathSegment();
                                                    state._fsp--;
                                                    if (current == null) {
                                                        current = createModelElementForParent(grammarAccess.getPathRule());
                                                    }
                                                    add(current, "arb", lv_arb_5_0, "ArbitraryPathSegment");
                                                    afterParserOrEnumRuleCall();
                                                }
                                            }
                                        }
                                        break;
                                    case 2:
                                        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:676:6: ( (lv_params_6_0= ruleSimpleMemberAssignment ) )
                                        {
                                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:676:6: ( (lv_params_6_0= ruleSimpleMemberAssignment ) )
                                            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:677:1: (lv_params_6_0= ruleSimpleMemberAssignment )
                                            {
                                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:677:1: (lv_params_6_0= ruleSimpleMemberAssignment )
                                                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:678:3: lv_params_6_0= ruleSimpleMemberAssignment
                                                {
                                                    newCompositeNode(grammarAccess.getPathAccess().getParamsSimpleMemberAssignmentParserRuleCall_3_1_1_0());
                                                    pushFollow(FOLLOW_ruleSimpleMemberAssignment_in_rulePath1430);
                                                    lv_params_6_0 = ruleSimpleMemberAssignment();
                                                    state._fsp--;
                                                    if (current == null) {
                                                        current = createModelElementForParent(grammarAccess.getPathRule());
                                                    }
                                                    add(current, "params", lv_params_6_0, "SimpleMemberAssignment");
                                                    afterParserOrEnumRuleCall();
                                                }
                                            }
                                        }
                                        break;
                                }
                            }
                            break;
                        default:
                            break loop12;
                    }
                } while (true);
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 35 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalNetModelParser method ruleBooleanType.

// $ANTLR end "entryRuleBooleanType"
// $ANTLR start "ruleBooleanType"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2097:1: ruleBooleanType returns [EObject current=null] : ( (lv_id_0_0= 'boolean' ) ) ;
public final EObject ruleBooleanType() throws RecognitionException {
    EObject current = null;
    Token lv_id_0_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2100:28: ( ( (lv_id_0_0= 'boolean' ) ) )
        // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2101:1: ( (lv_id_0_0= 'boolean' ) )
        {
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2101:1: ( (lv_id_0_0= 'boolean' ) )
            // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2102:1: (lv_id_0_0= 'boolean' )
            {
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2102:1: (lv_id_0_0= 'boolean' )
                // ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2103:3: lv_id_0_0= 'boolean'
                {
                    lv_id_0_0 = (Token) match(input, 31, FOLLOW_31_in_ruleBooleanType4649);
                    newLeafNode(lv_id_0_0, grammarAccess.getBooleanTypeAccess().getIdBooleanKeyword_0());
                    if (current == null) {
                        current = createModelElement(grammarAccess.getBooleanTypeRule());
                    }
                    setWithLastConsumed(current, "id", lv_id_0_0, "boolean");
                }
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)3043 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)974 Test (org.junit.Test)231 Resource (org.eclipse.emf.ecore.resource.Resource)108 XtextResource (org.eclipse.xtext.resource.XtextResource)101 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)89 InternalEObject (org.eclipse.emf.ecore.InternalEObject)80 Grammar (org.eclipse.xtext.Grammar)70 List (java.util.List)63 AbstractRule (org.eclipse.xtext.AbstractRule)57 URI (org.eclipse.emf.common.util.URI)53 INode (org.eclipse.xtext.nodemodel.INode)51 XtendFile (org.eclipse.xtend.core.xtend.XtendFile)49 ICompositeNode (org.eclipse.xtext.nodemodel.ICompositeNode)43 EStructuralFeature (org.eclipse.emf.ecore.EStructuralFeature)39 AbstractElement (org.eclipse.xtext.AbstractElement)38 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)38 EReference (org.eclipse.emf.ecore.EReference)37 ArrayList (java.util.ArrayList)33 XtendTypeDeclaration (org.eclipse.xtend.core.xtend.XtendTypeDeclaration)33