Search in sources :

Example 61 with AntlrDatatypeRuleToken

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

the class InternalBug287184TestLanguageParser method ruleFQN.

// $ANTLR end "entryRuleFQN"
// $ANTLR start "ruleFQN"
// InternalBug287184TestLanguage.g:270:1: ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) ;
public final AntlrDatatypeRuleToken ruleFQN() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_ID_0 = null;
    Token kw = null;
    Token this_ID_2 = null;
    enterRule();
    try {
        // InternalBug287184TestLanguage.g:276:2: ( (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* ) )
        // InternalBug287184TestLanguage.g:277:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
        {
            // InternalBug287184TestLanguage.g:277:2: (this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )* )
            // InternalBug287184TestLanguage.g:278:3: this_ID_0= RULE_ID (kw= '.' this_ID_2= RULE_ID )*
            {
                this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_8);
                current.merge(this_ID_0);
                newLeafNode(this_ID_0, grammarAccess.getFQNAccess().getIDTerminalRuleCall_0());
                // InternalBug287184TestLanguage.g:285:3: (kw= '.' this_ID_2= RULE_ID )*
                loop5: do {
                    int alt5 = 2;
                    int LA5_0 = input.LA(1);
                    if ((LA5_0 == 18)) {
                        alt5 = 1;
                    }
                    switch(alt5) {
                        case 1:
                            // InternalBug287184TestLanguage.g:286:4: kw= '.' this_ID_2= RULE_ID
                            {
                                kw = (Token) match(input, 18, FollowSets000.FOLLOW_3);
                                current.merge(kw);
                                newLeafNode(kw, grammarAccess.getFQNAccess().getFullStopKeyword_1_0());
                                this_ID_2 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_8);
                                current.merge(this_ID_2);
                                newLeafNode(this_ID_2, grammarAccess.getFQNAccess().getIDTerminalRuleCall_1_1());
                            }
                            break;
                        default:
                            break loop5;
                    }
                } while (true);
            }
        }
        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)

Example 62 with AntlrDatatypeRuleToken

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

the class InternalBug287184TestLanguageParser method entryRuleFQN.

