Search in sources :

Example 71 with AntlrDatatypeRuleToken

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

the class InternalBug292245TestLanguageParser method entryRuleFix.

// $ANTLR end "ruleError"
// $ANTLR start "entryRuleFix"
// InternalBug292245TestLanguage.g:221:1: entryRuleFix returns [String current=null] : iv_ruleFix= ruleFix EOF ;
public final String entryRuleFix() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleFix = null;
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalBug292245TestLanguage.g:223:2: (iv_ruleFix= ruleFix EOF )
        // InternalBug292245TestLanguage.g:224:2: iv_ruleFix= ruleFix EOF
        {
            newCompositeNode(grammarAccess.getFixRule());
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleFix = ruleFix();
            state._fsp--;
            current = iv_ruleFix.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 72 with AntlrDatatypeRuleToken

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

the class InternalBug292245TestLanguageParser method ruleError.

// $ANTLR end "entryRuleError"
// $ANTLR start "ruleError"
// InternalBug292245TestLanguage.g:181:1: ruleError returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR ) ;
public final AntlrDatatypeRuleToken ruleError() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_APOSTROPHE_CHAR_0 = null;
    Token this_APOSTROPHE_CHAR_2 = null;
    AntlrDatatypeRuleToken this_Graphical_1 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens();
    try {
        // InternalBug292245TestLanguage.g:188:2: ( (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR ) )
        // InternalBug292245TestLanguage.g:189:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR )
        {
            // InternalBug292245TestLanguage.g:189:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR )
            // InternalBug292245TestLanguage.g:190:3: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR this_Graphical_1= ruleGraphical this_APOSTROPHE_CHAR_2= RULE_APOSTROPHE_CHAR
            {
                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.getErrorAccess().getAPOSTROPHE_CHARTerminalRuleCall_0());
                newCompositeNode(grammarAccess.getErrorAccess().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_2);
                current.merge(this_APOSTROPHE_CHAR_2);
                newLeafNode(this_APOSTROPHE_CHAR_2, grammarAccess.getErrorAccess().getAPOSTROPHE_CHARTerminalRuleCall_2());
            }
        }
        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 73 with AntlrDatatypeRuleToken

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

the class InternalBug292245TestLanguageParser method ruleApostrophe.

// $ANTLR end "entryRuleApostrophe"
// $ANTLR start "ruleApostrophe"
// InternalBug292245TestLanguage.g:295:1: ruleApostrophe returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR ;
public final AntlrDatatypeRuleToken ruleApostrophe() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_APOSTROPHE_CHAR_0 = null;
    enterRule();
    HiddenTokens myHiddenTokenState = ((XtextTokenStream) input).setHiddenTokens("RULE_WS");
    try {
        // InternalBug292245TestLanguage.g:302:2: (this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR )
        // InternalBug292245TestLanguage.g:303:2: this_APOSTROPHE_CHAR_0= RULE_APOSTROPHE_CHAR
        {
            this_APOSTROPHE_CHAR_0 = (Token) match(input, RULE_APOSTROPHE_CHAR, FollowSets000.FOLLOW_2);
            current.merge(this_APOSTROPHE_CHAR_0);
            newLeafNode(this_APOSTROPHE_CHAR_0, grammarAccess.getApostropheAccess().getAPOSTROPHE_CHARTerminalRuleCall());
        }
        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 74 with AntlrDatatypeRuleToken

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

the class InternalBug297105TestLanguageParser method entryRuleRealValue.

// $ANTLR end "ruleIntValue"
// $ANTLR start "entryRuleRealValue"
// InternalBug297105TestLanguage.g:305:1: entryRuleRealValue returns [String current=null] : iv_ruleRealValue= ruleRealValue EOF ;
public final String entryRuleRealValue() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleRealValue = null;
    try {
        // InternalBug297105TestLanguage.g:305:49: (iv_ruleRealValue= ruleRealValue EOF )
        // InternalBug297105TestLanguage.g:306:2: iv_ruleRealValue= ruleRealValue EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getRealValueRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleRealValue = ruleRealValue();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleRealValue.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)

Example 75 with AntlrDatatypeRuleToken

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

the class InternalBug297105TestLanguageParser method ruleRealLiteral.

// $ANTLR end "entryRuleRealLiteral"
// $ANTLR start "ruleRealLiteral"
// InternalBug297105TestLanguage.g:252:1: ruleRealLiteral returns [EObject current=null] : ( (lv_value_0_0= ruleRealValue ) ) ;
public final EObject ruleRealLiteral() throws RecognitionException {
    EObject current = null;
    AntlrDatatypeRuleToken lv_value_0_0 = null;
    enterRule();
    try {
        // InternalBug297105TestLanguage.g:258:2: ( ( (lv_value_0_0= ruleRealValue ) ) )
        // InternalBug297105TestLanguage.g:259:2: ( (lv_value_0_0= ruleRealValue ) )
        {
            // InternalBug297105TestLanguage.g:259:2: ( (lv_value_0_0= ruleRealValue ) )
            // InternalBug297105TestLanguage.g:260:3: (lv_value_0_0= ruleRealValue )
            {
                // InternalBug297105TestLanguage.g:260:3: (lv_value_0_0= ruleRealValue )
                // InternalBug297105TestLanguage.g:261:4: lv_value_0_0= ruleRealValue
                {
                    if (state.backtracking == 0) {
                        newCompositeNode(grammarAccess.getRealLiteralAccess().getValueRealValueParserRuleCall_0());
                    }
                    pushFollow(FollowSets000.FOLLOW_2);
                    lv_value_0_0 = ruleRealValue();
                    state._fsp--;
                    if (state.failed)
                        return current;
                    if (state.backtracking == 0) {
                        if (current == null) {
                            current = createModelElementForParent(grammarAccess.getRealLiteralRule());
                        }
                        set(current, "value", lv_value_0_0, "org.eclipse.xtext.parser.terminalrules.Bug297105TestLanguage.RealValue");
                        afterParserOrEnumRuleCall();
                    }
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) 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