Search in sources :

Example 46 with ValueConverterException

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

the class InternalApplauseDslParser method ruleStringFunction.

// $ANTLR end entryRuleStringFunction
// $ANTLR start ruleStringFunction
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:732:1: ruleStringFunction returns [EObject current=null] : ( ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' ) | ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' ) | ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' ) ) ;
public final EObject ruleStringFunction() throws RecognitionException {
    EObject current = null;
    EObject lv_values_2_0 = null;
    EObject lv_value_6_0 = null;
    EObject lv_match_8_0 = null;
    EObject lv_replacement_10_0 = null;
    EObject lv_value_14_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:737:6: ( ( ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' ) | ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' ) | ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:1: ( ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' ) | ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' ) | ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:1: ( ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' ) | ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' ) | ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' ) )
            int alt10 = 3;
            switch(input.LA(1)) {
                case 13:
                    {
                        alt10 = 1;
                    }
                    break;
                case 15:
                    {
                        alt10 = 2;
                    }
                    break;
                case 17:
                    {
                        alt10 = 3;
                    }
                    break;
                default:
                    NoViableAltException nvae = new NoViableAltException("738:1: ( ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' ) | ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' ) | ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' ) )", 10, 0, input);
                    throw nvae;
            }
            switch(alt10) {
                case 1:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:2: ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:2: ( () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:3: () '(' ( (lv_values_2_0= ruleScalarExpression ) )+ ')'
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:738:3: ()
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:739:5:
                            {
                                temp = factory.create(grammarAccess.getStringFunctionAccess().getStringConcatAction_0_0().getType().getClassifier());
                                current = temp;
                                temp = null;
                                CompositeNode newNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getStringConcatAction_0_0(), currentNode.getParent());
                                newNode.getChildren().add(currentNode);
                                moveLookaheadInfo(currentNode, newNode);
                                currentNode = newNode;
                                associateNodeWithAstElement(currentNode, current);
                            }
                            match(input, 13, FOLLOW_13_in_ruleStringFunction1559);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getLeftParenthesisKeyword_0_1(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:753:1: ( (lv_values_2_0= ruleScalarExpression ) )+
                            int cnt9 = 0;
                            loop9: do {
                                int alt9 = 2;
                                int LA9_0 = input.LA(1);
                                if (((LA9_0 >= RULE_ID && LA9_0 <= RULE_STRING) || LA9_0 == 13 || LA9_0 == 15 || LA9_0 == 17)) {
                                    alt9 = 1;
                                }
                                switch(alt9) {
                                    case 1:
                                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:754:1: (lv_values_2_0= ruleScalarExpression )
                                        {
                                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:754:1: (lv_values_2_0= ruleScalarExpression )
                                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:755:3: lv_values_2_0= ruleScalarExpression
                                            {
                                                currentNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getValuesScalarExpressionParserRuleCall_0_2_0(), currentNode);
                                                pushFollow(FOLLOW_ruleScalarExpression_in_ruleStringFunction1580);
                                                lv_values_2_0 = ruleScalarExpression();
                                                _fsp--;
                                                if (current == null) {
                                                    current = factory.create(grammarAccess.getStringFunctionRule().getType().getClassifier());
                                                    associateNodeWithAstElement(currentNode.getParent(), current);
                                                }
                                                try {
                                                    add(current, "values", lv_values_2_0, "ScalarExpression", currentNode);
                                                } catch (ValueConverterException vce) {
                                                    handleValueConverterException(vce);
                                                }
                                                currentNode = currentNode.getParent();
                                            }
                                        }
                                        break;
                                    default:
                                        if (cnt9 >= 1)
                                            break loop9;
                                        EarlyExitException eee = new EarlyExitException(9, input);
                                        throw eee;
                                }
                                cnt9++;
                            } while (true);
                            match(input, 14, FOLLOW_14_in_ruleStringFunction1591);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getRightParenthesisKeyword_0_3(), null);
                        }
                    }
                    break;
                case 2:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:782:6: ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:782:6: ( () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:782:7: () 'replace(' ( (lv_value_6_0= ruleScalarExpression ) ) ',' ( (lv_match_8_0= ruleScalarExpression ) ) ',' ( (lv_replacement_10_0= ruleScalarExpression ) ) ')'
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:782:7: ()
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:783:5:
                            {
                                temp = factory.create(grammarAccess.getStringFunctionAccess().getStringReplaceAction_1_0().getType().getClassifier());
                                current = temp;
                                temp = null;
                                CompositeNode newNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getStringReplaceAction_1_0(), currentNode.getParent());
                                newNode.getChildren().add(currentNode);
                                moveLookaheadInfo(currentNode, newNode);
                                currentNode = newNode;
                                associateNodeWithAstElement(currentNode, current);
                            }
                            match(input, 15, FOLLOW_15_in_ruleStringFunction1618);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getReplaceKeyword_1_1(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:797:1: ( (lv_value_6_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:798:1: (lv_value_6_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:798:1: (lv_value_6_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:799:3: lv_value_6_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getValueScalarExpressionParserRuleCall_1_2_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleStringFunction1639);
                                    lv_value_6_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getStringFunctionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "value", lv_value_6_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 16, FOLLOW_16_in_ruleStringFunction1649);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getCommaKeyword_1_3(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:825:1: ( (lv_match_8_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:826:1: (lv_match_8_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:826:1: (lv_match_8_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:827:3: lv_match_8_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getMatchScalarExpressionParserRuleCall_1_4_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleStringFunction1670);
                                    lv_match_8_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getStringFunctionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "match", lv_match_8_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 16, FOLLOW_16_in_ruleStringFunction1680);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getCommaKeyword_1_5(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:853:1: ( (lv_replacement_10_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:854:1: (lv_replacement_10_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:854:1: (lv_replacement_10_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:855:3: lv_replacement_10_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getReplacementScalarExpressionParserRuleCall_1_6_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleStringFunction1701);
                                    lv_replacement_10_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getStringFunctionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "replacement", lv_replacement_10_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 14, FOLLOW_14_in_ruleStringFunction1711);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getRightParenthesisKeyword_1_7(), null);
                        }
                    }
                    break;
                case 3:
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:882:6: ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' )
                    {
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:882:6: ( () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')' )
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:882:7: () 'urlconform(' ( (lv_value_14_0= ruleScalarExpression ) ) ')'
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:882:7: ()
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:883:5:
                            {
                                temp = factory.create(grammarAccess.getStringFunctionAccess().getStringUrlConformAction_2_0().getType().getClassifier());
                                current = temp;
                                temp = null;
                                CompositeNode newNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getStringUrlConformAction_2_0(), currentNode.getParent());
                                newNode.getChildren().add(currentNode);
                                moveLookaheadInfo(currentNode, newNode);
                                currentNode = newNode;
                                associateNodeWithAstElement(currentNode, current);
                            }
                            match(input, 17, FOLLOW_17_in_ruleStringFunction1738);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getUrlconformKeyword_2_1(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:897:1: ( (lv_value_14_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:898:1: (lv_value_14_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:898:1: (lv_value_14_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:899:3: lv_value_14_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getStringFunctionAccess().getValueScalarExpressionParserRuleCall_2_2_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleStringFunction1759);
                                    lv_value_14_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getStringFunctionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "value", lv_value_14_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 14, FOLLOW_14_in_ruleStringFunction1769);
                            createLeafNode(grammarAccess.getStringFunctionAccess().getRightParenthesisKeyword_2_3(), null);
                        }
                    }
                    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 47 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 48 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 49 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 50 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)

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