Search in sources :

Example 41 with HiddenTokens

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

the class InternalBeeLangTestLanguageParser method entryRulePath.

// $ANTLR end "ruleRequiredCapability"
// $ANTLR start "entryRulePath"
// InternalBeeLangTestLanguage.g:1386: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, 11)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:1388:2: (iv_rulePath= rulePath EOF )
        // InternalBeeLangTestLanguage.g:1389:2: iv_rulePath= rulePath EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getPathRule());
            }
            pushFollow(FOLLOW_1);
            iv_rulePath = rulePath();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_rulePath.getText();
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 11, 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)

Example 42 with HiddenTokens

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

the class InternalBeeLangTestLanguageParser method entryRuleQID.

// $ANTLR end "ruleParanthesizedExpression"
// $ANTLR start "entryRuleQID"
// InternalBeeLangTestLanguage.g:5384:1: entryRuleQID returns [String current=null] : iv_ruleQID= ruleQID EOF ;
public final String entryRuleQID() throws RecognitionException {
    String current = null;
    int entryRuleQID_StartIndex = input.index();
    AntlrDatatypeRuleToken iv_ruleQID = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        if (state.backtracking > 0 && alreadyParsedRule(input, 111)) {
            return current;
        }
        // InternalBeeLangTestLanguage.g:5386:2: (iv_ruleQID= ruleQID EOF )
        // InternalBeeLangTestLanguage.g:5387:2: iv_ruleQID= ruleQID EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getQIDRule());
            }
            pushFollow(FOLLOW_1);
            iv_ruleQID = ruleQID();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleQID.getText();
            }
            match(input, EOF, FOLLOW_2);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        if (state.backtracking > 0) {
            memoize(input, 111, entryRuleQID_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