Search in sources :

Example 21 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method entryRuleDatatypeRule.

// $ANTLR end "ruleDatatypeHiddens"
// $ANTLR start "entryRuleDatatypeRule"
// InternalHiddenTerminalsTestLanguage.g:536:1: entryRuleDatatypeRule returns [String current=null] : iv_ruleDatatypeRule= ruleDatatypeRule EOF ;
public final String entryRuleDatatypeRule() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleDatatypeRule = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalHiddenTerminalsTestLanguage.g:538:2: (iv_ruleDatatypeRule= ruleDatatypeRule EOF )
        // InternalHiddenTerminalsTestLanguage.g:539:2: iv_ruleDatatypeRule= ruleDatatypeRule EOF
        {
            newCompositeNode(grammarAccess.getDatatypeRuleRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleDatatypeRule = ruleDatatypeRule();
            state._fsp--;
            current = iv_ruleDatatypeRule.getText();
            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) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) HiddenTokens(org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)

Example 22 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method entryRuleInheritingHiddens.

// $ANTLR end "ruleOverridingHiddensCall"
// $ANTLR start "entryRuleInheritingHiddens"
// InternalHiddenTerminalsTestLanguage.g:395:1: entryRuleInheritingHiddens returns [EObject current=null] : iv_ruleInheritingHiddens= ruleInheritingHiddens EOF ;
public final EObject entryRuleInheritingHiddens() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleInheritingHiddens = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
    try {
        // InternalHiddenTerminalsTestLanguage.g:397:2: (iv_ruleInheritingHiddens= ruleInheritingHiddens EOF )
        // InternalHiddenTerminalsTestLanguage.g:398:2: iv_ruleInheritingHiddens= ruleInheritingHiddens EOF
        {
            newCompositeNode(grammarAccess.getInheritingHiddensRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleInheritingHiddens = ruleInheritingHiddens();
            state._fsp--;
            current = iv_ruleInheritingHiddens;
            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 23 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method ruleWithHiddens.

// $ANTLR end "entryRuleWithHiddens"
// $ANTLR start "ruleWithHiddens"
// InternalHiddenTerminalsTestLanguage.g:216:1: ruleWithHiddens returns [EObject current=null] : (otherlv_0= 'with' otherlv_1= 'hiddens' ( (lv_valid_2_0= ';' ) ) ) ;
public final EObject ruleWithHiddens() throws RecognitionException {
    EObject current = null;
    Token otherlv_0 = null;
    Token otherlv_1 = null;
    Token lv_valid_2_0 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
    try {
        // InternalHiddenTerminalsTestLanguage.g:223:2: ( (otherlv_0= 'with' otherlv_1= 'hiddens' ( (lv_valid_2_0= ';' ) ) ) )
        // InternalHiddenTerminalsTestLanguage.g:224:2: (otherlv_0= 'with' otherlv_1= 'hiddens' ( (lv_valid_2_0= ';' ) ) )
        {
            // InternalHiddenTerminalsTestLanguage.g:224:2: (otherlv_0= 'with' otherlv_1= 'hiddens' ( (lv_valid_2_0= ';' ) ) )
            // InternalHiddenTerminalsTestLanguage.g:225:3: otherlv_0= 'with' otherlv_1= 'hiddens' ( (lv_valid_2_0= ';' ) )
            {
                otherlv_0 = (Token) match(input, 11, FollowSets000.FOLLOW_4);
                newLeafNode(otherlv_0, grammarAccess.getWithHiddensAccess().getWithKeyword_0());
                otherlv_1 = (Token) match(input, 9, FollowSets000.FOLLOW_6);
                newLeafNode(otherlv_1, grammarAccess.getWithHiddensAccess().getHiddensKeyword_1());
                // InternalHiddenTerminalsTestLanguage.g:233:3: ( (lv_valid_2_0= ';' ) )
                // InternalHiddenTerminalsTestLanguage.g:234:4: (lv_valid_2_0= ';' )
                {
                    // InternalHiddenTerminalsTestLanguage.g:234:4: (lv_valid_2_0= ';' )
                    // InternalHiddenTerminalsTestLanguage.g:235:5: lv_valid_2_0= ';'
                    {
                        lv_valid_2_0 = (Token) match(input, 10, FollowSets000.FOLLOW_2);
                        newLeafNode(lv_valid_2_0, grammarAccess.getWithHiddensAccess().getValidSemicolonKeyword_2_0());
                        if (current == null) {
                            current = createModelElement(grammarAccess.getWithHiddensRule());
                        }
                        setWithLastConsumed(current, "valid", true, ";");
                    }
                }
            }
        }
        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 24 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method entryRuleOverridingHiddens.

// $ANTLR end "ruleWithHiddens"
// $ANTLR start "entryRuleOverridingHiddens"
// InternalHiddenTerminalsTestLanguage.g:254:1: entryRuleOverridingHiddens returns [EObject current=null] : iv_ruleOverridingHiddens= ruleOverridingHiddens EOF ;
public final EObject entryRuleOverridingHiddens() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleOverridingHiddens = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
    try {
        // InternalHiddenTerminalsTestLanguage.g:256:2: (iv_ruleOverridingHiddens= ruleOverridingHiddens EOF )
        // InternalHiddenTerminalsTestLanguage.g:257:2: iv_ruleOverridingHiddens= ruleOverridingHiddens EOF
        {
            newCompositeNode(grammarAccess.getOverridingHiddensRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleOverridingHiddens = ruleOverridingHiddens();
            state._fsp--;
            current = iv_ruleOverridingHiddens;
            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 25 with HiddenTokens

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

the class InternalHiddenTerminalsTestLanguageParser method ruleDatatypeRule.

// $ANTLR end "entryRuleDatatypeRule"
// $ANTLR start "ruleDatatypeRule"
// InternalHiddenTerminalsTestLanguage.g:548:1: ruleDatatypeRule returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= 'rule' kw= ';' ) ;
public final AntlrDatatypeRuleToken ruleDatatypeRule() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalHiddenTerminalsTestLanguage.g:555:2: ( (kw= 'rule' kw= ';' ) )
        // InternalHiddenTerminalsTestLanguage.g:556:2: (kw= 'rule' kw= ';' )
        {
            // InternalHiddenTerminalsTestLanguage.g:556:2: (kw= 'rule' kw= ';' )
            // InternalHiddenTerminalsTestLanguage.g:557:3: kw= 'rule' kw= ';'
            {
                kw = (Token) match(input, 18, FollowSets000.FOLLOW_6);
                current.merge(kw);
                newLeafNode(kw, grammarAccess.getDatatypeRuleAccess().getRuleKeyword_0());
                kw = (Token) match(input, 10, FollowSets000.FOLLOW_2);
                current.merge(kw);
                newLeafNode(kw, grammarAccess.getDatatypeRuleAccess().getSemicolonKeyword_1());
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
        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)

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