Search in sources :

Example 51 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)

Example 52 with ValueConverterException

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

the class InternalApplauseDslParser method ruleSimpleType.

// $ANTLR end entryRuleSimpleType
// $ANTLR start ruleSimpleType
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1482:1: ruleSimpleType returns [EObject current=null] : ( 'type' ( (lv_name_1_0= RULE_ID ) ) 'mapsTo' ( (lv_platformType_3_0= RULE_STRING ) ) ) ;
public final EObject ruleSimpleType() throws RecognitionException {
    EObject current = null;
    Token lv_name_1_0 = null;
    Token lv_platformType_3_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1487:6: ( ( 'type' ( (lv_name_1_0= RULE_ID ) ) 'mapsTo' ( (lv_platformType_3_0= RULE_STRING ) ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1488:1: ( 'type' ( (lv_name_1_0= RULE_ID ) ) 'mapsTo' ( (lv_platformType_3_0= RULE_STRING ) ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1488:1: ( 'type' ( (lv_name_1_0= RULE_ID ) ) 'mapsTo' ( (lv_platformType_3_0= RULE_STRING ) ) )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1488:3: 'type' ( (lv_name_1_0= RULE_ID ) ) 'mapsTo' ( (lv_platformType_3_0= RULE_STRING ) )
            {
                match(input, 31, FOLLOW_31_in_ruleSimpleType2793);
                createLeafNode(grammarAccess.getSimpleTypeAccess().getTypeKeyword_0(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1492:1: ( (lv_name_1_0= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1493:1: (lv_name_1_0= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1493:1: (lv_name_1_0= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1494:3: lv_name_1_0= RULE_ID
                    {
                        lv_name_1_0 = (Token) input.LT(1);
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleSimpleType2810);
                        createLeafNode(grammarAccess.getSimpleTypeAccess().getNameIDTerminalRuleCall_1_0(), "name");
                        if (current == null) {
                            current = factory.create(grammarAccess.getSimpleTypeRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "name", lv_name_1_0, "ID", lastConsumedNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                    }
                }
                match(input, 32, FOLLOW_32_in_ruleSimpleType2825);
                createLeafNode(grammarAccess.getSimpleTypeAccess().getMapsToKeyword_2(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1520:1: ( (lv_platformType_3_0= RULE_STRING ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1521:1: (lv_platformType_3_0= RULE_STRING )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1521:1: (lv_platformType_3_0= RULE_STRING )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:1522:3: lv_platformType_3_0= RULE_STRING
                    {
                        lv_platformType_3_0 = (Token) input.LT(1);
                        match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleSimpleType2842);
                        createLeafNode(grammarAccess.getSimpleTypeAccess().getPlatformTypeSTRINGTerminalRuleCall_3_0(), "platformType");
                        if (current == null) {
                            current = factory.create(grammarAccess.getSimpleTypeRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "platformType", lv_platformType_3_0, "STRING", lastConsumedNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                    }
                }
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) ValueConverterException(org.eclipse.xtext.conversion.ValueConverterException)

Example 53 with ValueConverterException

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

the class InternalApplauseDslParser method ruleViewHeader.

// $ANTLR end entryRuleViewHeader
// $ANTLR start ruleViewHeader
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2583:1: ruleViewHeader returns [EObject current=null] : ( () 'header' '{' ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )? ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )? ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )? ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )? '}' ) ;
public final EObject ruleViewHeader() throws RecognitionException {
    EObject current = null;
    EObject lv_title_4_0 = null;
    EObject lv_subtitle_6_0 = null;
    EObject lv_details_8_0 = null;
    EObject lv_image_10_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2588:6: ( ( () 'header' '{' ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )? ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )? ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )? ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )? '}' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2589:1: ( () 'header' '{' ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )? ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )? ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )? ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )? '}' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2589:1: ( () 'header' '{' ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )? ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )? ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )? ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )? '}' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2589:2: () 'header' '{' ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )? ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )? ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )? ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )? '}'
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2589:2: ()
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2590:5:
                {
                    temp = factory.create(grammarAccess.getViewHeaderAccess().getViewHeaderAction_0().getType().getClassifier());
                    current = temp;
                    temp = null;
                    CompositeNode newNode = createCompositeNode(grammarAccess.getViewHeaderAccess().getViewHeaderAction_0(), currentNode.getParent());
                    newNode.getChildren().add(currentNode);
                    moveLookaheadInfo(currentNode, newNode);
                    currentNode = newNode;
                    associateNodeWithAstElement(currentNode, current);
                }
                match(input, 47, FOLLOW_47_in_ruleViewHeader4646);
                createLeafNode(grammarAccess.getViewHeaderAccess().getHeaderKeyword_1(), null);
                match(input, 23, FOLLOW_23_in_ruleViewHeader4656);
                createLeafNode(grammarAccess.getViewHeaderAccess().getLeftCurlyBracketKeyword_2(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2608:1: ( 'title=' ( (lv_title_4_0= ruleScalarExpression ) ) )?
                int alt32 = 2;
                int LA32_0 = input.LA(1);
                if ((LA32_0 == 27)) {
                    alt32 = 1;
                }
                switch(alt32) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2608:3: 'title=' ( (lv_title_4_0= ruleScalarExpression ) )
                        {
                            match(input, 27, FOLLOW_27_in_ruleViewHeader4667);
                            createLeafNode(grammarAccess.getViewHeaderAccess().getTitleKeyword_3_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2612:1: ( (lv_title_4_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2613:1: (lv_title_4_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2613:1: (lv_title_4_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2614:3: lv_title_4_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewHeaderAccess().getTitleScalarExpressionParserRuleCall_3_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleViewHeader4688);
                                    lv_title_4_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewHeaderRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "title", lv_title_4_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                        }
                        break;
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2636:4: ( 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) ) )?
                int alt33 = 2;
                int LA33_0 = input.LA(1);
                if ((LA33_0 == 48)) {
                    alt33 = 1;
                }
                switch(alt33) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2636:6: 'subtitle=' ( (lv_subtitle_6_0= ruleScalarExpression ) )
                        {
                            match(input, 48, FOLLOW_48_in_ruleViewHeader4701);
                            createLeafNode(grammarAccess.getViewHeaderAccess().getSubtitleKeyword_4_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2640:1: ( (lv_subtitle_6_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2641:1: (lv_subtitle_6_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2641:1: (lv_subtitle_6_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2642:3: lv_subtitle_6_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewHeaderAccess().getSubtitleScalarExpressionParserRuleCall_4_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleViewHeader4722);
                                    lv_subtitle_6_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewHeaderRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "subtitle", lv_subtitle_6_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                        }
                        break;
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2664:4: ( 'details=' ( (lv_details_8_0= ruleScalarExpression ) ) )?
                int alt34 = 2;
                int LA34_0 = input.LA(1);
                if ((LA34_0 == 49)) {
                    alt34 = 1;
                }
                switch(alt34) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2664:6: 'details=' ( (lv_details_8_0= ruleScalarExpression ) )
                        {
                            match(input, 49, FOLLOW_49_in_ruleViewHeader4735);
                            createLeafNode(grammarAccess.getViewHeaderAccess().getDetailsKeyword_5_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2668:1: ( (lv_details_8_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2669:1: (lv_details_8_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2669:1: (lv_details_8_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2670:3: lv_details_8_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewHeaderAccess().getDetailsScalarExpressionParserRuleCall_5_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleViewHeader4756);
                                    lv_details_8_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewHeaderRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "details", lv_details_8_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                        }
                        break;
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2692:4: ( 'image=' ( (lv_image_10_0= ruleScalarExpression ) ) )?
                int alt35 = 2;
                int LA35_0 = input.LA(1);
                if ((LA35_0 == 50)) {
                    alt35 = 1;
                }
                switch(alt35) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2692:6: 'image=' ( (lv_image_10_0= ruleScalarExpression ) )
                        {
                            match(input, 50, FOLLOW_50_in_ruleViewHeader4769);
                            createLeafNode(grammarAccess.getViewHeaderAccess().getImageKeyword_6_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2696:1: ( (lv_image_10_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2697:1: (lv_image_10_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2697:1: (lv_image_10_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2698:3: lv_image_10_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewHeaderAccess().getImageScalarExpressionParserRuleCall_6_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleViewHeader4790);
                                    lv_image_10_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewHeaderRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "image", lv_image_10_0, "ScalarExpression", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                        }
                        break;
                }
                match(input, 25, FOLLOW_25_in_ruleViewHeader4802);
                createLeafNode(grammarAccess.getViewHeaderAccess().getRightCurlyBracketKeyword_7(), 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 54 with ValueConverterException

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

the class InternalApplauseDslParser method ruleTypeDescription.

// $ANTLR end entryRuleTypeDescription
// $ANTLR start ruleTypeDescription
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:254:1: ruleTypeDescription returns [EObject current=null] : ( ( ( RULE_ID ) ) ( (lv_many_1_0= '[]' ) )? ) ;
public final EObject ruleTypeDescription() throws RecognitionException {
    EObject current = null;
    Token lv_many_1_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:259:6: ( ( ( ( RULE_ID ) ) ( (lv_many_1_0= '[]' ) )? ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:260:1: ( ( ( RULE_ID ) ) ( (lv_many_1_0= '[]' ) )? )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:260:1: ( ( ( RULE_ID ) ) ( (lv_many_1_0= '[]' ) )? )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:260:2: ( ( RULE_ID ) ) ( (lv_many_1_0= '[]' ) )?
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:260:2: ( ( RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:261:1: ( RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:261:1: ( RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:262:3: RULE_ID
                    {
                        if (current == null) {
                            current = factory.create(grammarAccess.getTypeDescriptionRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleTypeDescription507);
                        createLeafNode(grammarAccess.getTypeDescriptionAccess().getTypeTypeCrossReference_0_0(), "type");
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:274:2: ( (lv_many_1_0= '[]' ) )?
                int alt3 = 2;
                int LA3_0 = input.LA(1);
                if ((LA3_0 == 11)) {
                    alt3 = 1;
                }
                switch(alt3) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:275:1: (lv_many_1_0= '[]' )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:275:1: (lv_many_1_0= '[]' )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:276:3: lv_many_1_0= '[]'
                            {
                                lv_many_1_0 = (Token) input.LT(1);
                                match(input, 11, FOLLOW_11_in_ruleTypeDescription525);
                                createLeafNode(grammarAccess.getTypeDescriptionAccess().getManyLeftSquareBracketRightSquareBracketKeyword_1_0(), "many");
                                if (current == null) {
                                    current = factory.create(grammarAccess.getTypeDescriptionRule().getType().getClassifier());
                                    associateNodeWithAstElement(currentNode, current);
                                }
                                try {
                                    set(current, "many", true, "[]", lastConsumedNode);
                                } catch (ValueConverterException vce) {
                                    handleValueConverterException(vce);
                                }
                            }
                        }
                        break;
                }
            }
        }
        resetLookahead();
        lastConsumedNode = currentNode;
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) AntlrDatatypeRuleToken(org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken) 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