// $ANTLR end "ruleAssociatedDetail"
// $ANTLR start "entryRuleFQN"
// InternalBug287184TestLanguage.g:263:1: entryRuleFQN returns [String current=null] : iv_ruleFQN= ruleFQN EOF ;
public final String entryRuleFQN() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleFQN = null;
    try {
        // InternalBug287184TestLanguage.g:263:43: (iv_ruleFQN= ruleFQN EOF )
        // InternalBug287184TestLanguage.g:264:2: iv_ruleFQN= ruleFQN EOF
        {
            newCompositeNode(grammarAccess.getFQNRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleFQN = ruleFQN();
            state._fsp--;
            current = iv_ruleFQN.getText();
            match(input, EOF, FollowSets000.FOLLOW_2);
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 63 with AntlrDatatypeRuleToken

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

the class InternalDatatypeRulesTestLanguageParser method ruleModelId.

// $ANTLR end "entryRuleModelId"
// $ANTLR start "ruleModelId"
// InternalDatatypeRulesTestLanguage.g:249:1: ruleModelId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID kw= '.' this_ID_2= RULE_ID ) ;
public final AntlrDatatypeRuleToken ruleModelId() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_ID_0 = null;
    Token kw = null;
    Token this_ID_2 = null;
    enterRule();
    try {
        // InternalDatatypeRulesTestLanguage.g:255:2: ( (this_ID_0= RULE_ID kw= '.' this_ID_2= RULE_ID ) )
        // InternalDatatypeRulesTestLanguage.g:256:2: (this_ID_0= RULE_ID kw= '.' this_ID_2= RULE_ID )
        {
            // InternalDatatypeRulesTestLanguage.g:256:2: (this_ID_0= RULE_ID kw= '.' this_ID_2= RULE_ID )
            // InternalDatatypeRulesTestLanguage.g:257:3: this_ID_0= RULE_ID kw= '.' this_ID_2= RULE_ID
            {
                this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_13);
                current.merge(this_ID_0);
                newLeafNode(this_ID_0, grammarAccess.getModelIdAccess().getIDTerminalRuleCall_0());
                kw = (Token) match(input, 16, FollowSets000.FOLLOW_14);
                current.merge(kw);
                newLeafNode(kw, grammarAccess.getModelIdAccess().getFullStopKeyword_1());
                this_ID_2 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
                current.merge(this_ID_2);
                newLeafNode(this_ID_2, grammarAccess.getModelIdAccess().getIDTerminalRuleCall_2());
            }
        }
        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)

Example 64 with AntlrDatatypeRuleToken

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

the class InternalDatatypeRulesTestLanguageParser method ruleFraction.

// $ANTLR end "entryRuleFraction"
// $ANTLR start "ruleFraction"
// InternalDatatypeRulesTestLanguage.g:331:1: ruleFraction returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT (kw= '/' this_INT_2= RULE_INT )? ) ;
public final AntlrDatatypeRuleToken ruleFraction() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_INT_0 = null;
    Token kw = null;
    Token this_INT_2 = null;
    enterRule();
    try {
        // InternalDatatypeRulesTestLanguage.g:337:2: ( (this_INT_0= RULE_INT (kw= '/' this_INT_2= RULE_INT )? ) )
        // InternalDatatypeRulesTestLanguage.g:338:2: (this_INT_0= RULE_INT (kw= '/' this_INT_2= RULE_INT )? )
        {
            // InternalDatatypeRulesTestLanguage.g:338:2: (this_INT_0= RULE_INT (kw= '/' this_INT_2= RULE_INT )? )
            // InternalDatatypeRulesTestLanguage.g:339:3: this_INT_0= RULE_INT (kw= '/' this_INT_2= RULE_INT )?
            {
                this_INT_0 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_15);
                current.merge(this_INT_0);
                newLeafNode(this_INT_0, grammarAccess.getFractionAccess().getINTTerminalRuleCall_0());
                // InternalDatatypeRulesTestLanguage.g:346:3: (kw= '/' this_INT_2= RULE_INT )?
                int alt6 = 2;
                int LA6_0 = input.LA(1);
                if ((LA6_0 == 17)) {
                    alt6 = 1;
                }
                switch(alt6) {
                    case 1:
                        // InternalDatatypeRulesTestLanguage.g:347:4: kw= '/' this_INT_2= RULE_INT
                        {
                            kw = (Token) match(input, 17, FollowSets000.FOLLOW_5);
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getFractionAccess().getSolidusKeyword_1_0());
                            this_INT_2 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_2);
                            current.merge(this_INT_2);
                            newLeafNode(this_INT_2, grammarAccess.getFractionAccess().getINTTerminalRuleCall_1_1());
                        }
                        break;
                }
            }
        }
        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)

Example 65 with AntlrDatatypeRuleToken

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

the class InternalDatatypeRulesTestLanguageParser method entryRuleVector.

// $ANTLR end "ruleFraction"
// $ANTLR start "entryRuleVector"
// InternalDatatypeRulesTestLanguage.g:364:1: entryRuleVector returns [String current=null] : iv_ruleVector= ruleVector EOF ;
public final String entryRuleVector() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleVector = null;
    try {
        // InternalDatatypeRulesTestLanguage.g:364:46: (iv_ruleVector= ruleVector EOF )
        // InternalDatatypeRulesTestLanguage.g:365:2: iv_ruleVector= ruleVector EOF
        {
            newCompositeNode(grammarAccess.getVectorRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleVector = ruleVector();
            state._fsp--;
            current = iv_ruleVector.getText();
            match(input, EOF, FollowSets000.FOLLOW_2);
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Aggregations

AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)350 EObject (org.eclipse.emf.ecore.EObject)105 XtextTokenStream (org.eclipse.xtext.parser.antlr.XtextTokenStream)27 HiddenTokens (org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)27 Test (org.junit.Test)10 Enumerator (org.eclipse.emf.common.util.Enumerator)4 CommonToken (org.antlr.runtime.CommonToken)3 UnorderedGroupState (org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState)3 DatatypeRuleToken (org.eclipse.xtext.parser.impl.DatatypeRuleToken)2