Search in sources :

Example 91 with AntlrDatatypeRuleToken

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

the class InternalBug296889TestLanguageParser method entryRuleDataTypePreop.

// $ANTLR end "ruleDataTypeExpression"
// $ANTLR start "entryRuleDataTypePreop"
// InternalBug296889TestLanguage.g:387:1: entryRuleDataTypePreop returns [String current=null] : iv_ruleDataTypePreop= ruleDataTypePreop EOF ;
public final String entryRuleDataTypePreop() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleDataTypePreop = null;
    try {
        // InternalBug296889TestLanguage.g:387:53: (iv_ruleDataTypePreop= ruleDataTypePreop EOF )
        // InternalBug296889TestLanguage.g:388:2: iv_ruleDataTypePreop= ruleDataTypePreop EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getDataTypePreopRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleDataTypePreop = ruleDataTypePreop();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleDataTypePreop.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 92 with AntlrDatatypeRuleToken

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

the class InternalBug296889TestLanguageParser method entryRuleDataTypePostop.

// $ANTLR end "ruleDataTypePreop"
// $ANTLR start "entryRuleDataTypePostop"
// InternalBug296889TestLanguage.g:421:1: entryRuleDataTypePostop returns [String current=null] : iv_ruleDataTypePostop= ruleDataTypePostop EOF ;
public final String entryRuleDataTypePostop() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleDataTypePostop = null;
    try {
        // InternalBug296889TestLanguage.g:421:54: (iv_ruleDataTypePostop= ruleDataTypePostop EOF )
        // InternalBug296889TestLanguage.g:422:2: iv_ruleDataTypePostop= ruleDataTypePostop EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getDataTypePostopRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleDataTypePostop = ruleDataTypePostop();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleDataTypePostop.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 93 with AntlrDatatypeRuleToken

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

the class InternalBug296889TestLanguageParser method ruleDataTypeVariable.

// $ANTLR end "entryRuleDataTypeVariable"
// $ANTLR start "ruleDataTypeVariable"
// InternalBug296889TestLanguage.g:464:1: ruleDataTypeVariable returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : this_ID_0= RULE_ID ;
public final AntlrDatatypeRuleToken ruleDataTypeVariable() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_ID_0 = null;
    enterRule();
    try {
        // InternalBug296889TestLanguage.g:470:2: (this_ID_0= RULE_ID )
        // InternalBug296889TestLanguage.g:471:2: this_ID_0= RULE_ID
        {
            this_ID_0 = (Token) match(input, RULE_ID, FollowSets000.FOLLOW_2);
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current.merge(this_ID_0);
            }
            if (state.backtracking == 0) {
                newLeafNode(this_ID_0, grammarAccess.getDataTypeVariableAccess().getIDTerminalRuleCall());
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 94 with AntlrDatatypeRuleToken

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

the class InternalBug296889TestLanguageParser method ruleDataTypePreop.

// $ANTLR end "entryRuleDataTypePreop"
// $ANTLR start "ruleDataTypePreop"
// InternalBug296889TestLanguage.g:394:1: ruleDataTypePreop returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (kw= '--' this_DataTypeVariable_1= ruleDataTypeVariable ) ;
public final AntlrDatatypeRuleToken ruleDataTypePreop() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    AntlrDatatypeRuleToken this_DataTypeVariable_1 = null;
    enterRule();
    try {
        // InternalBug296889TestLanguage.g:400:2: ( (kw= '--' this_DataTypeVariable_1= ruleDataTypeVariable ) )
        // InternalBug296889TestLanguage.g:401:2: (kw= '--' this_DataTypeVariable_1= ruleDataTypeVariable )
        {
            // InternalBug296889TestLanguage.g:401:2: (kw= '--' this_DataTypeVariable_1= ruleDataTypeVariable )
            // InternalBug296889TestLanguage.g:402:3: kw= '--' this_DataTypeVariable_1= ruleDataTypeVariable
            {
                kw = (Token) match(input, 13, FollowSets000.FOLLOW_4);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(kw);
                    newLeafNode(kw, grammarAccess.getDataTypePreopAccess().getHyphenMinusHyphenMinusKeyword_0());
                }
                if (state.backtracking == 0) {
                    newCompositeNode(grammarAccess.getDataTypePreopAccess().getDataTypeVariableParserRuleCall_1());
                }
                pushFollow(FollowSets000.FOLLOW_2);
                this_DataTypeVariable_1 = ruleDataTypeVariable();
                state._fsp--;
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(this_DataTypeVariable_1);
                }
                if (state.backtracking == 0) {
                    afterParserOrEnumRuleCall();
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 95 with AntlrDatatypeRuleToken

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

the class InternalBug296889TestLanguageParser method entryRuleDataTypeVariable.

// $ANTLR end "ruleDataTypePostop"
// $ANTLR start "entryRuleDataTypeVariable"
// InternalBug296889TestLanguage.g:457:1: entryRuleDataTypeVariable returns [String current=null] : iv_ruleDataTypeVariable= ruleDataTypeVariable EOF ;
public final String entryRuleDataTypeVariable() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleDataTypeVariable = null;
    try {
        // InternalBug296889TestLanguage.g:457:56: (iv_ruleDataTypeVariable= ruleDataTypeVariable EOF )
        // InternalBug296889TestLanguage.g:458:2: iv_ruleDataTypeVariable= ruleDataTypeVariable EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getDataTypeVariableRule());
            }
            pushFollow(FollowSets000.FOLLOW_1);
            iv_ruleDataTypeVariable = ruleDataTypeVariable();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleDataTypeVariable.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)

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