Search in sources :

Example 36 with ValueConverterException

use of org.eclipse.xtext.conversion.ValueConverterException in project applause by applause.

the class InternalApplauseDslParser method ruleCollectionLiteral.

// $ANTLR end entryRuleCollectionLiteral
// $ANTLR start ruleCollectionLiteral
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:942:1: ruleCollectionLiteral returns [EObject current=null] : ( '[' ( (lv_items_1_0= ruleScalarExpression ) ) ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )* ']' ) ;
public final EObject ruleCollectionLiteral() throws RecognitionException {
    EObject current = null;
    EObject lv_items_1_0 = null;
    EObject lv_items_3_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:947:6: ( ( '[' ( (lv_items_1_0= ruleScalarExpression ) ) ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )* ']' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:948:1: ( '[' ( (lv_items_1_0= ruleScalarExpression ) ) ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )* ']' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:948:1: ( '[' ( (lv_items_1_0= ruleScalarExpression ) ) ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )* ']' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:948:3: '[' ( (lv_items_1_0= ruleScalarExpression ) ) ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )* ']'
            {
                match(input, 18, FOLLOW_18_in_ruleCollectionLiteral1851);
                createLeafNode(grammarAccess.getCollectionLiteralAccess().getLeftSquareBracketKeyword_0(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:952:1: ( (lv_items_1_0= ruleScalarExpression ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:953:1: (lv_items_1_0= ruleScalarExpression )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:953:1: (lv_items_1_0= ruleScalarExpression )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:954:3: lv_items_1_0= ruleScalarExpression
                    {
                        currentNode = createCompositeNode(grammarAccess.getCollectionLiteralAccess().getItemsScalarExpressionParserRuleCall_1_0(), currentNode);
                        pushFollow(FOLLOW_ruleScalarExpression_in_ruleCollectionLiteral1872);
                        lv_items_1_0 = ruleScalarExpression();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getCollectionLiteralRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            add(current, "items", lv_items_1_0, "ScalarExpression", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:976:2: ( ',' ( (lv_items_3_0= ruleScalarExpression ) ) )*
                loop11: do {
                    int alt11 = 2;
                    int LA11_0 = input.LA(1);
                    if ((LA11_0 == 16)) {
                        alt11 = 1;
                    }
                    switch(alt11) {
                        case 1:
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:976:4: ',' ( (lv_items_3_0= ruleScalarExpression ) )
                            {
                                match(input, 16, FOLLOW_16_in_ruleCollectionLiteral1883);
                                createLeafNode(grammarAccess.getCollectionLiteralAccess().getCommaKeyword_2_0(), null);
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:980:1: ( (lv_items_3_0= ruleScalarExpression ) )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:981:1: (lv_items_3_0= ruleScalarExpression )
                                {
                                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:981:1: (lv_items_3_0= ruleScalarExpression )
                                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:982:3: lv_items_3_0= ruleScalarExpression
                                    {
                                        currentNode = createCompositeNode(grammarAccess.getCollectionLiteralAccess().getItemsScalarExpressionParserRuleCall_2_1_0(), currentNode);
                                        pushFollow(FOLLOW_ruleScalarExpression_in_ruleCollectionLiteral1904);
                                        lv_items_3_0 = ruleScalarExpression();
                                        _fsp--;
                                        if (current == null) {
                                            current = factory.create(grammarAccess.getCollectionLiteralRule().getType().getClassifier());
                                            associateNodeWithAstElement(currentNode.getParent(), current);
                                        }
                                        try {
                                            add(current, "items", lv_items_3_0, "ScalarExpression", currentNode);
                                        } catch (ValueConverterException vce) {
                                            handleValueConverterException(vce);
                                        }
                                        currentNode = currentNode.getParent();
                                    }
                                }
                            }
                            break;
                        default:
                            break loop11;
                    }
                } while (true);
                match(input, 19, FOLLOW_19_in_ruleCollectionLiteral1916);
                createLeafNode(grammarAccess.getCollectionLiteralAccess().getRightSquareBracketKeyword_3(), null);
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Example 37 with ValueConverterException

use of org.eclipse.xtext.conversion.ValueConverterException in project applause by applause.

the class InternalApplauseDslParser method ruleModel.

// $ANTLR end entryRuleModel
// $ANTLR start ruleModel
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:87:1: ruleModel returns [EObject current=null] : ( ( (lv_application_0_0= ruleApplication ) ) ( (lv_elements_1_0= ruleModelElement ) )* ) ;
public final EObject ruleModel() throws RecognitionException {
    EObject current = null;
    EObject lv_application_0_0 = null;
    EObject lv_elements_1_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:92:6: ( ( ( (lv_application_0_0= ruleApplication ) ) ( (lv_elements_1_0= ruleModelElement ) )* ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:93:1: ( ( (lv_application_0_0= ruleApplication ) ) ( (lv_elements_1_0= ruleModelElement ) )* )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:93:1: ( ( (lv_application_0_0= ruleApplication ) ) ( (lv_elements_1_0= ruleModelElement ) )* )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:93:2: ( (lv_application_0_0= ruleApplication ) ) ( (lv_elements_1_0= ruleModelElement ) )*
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:93:2: ( (lv_application_0_0= ruleApplication ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:94:1: (lv_application_0_0= ruleApplication )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:94:1: (lv_application_0_0= ruleApplication )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:95:3: lv_application_0_0= ruleApplication
                    {
                        currentNode = createCompositeNode(grammarAccess.getModelAccess().getApplicationApplicationParserRuleCall_0_0(), currentNode);
                        pushFollow(FOLLOW_ruleApplication_in_ruleModel131);
                        lv_application_0_0 = ruleApplication();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getModelRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "application", lv_application_0_0, "Application", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:117:2: ( (lv_elements_1_0= ruleModelElement ) )*
                loop1: do {
                    int alt1 = 2;
                    int LA1_0 = input.LA(1);
                    if (((LA1_0 >= 30 && LA1_0 <= 31) || LA1_0 == 33 || LA1_0 == 36 || (LA1_0 >= 43 && LA1_0 <= 45))) {
                        alt1 = 1;
                    }
                    switch(alt1) {
                        case 1:
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:118:1: (lv_elements_1_0= ruleModelElement )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:118:1: (lv_elements_1_0= ruleModelElement )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:119:3: lv_elements_1_0= ruleModelElement
                                {
                                    currentNode = createCompositeNode(grammarAccess.getModelAccess().getElementsModelElementParserRuleCall_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleModelElement_in_ruleModel152);
                                    lv_elements_1_0 = ruleModelElement();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getModelRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        add(current, "elements", lv_elements_1_0, "ModelElement", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            break;
                        default:
                            break loop1;
                    }
                } while (true);
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Example 38 with ValueConverterException

use of org.eclipse.xtext.conversion.ValueConverterException in project applause by applause.

the class InternalApplauseDslParser method ruleProviderConstruction.

// $ANTLR end entryRuleProviderConstruction
// $ANTLR start ruleProviderConstruction
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1962:1: ruleProviderConstruction returns [EObject current=null] : ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) ) ;
public final EObject ruleProviderConstruction() throws RecognitionException {
    EObject current = null;
    EObject lv_argument_3_0 = null;
    EObject lv_expression_6_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1967:6: ( ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:1: ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:1: ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) )
            int alt23 = 2;
            int LA23_0 = input.LA(1);
            if ((LA23_0 == RULE_ID)) {
                int LA23_1 = input.LA(2);
                if ((LA23_1 == 13)) {
                    alt23 = 1;
                } else if ((LA23_1 == EOF || LA23_1 == 12 || LA23_1 == 14)) {
                    alt23 = 2;
                } else {
                    NoViableAltException nvae = new NoViableAltException("1968:1: ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) )", 23, 1, input);
                    throw nvae;
                }
            } else if ((LA23_0 == RULE_STRING || LA23_0 == 13 || LA23_0 == 15 || (LA23_0 >= 17 && LA23_0 <= 18) || LA23_0 == 20)) {
                alt23 = 2;
            } else {
                NoViableAltException nvae = new NoViableAltException("1968:1: ( ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' ) | ( () ( (lv_expression_6_0= ruleExpression ) ) ) )", 23, 0, input);
                throw nvae;
            }
            switch(alt23) {
                case 1:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:2: ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:2: ( () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:3: () ( ( RULE_ID ) ) '(' ( (lv_argument_3_0= ruleExpression ) )? ')'
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1968:3: ()
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1969:5:
                            {
                                temp = factory.create(grammarAccess.getProviderConstructionAccess().getComplexProviderConstructionAction_0_0().getType().getClassifier());
                                current = temp;
                                temp = null;
                                CompositeNode newNode = createCompositeNode(grammarAccess.getProviderConstructionAccess().getComplexProviderConstructionAction_0_0(), currentNode.getParent());
                                newNode.getChildren().add(currentNode);
                                moveLookaheadInfo(currentNode, newNode);
                                currentNode = newNode;
                                associateNodeWithAstElement(currentNode, current);
                            }
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1979:2: ( ( RULE_ID ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1980:1: ( RULE_ID )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1980:1: ( RULE_ID )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1981:3: RULE_ID
                                {
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getProviderConstructionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode, current);
                                    }
                                    match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleProviderConstruction3596);
                                    createLeafNode(grammarAccess.getProviderConstructionAccess().getProviderContentProviderCrossReference_0_1_0(), "provider");
                                }
                            }
                            match(input, 13, FOLLOW_13_in_ruleProviderConstruction3606);
                            createLeafNode(grammarAccess.getProviderConstructionAccess().getLeftParenthesisKeyword_0_2(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1997:1: ( (lv_argument_3_0= ruleExpression ) )?
                            int alt22 = 2;
                            int LA22_0 = input.LA(1);
                            if (((LA22_0 >= RULE_ID && LA22_0 <= RULE_STRING) || LA22_0 == 13 || LA22_0 == 15 || (LA22_0 >= 17 && LA22_0 <= 18) || LA22_0 == 20)) {
                                alt22 = 1;
                            }
                            switch(alt22) {
                                case 1:
                                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1998:1: (lv_argument_3_0= ruleExpression )
                                    {
                                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1998:1: (lv_argument_3_0= ruleExpression )
                                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1999:3: lv_argument_3_0= ruleExpression
                                        {
                                            currentNode = createCompositeNode(grammarAccess.getProviderConstructionAccess().getArgumentExpressionParserRuleCall_0_3_0(), currentNode);
                                            pushFollow(FOLLOW_ruleExpression_in_ruleProviderConstruction3627);
                                            lv_argument_3_0 = ruleExpression();
                                            _fsp--;
                                            if (current == null) {
                                                current = factory.create(grammarAccess.getProviderConstructionRule().getType().getClassifier());
                                                associateNodeWithAstElement(currentNode.getParent(), current);
                                            }
                                            try {
                                                set(current, "argument", lv_argument_3_0, "Expression", currentNode);
                                            } catch (ValueConverterException vce) {
                                                handleValueConverterException(vce);
                                            }
                                            currentNode = currentNode.getParent();
                                        }
                                    }
                                    break;
                            }
                            match(input, 14, FOLLOW_14_in_ruleProviderConstruction3638);
                            createLeafNode(grammarAccess.getProviderConstructionAccess().getRightParenthesisKeyword_0_4(), null);
                        }
                    }
                    break;
                case 2:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2026:6: ( () ( (lv_expression_6_0= ruleExpression ) ) )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2026:6: ( () ( (lv_expression_6_0= ruleExpression ) ) )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2026:7: () ( (lv_expression_6_0= ruleExpression ) )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2026:7: ()
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2027:5:
                            {
                                temp = factory.create(grammarAccess.getProviderConstructionAccess().getSimpleProviderConstructionAction_1_0().getType().getClassifier());
                                current = temp;
                                temp = null;
                                CompositeNode newNode = createCompositeNode(grammarAccess.getProviderConstructionAccess().getSimpleProviderConstructionAction_1_0(), currentNode.getParent());
                                newNode.getChildren().add(currentNode);
                                moveLookaheadInfo(currentNode, newNode);
                                currentNode = newNode;
                                associateNodeWithAstElement(currentNode, current);
                            }
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2037:2: ( (lv_expression_6_0= ruleExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2038:1: (lv_expression_6_0= ruleExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2038:1: (lv_expression_6_0= ruleExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2039:3: lv_expression_6_0= ruleExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getProviderConstructionAccess().getExpressionExpressionParserRuleCall_1_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleExpression_in_ruleProviderConstruction3676);
                                    lv_expression_6_0 = ruleExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getProviderConstructionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "expression", lv_expression_6_0, "Expression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                        }
                    }
                    break;
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Example 39 with ValueConverterException

use of org.eclipse.xtext.conversion.ValueConverterException in project applause by applause.

the class InternalApplauseDslParser method ruleViewCall.

// $ANTLR end entryRuleViewCall
// $ANTLR start ruleViewCall
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3219:1: ruleViewCall returns [EObject current=null] : ( ( ( RULE_ID ) ) '(' ( (lv_provider_2_0= ruleProviderConstruction ) )? ')' ) ;
public final EObject ruleViewCall() throws RecognitionException {
    EObject current = null;
    EObject lv_provider_2_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3224:6: ( ( ( ( RULE_ID ) ) '(' ( (lv_provider_2_0= ruleProviderConstruction ) )? ')' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3225:1: ( ( ( RULE_ID ) ) '(' ( (lv_provider_2_0= ruleProviderConstruction ) )? ')' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3225:1: ( ( ( RULE_ID ) ) '(' ( (lv_provider_2_0= ruleProviderConstruction ) )? ')' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3225:2: ( ( RULE_ID ) ) '(' ( (lv_provider_2_0= ruleProviderConstruction ) )? ')'
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3225:2: ( ( RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3226:1: ( RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3226:1: ( RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3227:3: RULE_ID
                    {
                        if (current == null) {
                            current = factory.create(grammarAccess.getViewCallRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleViewCall5707);
                        createLeafNode(grammarAccess.getViewCallAccess().getViewViewCrossReference_0_0(), "view");
                    }
                }
                match(input, 13, FOLLOW_13_in_ruleViewCall5717);
                createLeafNode(grammarAccess.getViewCallAccess().getLeftParenthesisKeyword_1(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3243:1: ( (lv_provider_2_0= ruleProviderConstruction ) )?
                int alt45 = 2;
                int LA45_0 = input.LA(1);
                if (((LA45_0 >= RULE_ID && LA45_0 <= RULE_STRING) || LA45_0 == 13 || LA45_0 == 15 || (LA45_0 >= 17 && LA45_0 <= 18) || LA45_0 == 20)) {
                    alt45 = 1;
                }
                switch(alt45) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3244:1: (lv_provider_2_0= ruleProviderConstruction )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3244:1: (lv_provider_2_0= ruleProviderConstruction )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3245:3: lv_provider_2_0= ruleProviderConstruction
                            {
                                currentNode = createCompositeNode(grammarAccess.getViewCallAccess().getProviderProviderConstructionParserRuleCall_2_0(), currentNode);
                                pushFollow(FOLLOW_ruleProviderConstruction_in_ruleViewCall5738);
                                lv_provider_2_0 = ruleProviderConstruction();
                                _fsp--;
                                if (current == null) {
                                    current = factory.create(grammarAccess.getViewCallRule().getType().getClassifier());
                                    associateNodeWithAstElement(currentNode.getParent(), current);
                                }
                                try {
                                    set(current, "provider", lv_provider_2_0, "ProviderConstruction", currentNode);
                                } catch (ValueConverterException vce) {
                                    handleValueConverterException(vce);
                                }
                                currentNode = currentNode.getParent();
                            }
                        }
                        break;
                }
                match(input, 14, FOLLOW_14_in_ruleViewCall5749);
                createLeafNode(grammarAccess.getViewCallAccess().getRightParenthesisKeyword_3(), null);
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Example 40 with ValueConverterException

use of org.eclipse.xtext.conversion.ValueConverterException in project applause by applause.

the class InternalApplauseDslParser method ruleTabbarButton.

// $ANTLR end entryRuleTabbarButton
// $ANTLR start ruleTabbarButton
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1235:1: ruleTabbarButton returns [EObject current=null] : ( 'button' '{' 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) 'icon=' ( (lv_icon_5_0= ruleScalarExpression ) ) 'view=' ( (lv_view_7_0= ruleViewCall ) ) '}' ) ;
public final EObject ruleTabbarButton() throws RecognitionException {
    EObject current = null;
    EObject lv_title_3_0 = null;
    EObject lv_icon_5_0 = null;
    EObject lv_view_7_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1240:6: ( ( 'button' '{' 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) 'icon=' ( (lv_icon_5_0= ruleScalarExpression ) ) 'view=' ( (lv_view_7_0= ruleViewCall ) ) '}' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1241:1: ( 'button' '{' 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) 'icon=' ( (lv_icon_5_0= ruleScalarExpression ) ) 'view=' ( (lv_view_7_0= ruleViewCall ) ) '}' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1241:1: ( 'button' '{' 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) 'icon=' ( (lv_icon_5_0= ruleScalarExpression ) ) 'view=' ( (lv_view_7_0= ruleViewCall ) ) '}' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1241:3: 'button' '{' 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) 'icon=' ( (lv_icon_5_0= ruleScalarExpression ) ) 'view=' ( (lv_view_7_0= ruleViewCall ) ) '}'
            {
                match(input, 26, FOLLOW_26_in_ruleTabbarButton2347);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getButtonKeyword_0(), null);
                match(input, 23, FOLLOW_23_in_ruleTabbarButton2357);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getLeftCurlyBracketKeyword_1(), null);
                match(input, 27, FOLLOW_27_in_ruleTabbarButton2367);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getTitleKeyword_2(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1253:1: ( (lv_title_3_0= ruleScalarExpression ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1254:1: (lv_title_3_0= ruleScalarExpression )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1254:1: (lv_title_3_0= ruleScalarExpression )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1255:3: lv_title_3_0= ruleScalarExpression
                    {
                        currentNode = createCompositeNode(grammarAccess.getTabbarButtonAccess().getTitleScalarExpressionParserRuleCall_3_0(), currentNode);
                        pushFollow(FOLLOW_ruleScalarExpression_in_ruleTabbarButton2388);
                        lv_title_3_0 = ruleScalarExpression();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getTabbarButtonRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "title", lv_title_3_0, "ScalarExpression", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                match(input, 28, FOLLOW_28_in_ruleTabbarButton2398);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getIconKeyword_4(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1281:1: ( (lv_icon_5_0= ruleScalarExpression ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1282:1: (lv_icon_5_0= ruleScalarExpression )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1282:1: (lv_icon_5_0= ruleScalarExpression )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1283:3: lv_icon_5_0= ruleScalarExpression
                    {
                        currentNode = createCompositeNode(grammarAccess.getTabbarButtonAccess().getIconScalarExpressionParserRuleCall_5_0(), currentNode);
                        pushFollow(FOLLOW_ruleScalarExpression_in_ruleTabbarButton2419);
                        lv_icon_5_0 = ruleScalarExpression();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getTabbarButtonRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "icon", lv_icon_5_0, "ScalarExpression", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                match(input, 29, FOLLOW_29_in_ruleTabbarButton2429);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getViewKeyword_6(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1309:1: ( (lv_view_7_0= ruleViewCall ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1310:1: (lv_view_7_0= ruleViewCall )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1310:1: (lv_view_7_0= ruleViewCall )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1311:3: lv_view_7_0= ruleViewCall
                    {
                        currentNode = createCompositeNode(grammarAccess.getTabbarButtonAccess().getViewViewCallParserRuleCall_7_0(), currentNode);
                        pushFollow(FOLLOW_ruleViewCall_in_ruleTabbarButton2450);
                        lv_view_7_0 = ruleViewCall();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getTabbarButtonRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "view", lv_view_7_0, "ViewCall", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                match(input, 25, FOLLOW_25_in_ruleTabbarButton2460);
                createLeafNode(grammarAccess.getTabbarButtonAccess().getRightCurlyBracketKeyword_8(), null);
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Aggregations

ValueConverterException (org.eclipse.xtext.conversion.ValueConverterException)54 EObject (org.eclipse.emf.ecore.EObject)37 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)13 ValueConverterWithValueException (org.eclipse.xtext.conversion.ValueConverterWithValueException)4 Test (org.junit.Test)4 URI (org.eclipse.emf.common.util.URI)3 EStructuralFeature (org.eclipse.emf.ecore.EStructuralFeature)3 Resource (org.eclipse.emf.ecore.resource.Resource)3 ClasspathUriResolutionException (org.eclipse.xtext.resource.ClasspathUriResolutionException)3 IEObjectDescription (org.eclipse.xtext.resource.IEObjectDescription)3 XtextResource (org.eclipse.xtext.resource.XtextResource)3 InvocationTargetException (java.lang.reflect.InvocationTargetException)2 FailedPredicateException (org.antlr.runtime.FailedPredicateException)2 MismatchedTokenException (org.antlr.runtime.MismatchedTokenException)2 MissingTokenException (org.antlr.runtime.MissingTokenException)2 RecognitionException (org.antlr.runtime.RecognitionException)2 UnwantedTokenException (org.antlr.runtime.UnwantedTokenException)2 WrappedException (org.eclipse.emf.common.util.WrappedException)2 EClass (org.eclipse.emf.ecore.EClass)2 EReference (org.eclipse.emf.ecore.EReference)2