Search in sources :

Example 26 with HiddenTokens

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

the class InternalBug292245TestLanguageParser method ruleRehide.

// $ANTLR end "entryRuleRehide"
// $ANTLR start "ruleRehide"
// InternalBug292245TestLanguage.g:328:1: ruleRehide returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '^' )? ;
public final AntlrDatatypeRuleToken ruleRehide() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalBug292245TestLanguage.g:335:2: ( (kw= '^' )? )
        // InternalBug292245TestLanguage.g:336:2: (kw= '^' )?
        {
            // InternalBug292245TestLanguage.g:336:2: (kw= '^' )?
            int alt5 = 2;
            int LA5_0 = input.LA(1);
            if ((LA5_0 == 10)) {
                alt5 = 1;
            }
            switch(alt5) {
                case 1:
                    // InternalBug292245TestLanguage.g:337:3: kw= '^'
                    {
                        kw = (Token) match(input, 10, FollowSets000.FOLLOW_2);
                        current.merge(kw);
                        newLeafNode(kw, grammarAccess.getRehideAccess().getCircumflexAccentKeyword());
                    }
                    break;
            }
        }
        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)

Example 27 with HiddenTokens

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

the class InternalBug292245TestLanguageParser method entryRuleError.

// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleError"
// InternalBug292245TestLanguage.g:169:1: entryRuleError returns [String current=null] : iv_ruleError= ruleError EOF ;
public final String entryRuleError() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleError = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalBug292245TestLanguage.g:171:2: (iv_ruleError= ruleError EOF )
        // InternalBug292245TestLanguage.g:172:2: iv_ruleError= ruleError EOF
        {
            newCompositeNode(grammarAccess.getErrorRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleError = ruleError();
            state._fsp--;
            current = iv_ruleError.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 28 with HiddenTokens

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

the class InternalBug292245TestLanguageParser method entryRuleApostrophe.

// $ANTLR end "ruleFix"
// $ANTLR start "entryRuleApostrophe"
// InternalBug292245TestLanguage.g:283:1: entryRuleApostrophe returns [String current=null] : iv_ruleApostrophe= ruleApostrophe EOF ;
public final String entryRuleApostrophe() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleApostrophe = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalBug292245TestLanguage.g:285:2: (iv_ruleApostrophe= ruleApostrophe EOF )
        // InternalBug292245TestLanguage.g:286:2: iv_ruleApostrophe= ruleApostrophe EOF
        {
            newCompositeNode(grammarAccess.getApostropheRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleApostrophe = ruleApostrophe();
            state._fsp--;
            current = iv_ruleApostrophe.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 29 with HiddenTokens

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

the class InternalBug292245TestLanguageParser method entryRuleRehide.

// $ANTLR end "ruleApostrophe"
// $ANTLR start "entryRuleRehide"
// InternalBug292245TestLanguage.g:316:1: entryRuleRehide returns [String current=null] : iv_ruleRehide= ruleRehide EOF ;
public final String entryRuleRehide() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleRehide = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalBug292245TestLanguage.g:318:2: (iv_ruleRehide= ruleRehide EOF )
        // InternalBug292245TestLanguage.g:319:2: iv_ruleRehide= ruleRehide EOF
        {
            newCompositeNode(grammarAccess.getRehideRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleRehide = ruleRehide();
            state._fsp--;
            current = iv_ruleRehide.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 30 with HiddenTokens

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

the class InternalBug292245TestLanguageParser method ruleFix.

// $ANTLR end "entryRuleFix"
// $ANTLR start "ruleFix"
// InternalBug292245TestLanguage.g:233:1: ruleFix returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide ) ;
public final AntlrDatatypeRuleToken ruleFix() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_APOSTROPHE_CHAR_0 = null;
    Token this_APOSTROPHE_CHAR_2 = null;
    AntlrDatatypeRuleToken this_Graphical_1 = null;
    AntlrDatatypeRuleToken this_Rehide_3 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalBug292245TestLanguage.g:240:2: ( (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide ) )
        // InternalBug292245TestLanguage.g:241:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide )
        {
            // InternalBug292245TestLanguage.g:241:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide )
            // InternalBug292245TestLanguage.g:242:3: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR this_Rehide_3= ruleRehide
            {
                this_APOSTROPHE_CHAR_0 = (Token) match(input, RULE_APOSTROPHE_CHAR, FollowSets000.FOLLOW_5);
                current.merge(this_APOSTROPHE_CHAR_0);
                newLeafNode(this_APOSTROPHE_CHAR_0, grammarAccess.getFixAccess().getAPOSTROPHE_CHARTerminalRuleCall_0());
                newCompositeNode(grammarAccess.getFixAccess().getGraphicalParserRuleCall_1());
                pushFollow(FollowSets000.FOLLOW_3);
                this_Graphical_1 = ruleGraphical();
                state._fsp--;
                current.merge(this_Graphical_1);
                afterParserOrEnumRuleCall();
                this_APOSTROPHE_CHAR_2 = (Token) match(input, RULE_APOSTROPHE_CHAR, FollowSets000.FOLLOW_6);
                current.merge(this_APOSTROPHE_CHAR_2);
                newLeafNode(this_APOSTROPHE_CHAR_2, grammarAccess.getFixAccess().getAPOSTROPHE_CHARTerminalRuleCall_2());
                newCompositeNode(grammarAccess.getFixAccess().getRehideParserRuleCall_3());
                pushFollow(FollowSets000.FOLLOW_2);
                this_Rehide_3 = ruleRehide();
                state._fsp--;
                current.merge(this_Rehide_3);
                afterParserOrEnumRuleCall();
            }
        }
        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