Search in sources :

Example 21 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.

the class InternalTypesParser method ruleTStructField.

// $ANTLR end "entryRuleTStructField"
// $ANTLR start "ruleTStructField"
// InternalTypesParser.g:5473:1: ruleTStructField returns [EObject current=null] : ( ( (lv_name_0_0= ruleIdentifierName ) ) ( (lv_optional_1_0= QuestionMark ) )? (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )? ) ;
public final EObject ruleTStructField() throws RecognitionException {
    EObject current = null;
    Token lv_optional_1_0 = null;
    AntlrDatatypeRuleToken lv_name_0_0 = null;
    EObject this_ColonSepTypeRef_2 = null;
    enterRule();
    try {
        // InternalTypesParser.g:5479:2: ( ( ( (lv_name_0_0= ruleIdentifierName ) ) ( (lv_optional_1_0= QuestionMark ) )? (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )? ) )
        // InternalTypesParser.g:5480:2: ( ( (lv_name_0_0= ruleIdentifierName ) ) ( (lv_optional_1_0= QuestionMark ) )? (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )? )
        {
            // InternalTypesParser.g:5480:2: ( ( (lv_name_0_0= ruleIdentifierName ) ) ( (lv_optional_1_0= QuestionMark ) )? (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )? )
            // InternalTypesParser.g:5481:3: ( (lv_name_0_0= ruleIdentifierName ) ) ( (lv_optional_1_0= QuestionMark ) )? (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )?
            {
                // InternalTypesParser.g:5481:3: ( (lv_name_0_0= ruleIdentifierName ) )
                // InternalTypesParser.g:5482:4: (lv_name_0_0= ruleIdentifierName )
                {
                    // InternalTypesParser.g:5482:4: (lv_name_0_0= ruleIdentifierName )
                    // InternalTypesParser.g:5483:5: lv_name_0_0= ruleIdentifierName
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getTStructFieldAccess().getNameIdentifierNameParserRuleCall_0_0());
                        }
                        pushFollow(FOLLOW_91);
                        lv_name_0_0 = ruleIdentifierName();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getTStructFieldRule());
                            }
                            set(current, "name", lv_name_0_0, "org.eclipse.n4js.ts.TypeExpressions.IdentifierName");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
                // InternalTypesParser.g:5500:3: ( (lv_optional_1_0= QuestionMark ) )?
                int alt107 = 2;
                int LA107_0 = input.LA(1);
                if ((LA107_0 == QuestionMark)) {
                    alt107 = 1;
                }
                switch(alt107) {
                    case 1:
                        // InternalTypesParser.g:5501:4: (lv_optional_1_0= QuestionMark )
                        {
                            // InternalTypesParser.g:5501:4: (lv_optional_1_0= QuestionMark )
                            // InternalTypesParser.g:5502:5: lv_optional_1_0= QuestionMark
                            {
                                lv_optional_1_0 = (Token) match(input, QuestionMark, FOLLOW_91);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    newLeafNode(lv_optional_1_0, grammarAccess.getTStructFieldAccess().getOptionalQuestionMarkKeyword_1_0());
                                }
                                if (state.backtracking == 0) {
                                    if (current == null) {
                                        current = createModelElement(grammarAccess.getTStructFieldRule());
                                    }
                                    setWithLastConsumed(current, "optional", true, "?");
                                }
                            }
                        }
                        break;
                }
                // InternalTypesParser.g:5514:3: (this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current] )?
                int alt108 = 2;
                int LA108_0 = input.LA(1);
                if ((LA108_0 == Colon)) {
                    alt108 = 1;
                }
                switch(alt108) {
                    case 1:
                        // InternalTypesParser.g:5515:4: this_ColonSepTypeRef_2= ruleColonSepTypeRef[$current]
                        {
                            if (state.backtracking == 0) {
                                if (current == null) {
                                    current = createModelElement(grammarAccess.getTStructFieldRule());
                                }
                                newCompositeNode(grammarAccess.getTStructFieldAccess().getColonSepTypeRefParserRuleCall_2());
                            }
                            pushFollow(FOLLOW_2);
                            this_ColonSepTypeRef_2 = ruleColonSepTypeRef(current);
                            state._fsp--;
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                current = this_ColonSepTypeRef_2;
                                afterParserOrEnumRuleCall();
                            }
                        }
                        break;
                }
            }
        }
        if (state.backtracking == 0) {
            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 22 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.

the class InternalTypesParser method ruleVirtualBaseType.

// $ANTLR end "entryRuleVirtualBaseType"
// $ANTLR start "ruleVirtualBaseType"
// InternalTypesParser.g:1449:1: ruleVirtualBaseType returns [EObject current=null] : ( () otherlv_1= VirtualBase ( (lv_name_2_0= ruleBindingTypesIdentifier ) ) (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_5= LeftCurlyBracket ( (lv_ownedMembers_6_0= ruleTMember ) )* otherlv_7= RightCurlyBracket ) ;
public final EObject ruleVirtualBaseType() throws RecognitionException {
    EObject current = null;
    Token otherlv_1 = null;
    Token otherlv_3 = null;
    Token otherlv_5 = null;
    Token otherlv_7 = null;
    AntlrDatatypeRuleToken lv_name_2_0 = null;
    EObject lv_declaredElementType_4_0 = null;
    EObject lv_ownedMembers_6_0 = null;
    enterRule();
    try {
        // InternalTypesParser.g:1455:2: ( ( () otherlv_1= VirtualBase ( (lv_name_2_0= ruleBindingTypesIdentifier ) ) (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_5= LeftCurlyBracket ( (lv_ownedMembers_6_0= ruleTMember ) )* otherlv_7= RightCurlyBracket ) )
        // InternalTypesParser.g:1456:2: ( () otherlv_1= VirtualBase ( (lv_name_2_0= ruleBindingTypesIdentifier ) ) (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_5= LeftCurlyBracket ( (lv_ownedMembers_6_0= ruleTMember ) )* otherlv_7= RightCurlyBracket )
        {
            // InternalTypesParser.g:1456:2: ( () otherlv_1= VirtualBase ( (lv_name_2_0= ruleBindingTypesIdentifier ) ) (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_5= LeftCurlyBracket ( (lv_ownedMembers_6_0= ruleTMember ) )* otherlv_7= RightCurlyBracket )
            // InternalTypesParser.g:1457:3: () otherlv_1= VirtualBase ( (lv_name_2_0= ruleBindingTypesIdentifier ) ) (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )? otherlv_5= LeftCurlyBracket ( (lv_ownedMembers_6_0= ruleTMember ) )* otherlv_7= RightCurlyBracket
            {
                // InternalTypesParser.g:1457:3: ()
                // InternalTypesParser.g:1458:4:
                {
                    if (state.backtracking == 0) {
                        current = forceCreateModelElement(grammarAccess.getVirtualBaseTypeAccess().getVirtualBaseTypeAction_0(), current);
                    }
                }
                otherlv_1 = (Token) match(input, VirtualBase, FOLLOW_10);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_1, grammarAccess.getVirtualBaseTypeAccess().getVirtualBaseKeyword_1());
                }
                // InternalTypesParser.g:1468:3: ( (lv_name_2_0= ruleBindingTypesIdentifier ) )
                // InternalTypesParser.g:1469:4: (lv_name_2_0= ruleBindingTypesIdentifier )
                {
                    // InternalTypesParser.g:1469:4: (lv_name_2_0= ruleBindingTypesIdentifier )
                    // InternalTypesParser.g:1470:5: lv_name_2_0= ruleBindingTypesIdentifier
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getVirtualBaseTypeAccess().getNameBindingTypesIdentifierParserRuleCall_2_0());
                        }
                        pushFollow(FOLLOW_13);
                        lv_name_2_0 = ruleBindingTypesIdentifier();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getVirtualBaseTypeRule());
                            }
                            set(current, "name", lv_name_2_0, "org.eclipse.n4js.ts.Types.BindingTypesIdentifier");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
                // InternalTypesParser.g:1487:3: (otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) ) )?
                int alt28 = 2;
                int LA28_0 = input.LA(1);
                if ((LA28_0 == Indexed)) {
                    alt28 = 1;
                }
                switch(alt28) {
                    case 1:
                        // InternalTypesParser.g:1488:4: otherlv_3= Indexed ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) )
                        {
                            otherlv_3 = (Token) match(input, Indexed, FOLLOW_14);
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                newLeafNode(otherlv_3, grammarAccess.getVirtualBaseTypeAccess().getIndexedKeyword_3_0());
                            }
                            // InternalTypesParser.g:1492:4: ( (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal ) )
                            // InternalTypesParser.g:1493:5: (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal )
                            {
                                // InternalTypesParser.g:1493:5: (lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal )
                                // InternalTypesParser.g:1494:6: lv_declaredElementType_4_0= ruleParameterizedTypeRefNominal
                                {
                                    if (state.backtracking == 0) {
                                        newCompositeNode(grammarAccess.getVirtualBaseTypeAccess().getDeclaredElementTypeParameterizedTypeRefNominalParserRuleCall_3_1_0());
                                    }
                                    pushFollow(FOLLOW_15);
                                    lv_declaredElementType_4_0 = ruleParameterizedTypeRefNominal();
                                    state._fsp--;
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        if (current == null) {
                                            current = createModelElementForParent(grammarAccess.getVirtualBaseTypeRule());
                                        }
                                        set(current, "declaredElementType", lv_declaredElementType_4_0, "org.eclipse.n4js.ts.TypeExpressions.ParameterizedTypeRefNominal");
                                        afterParserOrEnumRuleCall();
                                    }
                                }
                            }
                        }
                        break;
                }
                otherlv_5 = (Token) match(input, LeftCurlyBracket, FOLLOW_32);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_5, grammarAccess.getVirtualBaseTypeAccess().getLeftCurlyBracketKeyword_4());
                }
                // InternalTypesParser.g:1516:3: ( (lv_ownedMembers_6_0= ruleTMember ) )*
                loop29: do {
                    int alt29 = 2;
                    int LA29_0 = input.LA(1);
                    if ((LA29_0 == ProtectedInternal || LA29_0 == PublicInternal || LA29_0 == Protected || (LA29_0 >= Private && LA29_0 <= Project) || LA29_0 == Public)) {
                        alt29 = 1;
                    }
                    switch(alt29) {
                        case 1:
                            // InternalTypesParser.g:1517:4: (lv_ownedMembers_6_0= ruleTMember )
                            {
                                // InternalTypesParser.g:1517:4: (lv_ownedMembers_6_0= ruleTMember )
                                // InternalTypesParser.g:1518:5: lv_ownedMembers_6_0= ruleTMember
                                {
                                    if (state.backtracking == 0) {
                                        newCompositeNode(grammarAccess.getVirtualBaseTypeAccess().getOwnedMembersTMemberParserRuleCall_5_0());
                                    }
                                    pushFollow(FOLLOW_32);
                                    lv_ownedMembers_6_0 = ruleTMember();
                                    state._fsp--;
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        if (current == null) {
                                            current = createModelElementForParent(grammarAccess.getVirtualBaseTypeRule());
                                        }
                                        add(current, "ownedMembers", lv_ownedMembers_6_0, "org.eclipse.n4js.ts.Types.TMember");
                                        afterParserOrEnumRuleCall();
                                    }
                                }
                            }
                            break;
                        default:
                            break loop29;
                    }
                } while (true);
                otherlv_7 = (Token) match(input, RightCurlyBracket, FOLLOW_2);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_7, grammarAccess.getVirtualBaseTypeAccess().getRightCurlyBracketKeyword_6());
                }
            }
        }
        if (state.backtracking == 0) {
            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 23 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.

the class InternalTypesParser method entryRuleReservedWord.

// $ANTLR end "ruleIdentifierName"
// $ANTLR start "entryRuleReservedWord"
// InternalTypesParser.g:6290:1: entryRuleReservedWord returns [String current=null] : iv_ruleReservedWord= ruleReservedWord EOF ;
public final String entryRuleReservedWord() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleReservedWord = null;
    try {
        // InternalTypesParser.g:6290:52: (iv_ruleReservedWord= ruleReservedWord EOF )
        // InternalTypesParser.g:6291:2: iv_ruleReservedWord= ruleReservedWord EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getReservedWordRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleReservedWord = ruleReservedWord();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleReservedWord.getText();
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 24 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.

the class InternalTypesParser method entryRuleVoidOrBindingIdentifier.

// $ANTLR end "ruleBindingTypesIdentifier"
// $ANTLR start "entryRuleVoidOrBindingIdentifier"
// InternalTypesParser.g:980:1: entryRuleVoidOrBindingIdentifier returns [String current=null] : iv_ruleVoidOrBindingIdentifier= ruleVoidOrBindingIdentifier EOF ;
public final String entryRuleVoidOrBindingIdentifier() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleVoidOrBindingIdentifier = null;
    try {
        // InternalTypesParser.g:980:63: (iv_ruleVoidOrBindingIdentifier= ruleVoidOrBindingIdentifier EOF )
        // InternalTypesParser.g:981:2: iv_ruleVoidOrBindingIdentifier= ruleVoidOrBindingIdentifier EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getVoidOrBindingIdentifierRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleVoidOrBindingIdentifier = ruleVoidOrBindingIdentifier();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleVoidOrBindingIdentifier.getText();
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 25 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project n4js by eclipse.

the class InternalTypesParser method ruleTypeReferenceName.

// $ANTLR end "entryRuleTypeReferenceName"
// $ANTLR start "ruleTypeReferenceName"
// InternalTypesParser.g:643:1: ruleTypeReferenceName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= Void | kw= Any | kw= Undefined | kw= Null | kw= Indexed | (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* ) ) ;
public final AntlrDatatypeRuleToken ruleTypeReferenceName() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    Token this_IDENTIFIER_5 = null;
    Token this_IDENTIFIER_7 = null;
    enterRule();
    try {
        // InternalTypesParser.g:649:2: ( (kw= Void | kw= Any | kw= Undefined | kw= Null | kw= Indexed | (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* ) ) )
        // InternalTypesParser.g:650:2: (kw= Void | kw= Any | kw= Undefined | kw= Null | kw= Indexed | (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* ) )
        {
            // InternalTypesParser.g:650:2: (kw= Void | kw= Any | kw= Undefined | kw= Null | kw= Indexed | (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* ) )
            int alt13 = 6;
            switch(input.LA(1)) {
                case Void:
                    {
                        alt13 = 1;
                    }
                    break;
                case Any:
                    {
                        alt13 = 2;
                    }
                    break;
                case Undefined:
                    {
                        alt13 = 3;
                    }
                    break;
                case Null:
                    {
                        alt13 = 4;
                    }
                    break;
                case Indexed:
                    {
                        alt13 = 5;
                    }
                    break;
                case RULE_IDENTIFIER:
                    {
                        alt13 = 6;
                    }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return current;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 13, 0, input);
                    throw nvae;
            }
            switch(alt13) {
                case 1:
                    // InternalTypesParser.g:651:3: kw= Void
                    {
                        kw = (Token) match(input, Void, FOLLOW_2);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getVoidKeyword_0());
                        }
                    }
                    break;
                case 2:
                    // InternalTypesParser.g:657:3: kw= Any
                    {
                        kw = (Token) match(input, Any, FOLLOW_2);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getAnyKeyword_1());
                        }
                    }
                    break;
                case 3:
                    // InternalTypesParser.g:663:3: kw= Undefined
                    {
                        kw = (Token) match(input, Undefined, FOLLOW_2);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getUndefinedKeyword_2());
                        }
                    }
                    break;
                case 4:
                    // InternalTypesParser.g:669:3: kw= Null
                    {
                        kw = (Token) match(input, Null, FOLLOW_2);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getNullKeyword_3());
                        }
                    }
                    break;
                case 5:
                    // InternalTypesParser.g:675:3: kw= Indexed
                    {
                        kw = (Token) match(input, Indexed, FOLLOW_2);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getIndexedKeyword_4());
                        }
                    }
                    break;
                case 6:
                    // InternalTypesParser.g:681:3: (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* )
                    {
                        // InternalTypesParser.g:681:3: (this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )* )
                        // InternalTypesParser.g:682:4: this_IDENTIFIER_5= RULE_IDENTIFIER (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )*
                        {
                            this_IDENTIFIER_5 = (Token) match(input, RULE_IDENTIFIER, FOLLOW_19);
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                current.merge(this_IDENTIFIER_5);
                            }
                            if (state.backtracking == 0) {
                                newLeafNode(this_IDENTIFIER_5, grammarAccess.getTypeReferenceNameAccess().getIDENTIFIERTerminalRuleCall_5_0());
                            }
                            // InternalTypesParser.g:689:4: (kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER )*
                            loop12: do {
                                int alt12 = 2;
                                int LA12_0 = input.LA(1);
                                if ((LA12_0 == Solidus)) {
                                    alt12 = 1;
                                }
                                switch(alt12) {
                                    case 1:
                                        // InternalTypesParser.g:690:5: kw= Solidus this_IDENTIFIER_7= RULE_IDENTIFIER
                                        {
                                            kw = (Token) match(input, Solidus, FOLLOW_4);
                                            if (state.failed)
                                                return current;
                                            if (state.backtracking == 0) {
                                                current.merge(kw);
                                                newLeafNode(kw, grammarAccess.getTypeReferenceNameAccess().getSolidusKeyword_5_1_0());
                                            }
                                            this_IDENTIFIER_7 = (Token) match(input, RULE_IDENTIFIER, FOLLOW_19);
                                            if (state.failed)
                                                return current;
                                            if (state.backtracking == 0) {
                                                current.merge(this_IDENTIFIER_7);
                                            }
                                            if (state.backtracking == 0) {
                                                newLeafNode(this_IDENTIFIER_7, grammarAccess.getTypeReferenceNameAccess().getIDENTIFIERTerminalRuleCall_5_1_1());
                                            }
                                        }
                                        break;
                                    default:
                                        break loop12;
                                }
                            } while (true);
                        }
                    }
                    break;
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Aggregations

AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)979 EObject (org.eclipse.emf.ecore.EObject)316 XtextTokenStream (org.eclipse.xtext.parser.antlr.XtextTokenStream)55 HiddenTokens (org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)55 Enumerator (org.eclipse.emf.common.util.Enumerator)13 Test (org.junit.Test)10 CommonToken (org.antlr.runtime.CommonToken)3 UnorderedGroupState (org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState)3 DatatypeRuleToken (org.eclipse.xtext.parser.impl.DatatypeRuleToken)2