Search in sources :

Example 11 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method entryRuleOverridingHiddensCall.

// $ANTLR end "ruleOverridingHiddens"
// $ANTLR start "entryRuleOverridingHiddensCall"
// InternalHiddenTerminalsTestLanguage.g:331:1: entryRuleOverridingHiddensCall returns [EObject current=null] : iv_ruleOverridingHiddensCall= ruleOverridingHiddensCall EOF ;
public final EObject entryRuleOverridingHiddensCall() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleOverridingHiddensCall = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalHiddenTerminalsTestLanguage.g:333:2: (iv_ruleOverridingHiddensCall= ruleOverridingHiddensCall EOF )
        // InternalHiddenTerminalsTestLanguage.g:334:2: iv_ruleOverridingHiddensCall= ruleOverridingHiddensCall EOF
        {
            newCompositeNode(grammarAccess.getOverridingHiddensCallRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleOverridingHiddensCall = ruleOverridingHiddensCall();
            state._fsp--;
            current = iv_ruleOverridingHiddensCall;
            match(input, EOF, FollowSets000.FOLLOW_2);
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        myHiddenTokenState.restore();
    }
    return current;
}
Also used : XtextTokenStream(org.eclipse.xtext.parser.antlr.XtextTokenStream) EObject(org.eclipse.emf.ecore.EObject) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Example 12 with HiddenTokens

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

the class InternalFormatterTestLanguageParser method ruleSuppressedHiddenSubSub.

