Search in sources :

Example 16 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project applause by applause.

the class InternalApplauseDslParser method ruleUIActionNavigateAction.

// $ANTLR end "entryRuleUIActionNavigateAction"
// $ANTLR start "ruleUIActionNavigateAction"
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2185:1: ruleUIActionNavigateAction returns [EObject current=null] : ( () ( (otherlv_1= RULE_ID ) ) otherlv_2= '.' ( (lv_actionVerb_3_0= ruleActionVerb ) ) otherlv_4= '(' ( (otherlv_5= RULE_ID ) )? otherlv_6= ')' ) ;
public final EObject ruleUIActionNavigateAction() throws RecognitionException {
    EObject current = null;
    Token otherlv_1 = null;
    Token otherlv_2 = null;
    Token otherlv_4 = null;
    Token otherlv_5 = null;
    Token otherlv_6 = null;
    Enumerator lv_actionVerb_3_0 = null;
    enterRule();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2188:28: ( ( () ( (otherlv_1= RULE_ID ) ) otherlv_2= '.' ( (lv_actionVerb_3_0= ruleActionVerb ) ) otherlv_4= '(' ( (otherlv_5= RULE_ID ) )? otherlv_6= ')' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2189:1: ( () ( (otherlv_1= RULE_ID ) ) otherlv_2= '.' ( (lv_actionVerb_3_0= ruleActionVerb ) ) otherlv_4= '(' ( (otherlv_5= RULE_ID ) )? otherlv_6= ')' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2189:1: ( () ( (otherlv_1= RULE_ID ) ) otherlv_2= '.' ( (lv_actionVerb_3_0= ruleActionVerb ) ) otherlv_4= '(' ( (otherlv_5= RULE_ID ) )? otherlv_6= ')' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2189:2: () ( (otherlv_1= RULE_ID ) ) otherlv_2= '.' ( (lv_actionVerb_3_0= ruleActionVerb ) ) otherlv_4= '(' ( (otherlv_5= RULE_ID ) )? otherlv_6= ')'
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2189:2: ()
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2190:5: 
                {
                    current = forceCreateModelElement(grammarAccess.getUIActionNavigateActionAccess().getUIActionNavigateActionAction_0(), current);
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2195:2: ( (otherlv_1= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2196:1: (otherlv_1= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2196:1: (otherlv_1= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2197:3: otherlv_1= RULE_ID
                    {
                        if (current == null) {
                            current = createModelElement(grammarAccess.getUIActionNavigateActionRule());
                        }
                        otherlv_1 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleUIActionNavigateAction4957);
                        newLeafNode(otherlv_1, grammarAccess.getUIActionNavigateActionAccess().getTargetScreenScreenCrossReference_1_0());
                    }
                }
                otherlv_2 = (Token) match(input, 32, FOLLOW_32_in_ruleUIActionNavigateAction4969);
                newLeafNode(otherlv_2, grammarAccess.getUIActionNavigateActionAccess().getFullStopKeyword_2());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2212:1: ( (lv_actionVerb_3_0= ruleActionVerb ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2213:1: (lv_actionVerb_3_0= ruleActionVerb )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2213:1: (lv_actionVerb_3_0= ruleActionVerb )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2214:3: lv_actionVerb_3_0= ruleActionVerb
                    {
                        newCompositeNode(grammarAccess.getUIActionNavigateActionAccess().getActionVerbActionVerbEnumRuleCall_3_0());
                        pushFollow(FOLLOW_ruleActionVerb_in_ruleUIActionNavigateAction4990);
                        lv_actionVerb_3_0 = ruleActionVerb();
                        state._fsp--;
                        if (current == null) {
                            current = createModelElementForParent(grammarAccess.getUIActionNavigateActionRule());
                        }
                        set(current, "actionVerb", lv_actionVerb_3_0, "ActionVerb");
                        afterParserOrEnumRuleCall();
                    }
                }
                otherlv_4 = (Token) match(input, 27, FOLLOW_27_in_ruleUIActionNavigateAction5002);
                newLeafNode(otherlv_4, grammarAccess.getUIActionNavigateActionAccess().getLeftParenthesisKeyword_4());
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2234:1: ( (otherlv_5= RULE_ID ) )?
                int alt39 = 2;
                int LA39_0 = input.LA(1);
                if ((LA39_0 == RULE_ID)) {
                    alt39 = 1;
                }
                switch(alt39) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2235:1: (otherlv_5= RULE_ID )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2235:1: (otherlv_5= RULE_ID )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2236:3: otherlv_5= RULE_ID
                            {
                                if (current == null) {
                                    current = createModelElement(grammarAccess.getUIActionNavigateActionRule());
                                }
                                otherlv_5 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleUIActionNavigateAction5022);
                                newLeafNode(otherlv_5, grammarAccess.getUIActionNavigateActionAccess().getVariableReferrableElementCrossReference_5_0());
                            }
                        }
                        break;
                }
                otherlv_6 = (Token) match(input, 29, FOLLOW_29_in_ruleUIActionNavigateAction5035);
                newLeafNode(otherlv_6, grammarAccess.getUIActionNavigateActionAccess().getRightParenthesisKeyword_6());
            }
        }
        leaveRule();
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 17 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalSqliteModelParser method ruleFunctionArg.

// $ANTLR end "entryRuleFunctionArg"
// $ANTLR start "ruleFunctionArg"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:535:1: ruleFunctionArg returns [EObject current=null] : ( ( (lv_type_0_0= ruleColumnType ) ) ( (lv_name_1_0= RULE_ID ) ) ) ;
public final EObject ruleFunctionArg() throws RecognitionException {
    EObject current = null;
    Token lv_name_1_0 = null;
    Enumerator lv_type_0_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:538:28: ( ( ( (lv_type_0_0= ruleColumnType ) ) ( (lv_name_1_0= RULE_ID ) ) ) )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:539:1: ( ( (lv_type_0_0= ruleColumnType ) ) ( (lv_name_1_0= RULE_ID ) ) )
        {
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:539:1: ( ( (lv_type_0_0= ruleColumnType ) ) ( (lv_name_1_0= RULE_ID ) ) )
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:539:2: ( (lv_type_0_0= ruleColumnType ) ) ( (lv_name_1_0= RULE_ID ) )
            {
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:539:2: ( (lv_type_0_0= ruleColumnType ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:540:1: (lv_type_0_0= ruleColumnType )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:540:1: (lv_type_0_0= ruleColumnType )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:541:3: lv_type_0_0= ruleColumnType
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getFunctionArgAccess().getTypeColumnTypeEnumRuleCall_0_0());
                        }
                        pushFollow(FOLLOW_ruleColumnType_in_ruleFunctionArg1073);
                        lv_type_0_0 = ruleColumnType();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getFunctionArgRule());
                            }
                            set(current, "type", lv_type_0_0, "ColumnType");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:557:2: ( (lv_name_1_0= RULE_ID ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:558:1: (lv_name_1_0= RULE_ID )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:558:1: (lv_name_1_0= RULE_ID )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:559:3: lv_name_1_0= RULE_ID
                    {
                        lv_name_1_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleFunctionArg1090);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            newLeafNode(lv_name_1_0, grammarAccess.getFunctionArgAccess().getNameIDTerminalRuleCall_1_0());
                        }
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElement(grammarAccess.getFunctionArgRule());
                            }
                            setWithLastConsumed(current, "name", lv_name_1_0, "ID");
                        }
                    }
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 18 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalSqliteModelParser method ruleConflictClause.

// $ANTLR end "entryRuleConflictClause"
// $ANTLR start "ruleConflictClause"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5647:1: ruleConflictClause returns [EObject current=null] : (otherlv_0= 'on' otherlv_1= 'conflict' ( (lv_resolution_2_0= ruleConflictResolution ) ) ) ;
public final EObject ruleConflictClause() throws RecognitionException {
    EObject current = null;
    Token otherlv_0 = null;
    Token otherlv_1 = null;
    Enumerator lv_resolution_2_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5650:28: ( (otherlv_0= 'on' otherlv_1= 'conflict' ( (lv_resolution_2_0= ruleConflictResolution ) ) ) )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5651:1: (otherlv_0= 'on' otherlv_1= 'conflict' ( (lv_resolution_2_0= ruleConflictResolution ) ) )
        {
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5651:1: (otherlv_0= 'on' otherlv_1= 'conflict' ( (lv_resolution_2_0= ruleConflictResolution ) ) )
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5651:3: otherlv_0= 'on' otherlv_1= 'conflict' ( (lv_resolution_2_0= ruleConflictResolution ) )
            {
                otherlv_0 = (Token) match(input, 89, FOLLOW_89_in_ruleConflictClause12268);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_0, grammarAccess.getConflictClauseAccess().getOnKeyword_0());
                }
                otherlv_1 = (Token) match(input, 121, FOLLOW_121_in_ruleConflictClause12280);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_1, grammarAccess.getConflictClauseAccess().getConflictKeyword_1());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5659:1: ( (lv_resolution_2_0= ruleConflictResolution ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5660:1: (lv_resolution_2_0= ruleConflictResolution )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5660:1: (lv_resolution_2_0= ruleConflictResolution )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5661:3: lv_resolution_2_0= ruleConflictResolution
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getConflictClauseAccess().getResolutionConflictResolutionEnumRuleCall_2_0());
                        }
                        pushFollow(FOLLOW_ruleConflictResolution_in_ruleConflictClause12301);
                        lv_resolution_2_0 = ruleConflictResolution();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getConflictClauseRule());
                            }
                            set(current, "resolution", lv_resolution_2_0, "ConflictResolution");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Example 19 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalSqliteModelParser method ruleSelectCore.

// $ANTLR end "entryRuleSelectCore"
// $ANTLR start "ruleSelectCore"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2523:1: ruleSelectCore returns [EObject current=null] : (this_SelectExpression_0= ruleSelectExpression ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )* ) ;
public final EObject ruleSelectCore() throws RecognitionException {
    EObject current = null;
    EObject this_SelectExpression_0 = null;
    Enumerator lv_op_2_0 = null;
    EObject lv_right_3_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2526:28: ( (this_SelectExpression_0= ruleSelectExpression ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )* ) )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2527:1: (this_SelectExpression_0= ruleSelectExpression ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )* )
        {
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2527:1: (this_SelectExpression_0= ruleSelectExpression ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )* )
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2528:5: this_SelectExpression_0= ruleSelectExpression ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )*
            {
                if (state.backtracking == 0) {
                    newCompositeNode(grammarAccess.getSelectCoreAccess().getSelectExpressionParserRuleCall_0());
                }
                pushFollow(FOLLOW_ruleSelectExpression_in_ruleSelectCore5432);
                this_SelectExpression_0 = ruleSelectExpression();
                state._fsp--;
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    current = this_SelectExpression_0;
                    afterParserOrEnumRuleCall();
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2536:1: ( () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) ) )*
                loop45: do {
                    int alt45 = 2;
                    int LA45_0 = input.LA(1);
                    if (((LA45_0 >= 126 && LA45_0 <= 129))) {
                        alt45 = 1;
                    }
                    switch(alt45) {
                        case 1:
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2536:2: () ( (lv_op_2_0= ruleCompoundOperator ) ) ( (lv_right_3_0= ruleSelectExpression ) )
                            {
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2536:2: ()
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2537:5: 
                                {
                                    if (state.backtracking == 0) {
                                        current = forceCreateModelElementAndSet(grammarAccess.getSelectCoreAccess().getSelectCoreLeftAction_1_0(), current);
                                    }
                                }
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2542:2: ( (lv_op_2_0= ruleCompoundOperator ) )
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2543:1: (lv_op_2_0= ruleCompoundOperator )
                                {
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2543:1: (lv_op_2_0= ruleCompoundOperator )
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2544:3: lv_op_2_0= ruleCompoundOperator
                                    {
                                        if (state.backtracking == 0) {
                                            newCompositeNode(grammarAccess.getSelectCoreAccess().getOpCompoundOperatorEnumRuleCall_1_1_0());
                                        }
                                        pushFollow(FOLLOW_ruleCompoundOperator_in_ruleSelectCore5462);
                                        lv_op_2_0 = ruleCompoundOperator();
                                        state._fsp--;
                                        if (state.failed)
                                            return current;
                                        if (state.backtracking == 0) {
                                            if (current == null) {
                                                current = createModelElementForParent(grammarAccess.getSelectCoreRule());
                                            }
                                            set(current, "op", lv_op_2_0, "CompoundOperator");
                                            afterParserOrEnumRuleCall();
                                        }
                                    }
                                }
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2560:2: ( (lv_right_3_0= ruleSelectExpression ) )
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2561:1: (lv_right_3_0= ruleSelectExpression )
                                {
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2561:1: (lv_right_3_0= ruleSelectExpression )
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2562:3: lv_right_3_0= ruleSelectExpression
                                    {
                                        if (state.backtracking == 0) {
                                            newCompositeNode(grammarAccess.getSelectCoreAccess().getRightSelectExpressionParserRuleCall_1_2_0());
                                        }
                                        pushFollow(FOLLOW_ruleSelectExpression_in_ruleSelectCore5483);
                                        lv_right_3_0 = ruleSelectExpression();
                                        state._fsp--;
                                        if (state.failed)
                                            return current;
                                        if (state.backtracking == 0) {
                                            if (current == null) {
                                                current = createModelElementForParent(grammarAccess.getSelectCoreRule());
                                            }
                                            set(current, "right", lv_right_3_0, "SelectExpression");
                                            afterParserOrEnumRuleCall();
                                        }
                                    }
                                }
                            }
                            break;
                        default:
                            break loop45;
                    }
                } while (true);
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject)

