Search in sources :

Example 41 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.

the class InternalFormatParser method entryRuleParameterizedString.

// $ANTLR end "ruleParameterizedIdentifier"
// $ANTLR start "entryRuleParameterizedString"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2146:1: entryRuleParameterizedString returns [String current=null] : iv_ruleParameterizedString= ruleParameterizedString EOF ;
public final String entryRuleParameterizedString() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleParameterizedString = null;
    try {
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2147:2: (iv_ruleParameterizedString= ruleParameterizedString EOF )
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2148:2: iv_ruleParameterizedString= ruleParameterizedString EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getParameterizedStringRule());
            }
            pushFollow(FOLLOW_ruleParameterizedString_in_entryRuleParameterizedString4723);
            iv_ruleParameterizedString = ruleParameterizedString();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleParameterizedString.getText();
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleParameterizedString4734);
            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 42 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.

the class InternalFormatParser method entryRuleOpAdd.

// $ANTLR end "ruleXAdditiveExpression"
// $ANTLR start "entryRuleOpAdd"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:3906:1: entryRuleOpAdd returns [String current=null] : iv_ruleOpAdd= ruleOpAdd EOF ;
public final String entryRuleOpAdd() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleOpAdd = null;
    try {
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:3907:2: (iv_ruleOpAdd= ruleOpAdd EOF )
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:3908:2: iv_ruleOpAdd= ruleOpAdd EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getOpAddRule());
            }
            pushFollow(FOLLOW_ruleOpAdd_in_entryRuleOpAdd9328);
            iv_ruleOpAdd = ruleOpAdd();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleOpAdd.getText();
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleOpAdd9339);
            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 43 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.

the class InternalFormatParser method ruleQualifiedName.

// $ANTLR end "entryRuleQualifiedName"
// $ANTLR start "ruleQualifiedName"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7787:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ValidID_0= ruleValidID ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )* ) ;
public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token kw = null;
    AntlrDatatypeRuleToken this_ValidID_0 = null;
    AntlrDatatypeRuleToken this_ValidID_2 = null;
    enterRule();
    try {
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7790:28: ( (this_ValidID_0= ruleValidID ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )* ) )
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7791:1: (this_ValidID_0= ruleValidID ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )* )
        {
            // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7791:1: (this_ValidID_0= ruleValidID ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )* )
            // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7792:5: this_ValidID_0= ruleValidID ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )*
            {
                if (state.backtracking == 0) {
                    newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIDParserRuleCall_0());
                }
                pushFollow(FOLLOW_ruleValidID_in_ruleQualifiedName18477);
                this_ValidID_0 = ruleValidID();
                state._fsp--;
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current.merge(this_ValidID_0);
                }
                if (state.backtracking == 0) {
                    afterParserOrEnumRuleCall();
                }
                // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7802:1: ( ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID )*
                loop142: do {
                    int alt142 = 2;
                    int LA142_0 = input.LA(1);
                    if ((LA142_0 == 36)) {
                        switch(input.LA(2)) {
                            case 54:
                                {
                                    int LA142_3 = input.LA(3);
                                    if ((synpred48_InternalFormat())) {
                                        alt142 = 1;
                                    }
                                }
                                break;
                            case 55:
                                {
                                    int LA142_4 = input.LA(3);
                                    if ((synpred48_InternalFormat())) {
                                        alt142 = 1;
                                    }
                                }
                                break;
                            case RULE_ID:
                                {
                                    int LA142_5 = input.LA(3);
                                    if ((synpred48_InternalFormat())) {
                                        alt142 = 1;
                                    }
                                }
                                break;
                        }
                    }
                    switch(alt142) {
                        case 1:
                            // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7802:2: ( ( '.' )=>kw= '.' ) this_ValidID_2= ruleValidID
                            {
                                // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7802:2: ( ( '.' )=>kw= '.' )
                                // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:7802:3: ( '.' )=>kw= '.'
                                {
                                    kw = (Token) match(input, 36, FOLLOW_36_in_ruleQualifiedName18505);
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        current.merge(kw);
                                        newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0());
                                    }
                                }
                                if (state.backtracking == 0) {
                                    newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIDParserRuleCall_1_1());
                                }
                                pushFollow(FOLLOW_ruleValidID_in_ruleQualifiedName18528);
                                this_ValidID_2 = ruleValidID();
                                state._fsp--;
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    current.merge(this_ValidID_2);
                                }
                                if (state.backtracking == 0) {
                                    afterParserOrEnumRuleCall();
                                }
                            }
                            break;
                        default:
                            break loop142;
                    }
                } while (true);
            }
        }
        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 44 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.