// $ANTLR end "entryRuleSuppressedHiddenSubSub"
// $ANTLR start "ruleSuppressedHiddenSubSub"
// InternalFormatterTestLanguage.g:1114:1: ruleSuppressedHiddenSubSub returns [EObject current=null] : (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' ) ;
public final EObject ruleSuppressedHiddenSubSub() throws RecognitionException {
    EObject current = null;
    Token otherlv_0 = null;
    Token lv_idval_1_0 = null;
    Token otherlv_2 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalFormatterTestLanguage.g:1121:2: ( (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' ) )
        // InternalFormatterTestLanguage.g:1122:2: (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' )
        {
            // InternalFormatterTestLanguage.g:1122:2: (otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>' )
            // InternalFormatterTestLanguage.g:1123:3: otherlv_0= '<' ( (lv_idval_1_0= RULE_ID ) ) otherlv_2= '>'
            {
                otherlv_0 = (Token) match(input, 35, FollowSets000.FOLLOW_6);
                newLeafNode(otherlv_0, grammarAccess.getSuppressedHiddenSubSubAccess().getLessThanSignKeyword_0());
                // InternalFormatterTestLanguage.g:1127:3: ( (lv_idval_1_0= RULE_ID ) )
                // InternalFormatterTestLanguage.g:1128:4: (lv_idval_1_0= RULE_ID )
                {
                    // InternalFormatterTestLanguage.g:1128:4: (lv_idval_1_0= RULE_ID )
                    // InternalFormatterTestLanguage.g:1129:5: lv_idval_1_0= RULE_ID
                    {
                        lv_idval_1_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_27);
                        newLeafNode(lv_idval_1_0, grammarAccess.getSuppressedHiddenSubSubAccess().getIdvalIDTerminalRuleCall_1_0());
                        if (current == null) {
                            current = createModelElement(grammarAccess.getSuppressedHiddenSubSubRule());
                        }
                        setWithLastConsumed(current, "idval", lv_idval_1_0, "org.eclipse.xtext.common.Terminals.ID");
                    }
                }
                otherlv_2 = (Token) match(input, 36, FollowSets000.FOLLOW_2);
                newLeafNode(otherlv_2, grammarAccess.getSuppressedHiddenSubSubAccess().getGreaterThanSignKeyword_2());
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        myHiddenTokenState.restore();
    }
    return current;
}
Also used : XtextTokenStream(org.eclipse.xtext.parser.antlr.XtextTokenStream) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Example 13 with HiddenTokens

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

the class InternalFormatterTestLanguageParser method entryRuleSuppressedHidden.

// $ANTLR end "ruleEnumeration"
// $ANTLR start "entryRuleSuppressedHidden"
// InternalFormatterTestLanguage.g:977:1: entryRuleSuppressedHidden returns [EObject current=null] : iv_ruleSuppressedHidden= ruleSuppressedHidden EOF ;
public final EObject entryRuleSuppressedHidden() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleSuppressedHidden = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalFormatterTestLanguage.g:979:2: (iv_ruleSuppressedHidden= ruleSuppressedHidden EOF )
        // InternalFormatterTestLanguage.g:980:2: iv_ruleSuppressedHidden= ruleSuppressedHidden EOF
        {
            newCompositeNode(grammarAccess.getSuppressedHiddenRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleSuppressedHidden = ruleSuppressedHidden();
            state._fsp--;
            current = iv_ruleSuppressedHidden;
            match(input, EOF, FollowSets000.FOLLOW_2);
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        myHiddenTokenState.restore();
    }
    return current;
}
Also used : XtextTokenStream(org.eclipse.xtext.parser.antlr.XtextTokenStream) EObject(org.eclipse.emf.ecore.EObject) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Example 14 with HiddenTokens

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

the class InternalSimpleBeeLangTestLanguageParser method ruleQID.

// $ANTLR end "entryRuleQID"
// $ANTLR start "ruleQID"
// InternalSimpleBeeLangTestLanguage.g:5424:1: ruleQID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* ) ;
public final AntlrDatatypeRuleToken ruleQID() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    int ruleQID_StartIndex = input.index();
    Token this_ID_0 = null;
    Token this_INT_1 = null;
    Token this_HEX_2 = null;
    Token this_ID_3 = null;
    Token kw = null;
    Token this_ID_5 = null;
    Token this_INT_6 = null;
    Token this_HEX_7 = null;
    Token this_ID_8 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 114)) {
            return current;
        }
        // InternalSimpleBeeLangTestLanguage.g:5431:2: ( (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* ) )
        // InternalSimpleBeeLangTestLanguage.g:5432:2: (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* )
        {
            // InternalSimpleBeeLangTestLanguage.g:5432:2: (this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )* )
            // InternalSimpleBeeLangTestLanguage.g:5433:3: this_ID_0= RULE_ID (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )* (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )*
            {
                this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(this_ID_0);
                }
                if (state.backtracking == 0) {
                    newLeafNode(this_ID_0, grammarAccess.getQIDAccess().getIDTerminalRuleCall_0());
                }
                // InternalSimpleBeeLangTestLanguage.g:5440:3: (this_INT_1= RULE_INT | this_HEX_2= RULE_HEX | this_ID_3= RULE_ID )*
                loop93: do {
                    int alt93 = 4;
                    switch(input.LA(1)) {
                        case RULE_INT:
                            {
                                alt93 = 1;
                            }
                            break;
                        case RULE_HEX:
                            {
                                alt93 = 2;
                            }
                            break;
                        case RULE_ID:
                            {
                                alt93 = 3;
                            }
                            break;
                    }
                    switch(alt93) {
                        case 1:
                            // InternalSimpleBeeLangTestLanguage.g:5441:4: this_INT_1= RULE_INT
                            {
                                this_INT_1 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_76);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(this_INT_1);
                                }
                                if (state.backtracking == 0) {
                                    newLeafNode(this_INT_1, grammarAccess.getQIDAccess().getINTTerminalRuleCall_1_0());
                                }
                            }
                            break;
                        case 2:
                            // InternalSimpleBeeLangTestLanguage.g:5449:4: this_HEX_2= RULE_HEX
                            {
                                this_HEX_2 = (Token) match(input, RULE_HEX, FollowSets000.FOLLOW_76);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(this_HEX_2);
                                }
                                if (state.backtracking == 0) {
                                    newLeafNode(this_HEX_2, grammarAccess.getQIDAccess().getHEXTerminalRuleCall_1_1());
                                }
                            }
                            break;
                        case 3:
                            // InternalSimpleBeeLangTestLanguage.g:5457:4: this_ID_3= RULE_ID
                            {
                                this_ID_3 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(this_ID_3);
                                }
                                if (state.backtracking == 0) {
                                    newLeafNode(this_ID_3, grammarAccess.getQIDAccess().getIDTerminalRuleCall_1_2());
                                }
                            }
                            break;
                        default:
                            break loop93;
                    }
                } while (true);
                // InternalSimpleBeeLangTestLanguage.g:5465:3: (kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )* )*
                loop95: do {
                    int alt95 = 2;
                    int LA95_0 = input.LA(1);
                    if ((LA95_0 == 67)) {
                        alt95 = 1;
                    }
                    switch(alt95) {
                        case 1:
                            // InternalSimpleBeeLangTestLanguage.g:5466:4: kw= '.' this_ID_5= RULE_ID (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )*
                            {
                                kw = (Token) match(input, 67, FollowSets000.FOLLOW_8);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(kw);
                                    newLeafNode(kw, grammarAccess.getQIDAccess().getFullStopKeyword_2_0());
                                }
                                this_ID_5 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(this_ID_5);
                                }
                                if (state.backtracking == 0) {
                                    newLeafNode(this_ID_5, grammarAccess.getQIDAccess().getIDTerminalRuleCall_2_1());
                                }
                                // InternalSimpleBeeLangTestLanguage.g:5478:4: (this_INT_6= RULE_INT | this_HEX_7= RULE_HEX | this_ID_8= RULE_ID )*
                                loop94: do {
                                    int alt94 = 4;
                                    switch(input.LA(1)) {
                                        case RULE_INT:
                                            {
                                                alt94 = 1;
                                            }
                                            break;
                                        case RULE_HEX:
                                            {
                                                alt94 = 2;
                                            }
                                            break;
                                        case RULE_ID:
                                            {
                                                alt94 = 3;
                                            }
                                            break;
                                    }
                                    switch(alt94) {
                                        case 1:
                                            // InternalSimpleBeeLangTestLanguage.g:5479:5: this_INT_6= RULE_INT
                                            {
                                                this_INT_6 = (Token) match(input, RULE_INT, FollowSets000.FOLLOW_76);
                                                if (state.failed)
                                                    return current;
                                                if (state.backtracking == 0) {
                                                    current.merge(this_INT_6);
                                                }
                                                if (state.backtracking == 0) {
                                                    newLeafNode(this_INT_6, grammarAccess.getQIDAccess().getINTTerminalRuleCall_2_2_0());
                                                }
                                            }
                                            break;
                                        case 2:
                                            // InternalSimpleBeeLangTestLanguage.g:5487:5: this_HEX_7= RULE_HEX
                                            {
                                                this_HEX_7 = (Token) match(input, RULE_HEX, FollowSets000.FOLLOW_76);
                                                if (state.failed)
                                                    return current;
                                                if (state.backtracking == 0) {
                                                    current.merge(this_HEX_7);
                                                }
                                                if (state.backtracking == 0) {
                                                    newLeafNode(this_HEX_7, grammarAccess.getQIDAccess().getHEXTerminalRuleCall_2_2_1());
                                                }
                                            }
                                            break;
                                        case 3:
                                            // InternalSimpleBeeLangTestLanguage.g:5495:5: this_ID_8= RULE_ID
                                            {
                                                this_ID_8 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_76);
                                                if (state.failed)
                                                    return current;
                                                if (state.backtracking == 0) {
                                                    current.merge(this_ID_8);
                                                }
                                                if (state.backtracking == 0) {
                                                    newLeafNode(this_ID_8, grammarAccess.getQIDAccess().getIDTerminalRuleCall_2_2_2());
                                                }
                                            }
                                            break;
                                        default:
                                            break loop94;
                                    }
                                } while (true);
                            }
                            break;
                        default:
                            break loop95;
                    }
                } while (true);
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 114, ruleQID_StartIndex);
        }
        myHiddenTokenState.restore();
    }
    return current;
}
Also used : XtextTokenStream(org.eclipse.xtext.parser.antlr.XtextTokenStream) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Example 15 with HiddenTokens

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

