Search in sources :

Example 96 with AntlrDatatypeRuleToken

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

the class InternalBug301935ExTestLanguageParser method entryRuleNL.

// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleNL"
// InternalBug301935ExTestLanguageParser.g:170:1: entryRuleNL returns [String current=null] : iv_ruleNL= ruleNL EOF ;
public final String entryRuleNL() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleNL = null;
    try {
        // InternalBug301935ExTestLanguageParser.g:170:42: (iv_ruleNL= ruleNL EOF )
        // InternalBug301935ExTestLanguageParser.g:171:2: iv_ruleNL= ruleNL EOF
        {
            newCompositeNode(grammarAccess.getNLRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleNL = ruleNL();
            state._fsp--;
            current = iv_ruleNL.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 97 with AntlrDatatypeRuleToken

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

the class InternalBug301935TestLanguageParser method entryRuleNL.

// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleNL"
// InternalBug301935TestLanguage.g:152:1: entryRuleNL returns [String current=null] : iv_ruleNL= ruleNL EOF ;
public final String entryRuleNL() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleNL = null;
    try {
        // InternalBug301935TestLanguage.g:152:42: (iv_ruleNL= ruleNL EOF )
        // InternalBug301935TestLanguage.g:153:2: iv_ruleNL= ruleNL EOF
        {
            newCompositeNode(grammarAccess.getNLRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleNL = ruleNL();
            state._fsp--;
            current = iv_ruleNL.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 98 with AntlrDatatypeRuleToken

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

the class InternalFragmentTestLanguageExParser method ruleSuffix.

// $ANTLR end "ruleFQN2"
// $ANTLR start "ruleSuffix"
// InternalFragmentTestLanguageEx.g:824:1: ruleSuffix returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '.' this_ID_1= RULE_ID (this_Suffix_2= ruleSuffix )? ) ;
public final AntlrDatatypeRuleToken ruleSuffix() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    Token this_ID_1 = null;
    AntlrDatatypeRuleToken this_Suffix_2 = null;
    enterRule();
    try {
        // InternalFragmentTestLanguageEx.g:830:2: ( (kw= '.' this_ID_1= RULE_ID (this_Suffix_2= ruleSuffix )? ) )
        // InternalFragmentTestLanguageEx.g:831:2: (kw= '.' this_ID_1= RULE_ID (this_Suffix_2= ruleSuffix )? )
        {
            // InternalFragmentTestLanguageEx.g:831:2: (kw= '.' this_ID_1= RULE_ID (this_Suffix_2= ruleSuffix )? )
            // InternalFragmentTestLanguageEx.g:832:3: kw= '.' this_ID_1= RULE_ID (this_Suffix_2= ruleSuffix )?
            {
                kw = (Token) match(input, 23, FollowSets000.FOLLOW_3);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(kw);
                    newLeafNode(kw, grammarAccess.getSuffixAccess().getFullStopKeyword_0());
                }
                this_ID_1 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_10);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(this_ID_1);
                }
                if (state.backtracking == 0) {
                    newLeafNode(this_ID_1, grammarAccess.getSuffixAccess().getIDTerminalRuleCall_1());
                }
                // InternalFragmentTestLanguageEx.g:844:3: (this_Suffix_2= ruleSuffix )?
                int alt8 = 2;
                int LA8_0 = input.LA(1);
                if ((LA8_0 == 23)) {
                    alt8 = 1;
                }
                switch(alt8) {
                    case 1:
                        // InternalFragmentTestLanguageEx.g:845:4: this_Suffix_2= ruleSuffix
                        {
                            if (state.backtracking == 0) {
                                newCompositeNode(grammarAccess.getSuffixAccess().getSuffixParserRuleCall_2());
                            }
                            pushFollow(FollowSets000.FOLLOW_2);
                            this_Suffix_2 = ruleSuffix();
                            state._fsp--;
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                current.merge(this_Suffix_2);
                            }
                            if (state.backtracking == 0) {
                                afterParserOrEnumRuleCall();
                            }
                        }
                        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)

Example 99 with AntlrDatatypeRuleToken

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

the class InternalFragmentTestLanguageExParser method ruleFQN.

// $ANTLR end "entryRuleFQN"
// $ANTLR start "ruleFQN"
// InternalFragmentTestLanguageEx.g:754:1: ruleFQN returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (this_Suffix_1= ruleSuffix )? ) ;
public final AntlrDatatypeRuleToken ruleFQN() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_ID_0 = null;
    AntlrDatatypeRuleToken this_Suffix_1 = null;
    enterRule();
    try {
        // InternalFragmentTestLanguageEx.g:760:2: ( (this_ID_0= RULE_ID (this_Suffix_1= ruleSuffix )? ) )
        // InternalFragmentTestLanguageEx.g:761:2: (this_ID_0= RULE_ID (this_Suffix_1= ruleSuffix )? )
        {
            // InternalFragmentTestLanguageEx.g:761:2: (this_ID_0= RULE_ID (this_Suffix_1= ruleSuffix )? )
            // InternalFragmentTestLanguageEx.g:762:3: this_ID_0= RULE_ID (this_Suffix_1= ruleSuffix )?
            {
                this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_10);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(this_ID_0);
                }
                if (state.backtracking == 0) {
                    newLeafNode(this_ID_0, grammarAccess.getFQNAccess().getIDTerminalRuleCall_0());
                }
                // InternalFragmentTestLanguageEx.g:769:3: (this_Suffix_1= ruleSuffix )?
                int alt6 = 2;
                int LA6_0 = input.LA(1);
                if ((LA6_0 == 23)) {
                    alt6 = 1;
                }
                switch(alt6) {
                    case 1:
                        // InternalFragmentTestLanguageEx.g:770:4: this_Suffix_1= ruleSuffix
                        {
                            if (state.backtracking == 0) {
                                newCompositeNode(grammarAccess.getFQNAccess().getSuffixParserRuleCall_1());
                            }
                            pushFollow(FollowSets000.FOLLOW_2);
                            this_Suffix_1 = ruleSuffix();
                            state._fsp--;
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                current.merge(this_Suffix_1);
                            }
                            if (state.backtracking == 0) {
                                afterParserOrEnumRuleCall();
                            }
                        }
                        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)

Example 100 with AntlrDatatypeRuleToken

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

the class InternalFragmentTestLanguageExParser method entryRuleFQN.

// $ANTLR end "rulePRFWithPredicate"
// $ANTLR start "entryRuleFQN"
// InternalFragmentTestLanguageEx.g:747:1: entryRuleFQN returns [String current=null] : iv_ruleFQN= ruleFQN EOF ;
public final String entryRuleFQN() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleFQN = null;
    try {
        // InternalFragmentTestLanguageEx.g:747:43: (iv_ruleFQN= ruleFQN EOF )
        // InternalFragmentTestLanguageEx.g:748:2: iv_ruleFQN= ruleFQN EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getFQNRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleFQN = ruleFQN();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleFQN.getText();
            }
            match(input, EOF, FollowSets000.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)

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