the class InternalFormatParser method entryRuleIdentifier.

// $ANTLR end "ruleParameterizedString"
// $ANTLR start "entryRuleIdentifier"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2206:1: entryRuleIdentifier returns [String current=null] : iv_ruleIdentifier= ruleIdentifier EOF ;
public final String entryRuleIdentifier() throws RecognitionException {
    String current = null;
    AntlrDatatypeRuleToken iv_ruleIdentifier = null;
    try {
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2207:2: (iv_ruleIdentifier= ruleIdentifier EOF )
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2208:2: iv_ruleIdentifier= ruleIdentifier EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getIdentifierRule());
            }
            pushFollow(FOLLOW_ruleIdentifier_in_entryRuleIdentifier4902);
            iv_ruleIdentifier = ruleIdentifier();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleIdentifier.getText();
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleIdentifier4913);
            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 45 with AntlrDatatypeRuleToken

use of org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken in project dsl-devkit by dsldevkit.

the class InternalFormatParser method ruleIdentifier.

// $ANTLR end "entryRuleIdentifier"
// $ANTLR start "ruleIdentifier"
// ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2215:1: ruleIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | kw= 'default' | kw= 'val' ) ;
public final AntlrDatatypeRuleToken ruleIdentifier() throws RecognitionException {
    AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
    Token this_ID_0 = null;
    Token kw = null;
    enterRule();
    try {
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2218:28: ( (this_ID_0= RULE_ID | kw= 'default' | kw= 'val' ) )
        // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2219:1: (this_ID_0= RULE_ID | kw= 'default' | kw= 'val' )
        {
            // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2219:1: (this_ID_0= RULE_ID | kw= 'default' | kw= 'val' )
            int alt41 = 3;
            switch(input.LA(1)) {
                case RULE_ID:
                    {
                        alt41 = 1;
                    }
                    break;
                case 51:
                    {
                        alt41 = 2;
                    }
                    break;
                case 52:
                    {
                        alt41 = 3;
                    }
                    break;
                default:
                    if (state.backtracking > 0) {
                        state.failed = true;
                        return current;
                    }
                    NoViableAltException nvae = new NoViableAltException("", 41, 0, input);
                    throw nvae;
            }
            switch(alt41) {
                case 1:
                    // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2219:6: this_ID_0= RULE_ID
                    {
                        this_ID_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleIdentifier4953);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(this_ID_0);
                        }
                        if (state.backtracking == 0) {
                            newLeafNode(this_ID_0, grammarAccess.getIdentifierAccess().getIDTerminalRuleCall_0());
                        }
                    }
                    break;
                case 2:
                    // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2228:2: kw= 'default'
                    {
                        kw = (Token) match(input, 51, FOLLOW_51_in_ruleIdentifier4977);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getIdentifierAccess().getDefaultKeyword_1());
                        }
                    }
                    break;
                case 3:
                    // ../com.avaloq.tools.ddk.xtext.format/src-gen/com/avaloq/tools/ddk/xtext/format/parser/antlr/internal/InternalFormat.g:2235:2: kw= 'val'
                    {
                        kw = (Token) match(input, 52, FOLLOW_52_in_ruleIdentifier4996);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            current.merge(kw);
                            newLeafNode(kw, grammarAccess.getIdentifierAccess().getValKeyword_2());
                        }
                    }
                    break;
            }
        }
        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)

Aggregations

AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)979 EObject (org.eclipse.emf.ecore.EObject)316 XtextTokenStream (org.eclipse.xtext.parser.antlr.XtextTokenStream)55 HiddenTokens (org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens)55 Enumerator (org.eclipse.emf.common.util.Enumerator)13 Test (org.junit.Test)10 CommonToken (org.antlr.runtime.CommonToken)3 UnorderedGroupState (org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper.UnorderedGroupState)3 DatatypeRuleToken (org.eclipse.xtext.parser.impl.DatatypeRuleToken)2