the class InternalExBeeLangTestLanguageParser method entryRulePath.

// $ANTLR end "ruleRequiredCapability"
// $ANTLR start "entryRulePath"
// InternalExBeeLangTestLanguageParser.g:1407:1: entryRulePath returns [String current=null] : iv_rulePath= rulePath EOF ;
public final String entryRulePath() throws RecognitionException {
    String current = null;
    int entryRulePath_StartIndex = input.index();
    AntlrDatatypeRuleToken iv_rulePath = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 13)) {
            return current;
        }
        // InternalExBeeLangTestLanguageParser.g:1409:2: (iv_rulePath= rulePath EOF )
        // InternalExBeeLangTestLanguageParser.g:1410:2: iv_rulePath= rulePath EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getPathRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_rulePath = rulePath();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_rulePath.getText();
            }
            match(input, EOF, FollowSets000.FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 13, entryRulePath_StartIndex);
        }
        myHiddenTokenState.restore();
    }
    return current;
}
Also used : XtextTokenStream(org.eclipse.xtext.parser.antlr.XtextTokenStream) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Aggregations

XtextTokenStream (org.eclipse.xtext.parser.antlr.XtextTokenStream)42 HiddenTokens (org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)42 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)34 EObject (org.eclipse.emf.ecore.EObject)16