Example 20 with Enumerator

use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.

the class InternalSqliteModelParser method ruleUpdateStatement.

// $ANTLR end "entryRuleUpdateStatement"
// $ANTLR start "ruleUpdateStatement"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6005:1: ruleUpdateStatement returns [EObject current=null] : (otherlv_0= 'update' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ( (otherlv_3= RULE_ID ) ) otherlv_4= 'set' ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) ) (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )* (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )? ) ;
public final EObject ruleUpdateStatement() throws RecognitionException {
    EObject current = null;
    Token otherlv_0 = null;
    Token otherlv_1 = null;
    Token otherlv_3 = null;
    Token otherlv_4 = null;
    Token otherlv_6 = null;
    Token otherlv_8 = null;
    Enumerator lv_conflictResolution_2_0 = null;
    EObject lv_updateColumnExpressions_5_0 = null;
    EObject lv_updateColumnExpressions_7_0 = null;
    EObject lv_whereExpression_9_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6008:28: ( (otherlv_0= 'update' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ( (otherlv_3= RULE_ID ) ) otherlv_4= 'set' ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) ) (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )* (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )? ) )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6009:1: (otherlv_0= 'update' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ( (otherlv_3= RULE_ID ) ) otherlv_4= 'set' ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) ) (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )* (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )? )
        {
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6009:1: (otherlv_0= 'update' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ( (otherlv_3= RULE_ID ) ) otherlv_4= 'set' ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) ) (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )* (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )? )
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6009:3: otherlv_0= 'update' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ( (otherlv_3= RULE_ID ) ) otherlv_4= 'set' ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) ) (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )* (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )?
            {
                otherlv_0 = (Token) match(input, 104, FOLLOW_104_in_ruleUpdateStatement13121);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_0, grammarAccess.getUpdateStatementAccess().getUpdateKeyword_0());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6013:1: (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )?
                int alt109 = 2;
                int LA109_0 = input.LA(1);
                if ((LA109_0 == 54)) {
                    alt109 = 1;
                }
                switch(alt109) {
                    case 1:
                        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6013:3: otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) )
                        {
                            otherlv_1 = (Token) match(input, 54, FOLLOW_54_in_ruleUpdateStatement13134);
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                newLeafNode(otherlv_1, grammarAccess.getUpdateStatementAccess().getOrKeyword_1_0());
                            }
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6017:1: ( (lv_conflictResolution_2_0= ruleConflictResolution ) )
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6018:1: (lv_conflictResolution_2_0= ruleConflictResolution )
                            {
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6018:1: (lv_conflictResolution_2_0= ruleConflictResolution )
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6019:3: lv_conflictResolution_2_0= ruleConflictResolution
                                {
                                    if (state.backtracking == 0) {
                                        newCompositeNode(grammarAccess.getUpdateStatementAccess().getConflictResolutionConflictResolutionEnumRuleCall_1_1_0());
                                    }
                                    pushFollow(FOLLOW_ruleConflictResolution_in_ruleUpdateStatement13155);
                                    lv_conflictResolution_2_0 = ruleConflictResolution();
                                    state._fsp--;
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        if (current == null) {
                                            current = createModelElementForParent(grammarAccess.getUpdateStatementRule());
                                        }
                                        set(current, "conflictResolution", lv_conflictResolution_2_0, "ConflictResolution");
                                        afterParserOrEnumRuleCall();
                                    }
                                }
                            }
                        }
                        break;
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6035:4: ( (otherlv_3= RULE_ID ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6036:1: (otherlv_3= RULE_ID )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6036:1: (otherlv_3= RULE_ID )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6037:3: otherlv_3= RULE_ID
                    {
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElement(grammarAccess.getUpdateStatementRule());
                            }
                        }
                        otherlv_3 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleUpdateStatement13177);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            newLeafNode(otherlv_3, grammarAccess.getUpdateStatementAccess().getTableTableDefinitionCrossReference_2_0());
                        }
                    }
                }
                otherlv_4 = (Token) match(input, 125, FOLLOW_125_in_ruleUpdateStatement13189);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_4, grammarAccess.getUpdateStatementAccess().getSetKeyword_3());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6052:1: ( (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6053:1: (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6053:1: (lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6054:3: lv_updateColumnExpressions_5_0= ruleUpdateColumnExpression
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getUpdateStatementAccess().getUpdateColumnExpressionsUpdateColumnExpressionParserRuleCall_4_0());
                        }
                        pushFollow(FOLLOW_ruleUpdateColumnExpression_in_ruleUpdateStatement13210);
                        lv_updateColumnExpressions_5_0 = ruleUpdateColumnExpression();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getUpdateStatementRule());
                            }
                            add(current, "updateColumnExpressions", lv_updateColumnExpressions_5_0, "UpdateColumnExpression");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6070:2: (otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) ) )*
                loop110: do {
                    int alt110 = 2;
                    int LA110_0 = input.LA(1);
                    if ((LA110_0 == 22)) {
                        alt110 = 1;
                    }
                    switch(alt110) {
                        case 1:
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6070:4: otherlv_6= ',' ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) )
                            {
                                otherlv_6 = (Token) match(input, 22, FOLLOW_22_in_ruleUpdateStatement13223);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    newLeafNode(otherlv_6, grammarAccess.getUpdateStatementAccess().getCommaKeyword_5_0());
                                }
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6074:1: ( (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression ) )
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6075:1: (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression )
                                {
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6075:1: (lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression )
                                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6076:3: lv_updateColumnExpressions_7_0= ruleUpdateColumnExpression
                                    {
                                        if (state.backtracking == 0) {
                                            newCompositeNode(grammarAccess.getUpdateStatementAccess().getUpdateColumnExpressionsUpdateColumnExpressionParserRuleCall_5_1_0());
                                        }
                                        pushFollow(FOLLOW_ruleUpdateColumnExpression_in_ruleUpdateStatement13244);
                                        lv_updateColumnExpressions_7_0 = ruleUpdateColumnExpression();
                                        state._fsp--;
                                        if (state.failed)
                                            return current;
                                        if (state.backtracking == 0) {
                                            if (current == null) {
                                                current = createModelElementForParent(grammarAccess.getUpdateStatementRule());
                                            }
                                            add(current, "updateColumnExpressions", lv_updateColumnExpressions_7_0, "UpdateColumnExpression");
                                            afterParserOrEnumRuleCall();
                                        }
                                    }
                                }
                            }
                            break;
                        default:
                            break loop110;
                    }
                } while (true);
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6092:4: (otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) ) )?
                int alt111 = 2;
                int LA111_0 = input.LA(1);
                if ((LA111_0 == 78)) {
                    alt111 = 1;
                }
                switch(alt111) {
                    case 1:
                        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6092:6: otherlv_8= 'where' ( (lv_whereExpression_9_0= ruleSqlExpression ) )
                        {
                            otherlv_8 = (Token) match(input, 78, FOLLOW_78_in_ruleUpdateStatement13259);
                            if (state.failed)
                                return current;
                            if (state.backtracking == 0) {
                                newLeafNode(otherlv_8, grammarAccess.getUpdateStatementAccess().getWhereKeyword_6_0());
                            }
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6096:1: ( (lv_whereExpression_9_0= ruleSqlExpression ) )
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6097:1: (lv_whereExpression_9_0= ruleSqlExpression )
                            {
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6097:1: (lv_whereExpression_9_0= ruleSqlExpression )
                                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:6098:3: lv_whereExpression_9_0= ruleSqlExpression
                                {
                                    if (state.backtracking == 0) {
                                        newCompositeNode(grammarAccess.getUpdateStatementAccess().getWhereExpressionSqlExpressionParserRuleCall_6_1_0());
                                    }
                                    pushFollow(FOLLOW_ruleSqlExpression_in_ruleUpdateStatement13280);
                                    lv_whereExpression_9_0 = ruleSqlExpression();
                                    state._fsp--;
                                    if (state.failed)
                                        return current;
                                    if (state.backtracking == 0) {
                                        if (current == null) {
                                            current = createModelElementForParent(grammarAccess.getUpdateStatementRule());
                                        }
                                        set(current, "whereExpression", lv_whereExpression_9_0, "SqlExpression");
                                        afterParserOrEnumRuleCall();
                                    }
                                }
                            }
                        }
                        break;
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : Enumerator(org.eclipse.emf.common.util.Enumerator) EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)

Aggregations

Enumerator (org.eclipse.emf.common.util.Enumerator)29 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)28 EObject (org.eclipse.emf.ecore.EObject)16