Search in sources :

Example 6 with ValueConverterException

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

the class InternalApplauseDslParser method ruleCustomView.

// $ANTLR end entryRuleCustomView
// $ANTLR start ruleCustomView
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2472:1: ruleCustomView returns [EObject current=null] : ( 'customview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? 'implementedBy' ( (lv_objclass_6_0= RULE_STRING ) ) ) ;
public final EObject ruleCustomView() throws RecognitionException {
    EObject current = null;
    Token lv_name_1_0 = null;
    Token lv_objclass_6_0 = null;
    EObject lv_content_3_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2477:6: ( ( 'customview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? 'implementedBy' ( (lv_objclass_6_0= RULE_STRING ) ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2478:1: ( 'customview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? 'implementedBy' ( (lv_objclass_6_0= RULE_STRING ) ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2478:1: ( 'customview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? 'implementedBy' ( (lv_objclass_6_0= RULE_STRING ) ) )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2478:3: 'customview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? 'implementedBy' ( (lv_objclass_6_0= RULE_STRING ) )
            {
                match(input, 45, FOLLOW_45_in_ruleCustomView4458);
                createLeafNode(grammarAccess.getCustomViewAccess().getCustomviewKeyword_0(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2482:1: ( (lv_name_1_0= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2483:1: (lv_name_1_0= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2483:1: (lv_name_1_0= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2484:3: lv_name_1_0= RULE_ID
                    {
                        lv_name_1_0 = (Token) input.LT(1);
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCustomView4475);
                        createLeafNode(grammarAccess.getCustomViewAccess().getNameIDTerminalRuleCall_1_0(), "name");
                        if (current == null) {
                            current = factory.create(grammarAccess.getCustomViewRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "name", lv_name_1_0, "ID", lastConsumedNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2506:2: ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )?
                int alt31 = 2;
                int LA31_0 = input.LA(1);
                if ((LA31_0 == 13)) {
                    alt31 = 1;
                }
                switch(alt31) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2506:4: '(' ( (lv_content_3_0= ruleParameter ) ) ')'
                        {
                            match(input, 13, FOLLOW_13_in_ruleCustomView4491);
                            createLeafNode(grammarAccess.getCustomViewAccess().getLeftParenthesisKeyword_2_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2510:1: ( (lv_content_3_0= ruleParameter ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2511:1: (lv_content_3_0= ruleParameter )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2511:1: (lv_content_3_0= ruleParameter )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2512:3: lv_content_3_0= ruleParameter
                                {
                                    currentNode = createCompositeNode(grammarAccess.getCustomViewAccess().getContentParameterParserRuleCall_2_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleParameter_in_ruleCustomView4512);
                                    lv_content_3_0 = ruleParameter();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getCustomViewRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "content", lv_content_3_0, "Parameter", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 14, FOLLOW_14_in_ruleCustomView4522);
                            createLeafNode(grammarAccess.getCustomViewAccess().getRightParenthesisKeyword_2_2(), null);
                        }
                        break;
                }
                match(input, 46, FOLLOW_46_in_ruleCustomView4534);
                createLeafNode(grammarAccess.getCustomViewAccess().getImplementedByKeyword_3(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2542:1: ( (lv_objclass_6_0= RULE_STRING ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2543:1: (lv_objclass_6_0= RULE_STRING )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2543:1: (lv_objclass_6_0= RULE_STRING )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2544:3: lv_objclass_6_0= RULE_STRING
                    {
                        lv_objclass_6_0 = (Token) input.LT(1);
                        match(input, RULE_STRING, FOLLOW_RULE_STRING_in_ruleCustomView4551);
                        createLeafNode(grammarAccess.getCustomViewAccess().getObjclassSTRINGTerminalRuleCall_4_0(), "objclass");
                        if (current == null) {
                            current = factory.create(grammarAccess.getCustomViewRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "objclass", lv_objclass_6_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 7 with ValueConverterException

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

the class InternalApplauseDslParser method ruleCollectionIterator.

// $ANTLR end entryRuleCollectionIterator
// $ANTLR start ruleCollectionIterator
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3055:1: ruleCollectionIterator returns [EObject current=null] : ( ( (lv_collection_0_0= ruleCollectionExpression ) ) 'as' ( (lv_name_2_0= RULE_ID ) ) ) ;
public final EObject ruleCollectionIterator() throws RecognitionException {
    EObject current = null;
    Token lv_name_2_0 = null;
    EObject lv_collection_0_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3060:6: ( ( ( (lv_collection_0_0= ruleCollectionExpression ) ) 'as' ( (lv_name_2_0= RULE_ID ) ) ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3061:1: ( ( (lv_collection_0_0= ruleCollectionExpression ) ) 'as' ( (lv_name_2_0= RULE_ID ) ) )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3061:1: ( ( (lv_collection_0_0= ruleCollectionExpression ) ) 'as' ( (lv_name_2_0= RULE_ID ) ) )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3061:2: ( (lv_collection_0_0= ruleCollectionExpression ) ) 'as' ( (lv_name_2_0= RULE_ID ) )
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3061:2: ( (lv_collection_0_0= ruleCollectionExpression ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3062:1: (lv_collection_0_0= ruleCollectionExpression )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3062:1: (lv_collection_0_0= ruleCollectionExpression )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3063:3: lv_collection_0_0= ruleCollectionExpression
                    {
                        currentNode = createCompositeNode(grammarAccess.getCollectionIteratorAccess().getCollectionCollectionExpressionParserRuleCall_0_0(), currentNode);
                        pushFollow(FOLLOW_ruleCollectionExpression_in_ruleCollectionIterator5377);
                        lv_collection_0_0 = ruleCollectionExpression();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getCollectionIteratorRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "collection", lv_collection_0_0, "CollectionExpression", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                match(input, 57, FOLLOW_57_in_ruleCollectionIterator5387);
                createLeafNode(grammarAccess.getCollectionIteratorAccess().getAsKeyword_1(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3089:1: ( (lv_name_2_0= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3090:1: (lv_name_2_0= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3090:1: (lv_name_2_0= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:3091:3: lv_name_2_0= RULE_ID
                    {
                        lv_name_2_0 = (Token) input.LT(1);
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCollectionIterator5404);
                        createLeafNode(grammarAccess.getCollectionIteratorAccess().getNameIDTerminalRuleCall_2_0(), "name");
                        if (current == null) {
                            current = factory.create(grammarAccess.getCollectionIteratorRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "name", lv_name_2_0, "ID", 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 8 with ValueConverterException

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

the class InternalApplauseDslParser method ruleViewSection.

// $ANTLR end entryRuleViewSection
// $ANTLR start ruleViewSection
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2741:1: ruleViewSection returns [EObject current=null] : ( 'section' '{' ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )? ( (lv_cells_4_0= ruleSectionCell ) )+ '}' ) ;
public final EObject ruleViewSection() throws RecognitionException {
    EObject current = null;
    EObject lv_title_3_0 = null;
    EObject lv_cells_4_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2746:6: ( ( 'section' '{' ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )? ( (lv_cells_4_0= ruleSectionCell ) )+ '}' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2747:1: ( 'section' '{' ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )? ( (lv_cells_4_0= ruleSectionCell ) )+ '}' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2747:1: ( 'section' '{' ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )? ( (lv_cells_4_0= ruleSectionCell ) )+ '}' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2747:3: 'section' '{' ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )? ( (lv_cells_4_0= ruleSectionCell ) )+ '}'
            {
                match(input, 51, FOLLOW_51_in_ruleViewSection4883);
                createLeafNode(grammarAccess.getViewSectionAccess().getSectionKeyword_0(), null);
                match(input, 23, FOLLOW_23_in_ruleViewSection4893);
                createLeafNode(grammarAccess.getViewSectionAccess().getLeftCurlyBracketKeyword_1(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2755:1: ( 'title=' ( (lv_title_3_0= ruleScalarExpression ) ) )?
                int alt36 = 2;
                int LA36_0 = input.LA(1);
                if ((LA36_0 == 27)) {
                    alt36 = 1;
                }
                switch(alt36) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2755:3: 'title=' ( (lv_title_3_0= ruleScalarExpression ) )
                        {
                            match(input, 27, FOLLOW_27_in_ruleViewSection4904);
                            createLeafNode(grammarAccess.getViewSectionAccess().getTitleKeyword_2_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2759:1: ( (lv_title_3_0= ruleScalarExpression ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2760:1: (lv_title_3_0= ruleScalarExpression )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2760:1: (lv_title_3_0= ruleScalarExpression )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2761:3: lv_title_3_0= ruleScalarExpression
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewSectionAccess().getTitleScalarExpressionParserRuleCall_2_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleScalarExpression_in_ruleViewSection4925);
                                    lv_title_3_0 = ruleScalarExpression();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewSectionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "title", lv_title_3_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:2783:4: ( (lv_cells_4_0= ruleSectionCell ) )+
                int cnt37 = 0;
                loop37: do {
                    int alt37 = 2;
                    int LA37_0 = input.LA(1);
                    if ((LA37_0 == 52)) {
                        alt37 = 1;
                    }
                    switch(alt37) {
                        case 1:
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2784:1: (lv_cells_4_0= ruleSectionCell )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2784:1: (lv_cells_4_0= ruleSectionCell )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2785:3: lv_cells_4_0= ruleSectionCell
                                {
                                    currentNode = createCompositeNode(grammarAccess.getViewSectionAccess().getCellsSectionCellParserRuleCall_3_0(), currentNode);
                                    pushFollow(FOLLOW_ruleSectionCell_in_ruleViewSection4948);
                                    lv_cells_4_0 = ruleSectionCell();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getViewSectionRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        add(current, "cells", lv_cells_4_0, "SectionCell", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            break;
                        default:
                            if (cnt37 >= 1)
                                break loop37;
                            EarlyExitException eee = new EarlyExitException(37, input);
                            throw eee;
                    }
                    cnt37++;
                } while (true);
                match(input, 25, FOLLOW_25_in_ruleViewSection4959);
                createLeafNode(grammarAccess.getViewSectionAccess().getRightCurlyBracketKeyword_4(), 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 9 with ValueConverterException

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

the class InternalApplauseDslParser method ruleDetailsView.

// $ANTLR end entryRuleDetailsView
// $ANTLR start ruleDetailsView
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2305:1: ruleDetailsView returns [EObject current=null] : ( 'detailsview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? '{' 'title=' ( (lv_title_7_0= ruleScalarExpression ) ) ( (lv_header_8_0= ruleViewHeader ) )? ( (lv_sections_9_0= ruleViewSection ) )* '}' ) ;
public final EObject ruleDetailsView() throws RecognitionException {
    EObject current = null;
    Token lv_name_1_0 = null;
    EObject lv_content_3_0 = null;
    EObject lv_title_7_0 = null;
    EObject lv_header_8_0 = null;
    EObject lv_sections_9_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2310:6: ( ( 'detailsview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? '{' 'title=' ( (lv_title_7_0= ruleScalarExpression ) ) ( (lv_header_8_0= ruleViewHeader ) )? ( (lv_sections_9_0= ruleViewSection ) )* '}' ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2311:1: ( 'detailsview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? '{' 'title=' ( (lv_title_7_0= ruleScalarExpression ) ) ( (lv_header_8_0= ruleViewHeader ) )? ( (lv_sections_9_0= ruleViewSection ) )* '}' )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2311:1: ( 'detailsview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? '{' 'title=' ( (lv_title_7_0= ruleScalarExpression ) ) ( (lv_header_8_0= ruleViewHeader ) )? ( (lv_sections_9_0= ruleViewSection ) )* '}' )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2311:3: 'detailsview' ( (lv_name_1_0= RULE_ID ) ) ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )? '{' 'title=' ( (lv_title_7_0= ruleScalarExpression ) ) ( (lv_header_8_0= ruleViewHeader ) )? ( (lv_sections_9_0= ruleViewSection ) )* '}'
            {
                match(input, 44, FOLLOW_44_in_ruleDetailsView4216);
                createLeafNode(grammarAccess.getDetailsViewAccess().getDetailsviewKeyword_0(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2315:1: ( (lv_name_1_0= RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2316:1: (lv_name_1_0= RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2316:1: (lv_name_1_0= RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2317:3: lv_name_1_0= RULE_ID
                    {
                        lv_name_1_0 = (Token) input.LT(1);
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleDetailsView4233);
                        createLeafNode(grammarAccess.getDetailsViewAccess().getNameIDTerminalRuleCall_1_0(), "name");
                        if (current == null) {
                            current = factory.create(grammarAccess.getDetailsViewRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        try {
                            set(current, "name", lv_name_1_0, "ID", lastConsumedNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2339:2: ( '(' ( (lv_content_3_0= ruleParameter ) ) ')' )?
                int alt28 = 2;
                int LA28_0 = input.LA(1);
                if ((LA28_0 == 13)) {
                    alt28 = 1;
                }
                switch(alt28) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2339:4: '(' ( (lv_content_3_0= ruleParameter ) ) ')'
                        {
                            match(input, 13, FOLLOW_13_in_ruleDetailsView4249);
                            createLeafNode(grammarAccess.getDetailsViewAccess().getLeftParenthesisKeyword_2_0(), null);
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2343:1: ( (lv_content_3_0= ruleParameter ) )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2344:1: (lv_content_3_0= ruleParameter )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2344:1: (lv_content_3_0= ruleParameter )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2345:3: lv_content_3_0= ruleParameter
                                {
                                    currentNode = createCompositeNode(grammarAccess.getDetailsViewAccess().getContentParameterParserRuleCall_2_1_0(), currentNode);
                                    pushFollow(FOLLOW_ruleParameter_in_ruleDetailsView4270);
                                    lv_content_3_0 = ruleParameter();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getDetailsViewRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        set(current, "content", lv_content_3_0, "Parameter", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            match(input, 14, FOLLOW_14_in_ruleDetailsView4280);
                            createLeafNode(grammarAccess.getDetailsViewAccess().getRightParenthesisKeyword_2_2(), null);
                        }
                        break;
                }
                match(input, 23, FOLLOW_23_in_ruleDetailsView4292);
                createLeafNode(grammarAccess.getDetailsViewAccess().getLeftCurlyBracketKeyword_3(), null);
                match(input, 27, FOLLOW_27_in_ruleDetailsView4302);
                createLeafNode(grammarAccess.getDetailsViewAccess().getTitleKeyword_4(), null);
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2379:1: ( (lv_title_7_0= ruleScalarExpression ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2380:1: (lv_title_7_0= ruleScalarExpression )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2380:1: (lv_title_7_0= ruleScalarExpression )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2381:3: lv_title_7_0= ruleScalarExpression
                    {
                        currentNode = createCompositeNode(grammarAccess.getDetailsViewAccess().getTitleScalarExpressionParserRuleCall_5_0(), currentNode);
                        pushFollow(FOLLOW_ruleScalarExpression_in_ruleDetailsView4323);
                        lv_title_7_0 = ruleScalarExpression();
                        _fsp--;
                        if (current == null) {
                            current = factory.create(grammarAccess.getDetailsViewRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode.getParent(), current);
                        }
                        try {
                            set(current, "title", lv_title_7_0, "ScalarExpression", currentNode);
                        } catch (ValueConverterException vce) {
                            handleValueConverterException(vce);
                        }
                        currentNode = currentNode.getParent();
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2403:2: ( (lv_header_8_0= ruleViewHeader ) )?
                int alt29 = 2;
                int LA29_0 = input.LA(1);
                if ((LA29_0 == 47)) {
                    alt29 = 1;
                }
                switch(alt29) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2404:1: (lv_header_8_0= ruleViewHeader )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2404:1: (lv_header_8_0= ruleViewHeader )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2405:3: lv_header_8_0= ruleViewHeader
                            {
                                currentNode = createCompositeNode(grammarAccess.getDetailsViewAccess().getHeaderViewHeaderParserRuleCall_6_0(), currentNode);
                                pushFollow(FOLLOW_ruleViewHeader_in_ruleDetailsView4344);
                                lv_header_8_0 = ruleViewHeader();
                                _fsp--;
                                if (current == null) {
                                    current = factory.create(grammarAccess.getDetailsViewRule().getType().getClassifier());
                                    associateNodeWithAstElement(currentNode.getParent(), current);
                                }
                                try {
                                    set(current, "header", lv_header_8_0, "ViewHeader", currentNode);
                                } catch (ValueConverterException vce) {
                                    handleValueConverterException(vce);
                                }
                                currentNode = currentNode.getParent();
                            }
                        }
                        break;
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2427:3: ( (lv_sections_9_0= ruleViewSection ) )*
                loop30: do {
                    int alt30 = 2;
                    int LA30_0 = input.LA(1);
                    if ((LA30_0 == 51)) {
                        alt30 = 1;
                    }
                    switch(alt30) {
                        case 1:
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2428:1: (lv_sections_9_0= ruleViewSection )
                            {
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2428:1: (lv_sections_9_0= ruleViewSection )
                                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:2429:3: lv_sections_9_0= ruleViewSection
                                {
                                    currentNode = createCompositeNode(grammarAccess.getDetailsViewAccess().getSectionsViewSectionParserRuleCall_7_0(), currentNode);
                                    pushFollow(FOLLOW_ruleViewSection_in_ruleDetailsView4366);
                                    lv_sections_9_0 = ruleViewSection();
                                    _fsp--;
                                    if (current == null) {
                                        current = factory.create(grammarAccess.getDetailsViewRule().getType().getClassifier());
                                        associateNodeWithAstElement(currentNode.getParent(), current);
                                    }
                                    try {
                                        add(current, "sections", lv_sections_9_0, "ViewSection", currentNode);
                                    } catch (ValueConverterException vce) {
                                        handleValueConverterException(vce);
                                    }
                                    currentNode = currentNode.getParent();
                                }
                            }
                            break;
                        default:
                            break loop30;
                    }
                } while (true);
                match(input, 25, FOLLOW_25_in_ruleDetailsView4377);
                createLeafNode(grammarAccess.getDetailsViewAccess().getRightCurlyBracketKeyword_8(), null);
            }
        }
        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 10 with ValueConverterException

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

the class InternalApplauseDslParser method ruleObjectReference.

// $ANTLR end entryRuleObjectReference
// $ANTLR start ruleObjectReference
// ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:383:1: ruleObjectReference returns [EObject current=null] : ( ( ( RULE_ID ) ) ( (lv_tail_1_0= ruleNestedObjectReference ) )? ) ;
public final EObject ruleObjectReference() throws RecognitionException {
    EObject current = null;
    EObject lv_tail_1_0 = null;
    EObject temp = null;
    setCurrentLookahead();
    resetLookahead();
    try {
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:388:6: ( ( ( ( RULE_ID ) ) ( (lv_tail_1_0= ruleNestedObjectReference ) )? ) )
        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:389:1: ( ( ( RULE_ID ) ) ( (lv_tail_1_0= ruleNestedObjectReference ) )? )
        {
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:389:1: ( ( ( RULE_ID ) ) ( (lv_tail_1_0= ruleNestedObjectReference ) )? )
            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:389:2: ( ( RULE_ID ) ) ( (lv_tail_1_0= ruleNestedObjectReference ) )?
            {
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:389:2: ( ( RULE_ID ) )
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:390:1: ( RULE_ID )
                {
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:390:1: ( RULE_ID )
                    // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:391:3: RULE_ID
                    {
                        if (current == null) {
                            current = factory.create(grammarAccess.getObjectReferenceRule().getType().getClassifier());
                            associateNodeWithAstElement(currentNode, current);
                        }
                        match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleObjectReference742);
                        createLeafNode(grammarAccess.getObjectReferenceAccess().getObjectVariableDeclarationCrossReference_0_0(), "object");
                    }
                }
                // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:403:2: ( (lv_tail_1_0= ruleNestedObjectReference ) )?
                int alt4 = 2;
                int LA4_0 = input.LA(1);
                if ((LA4_0 == 12)) {
                    alt4 = 1;
                }
                switch(alt4) {
                    case 1:
                        // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:404:1: (lv_tail_1_0= ruleNestedObjectReference )
                        {
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:404:1: (lv_tail_1_0= ruleNestedObjectReference )
                            // ../org.applause.lang/src-gen/org/applause/lang/parser/antlr/internal/InternalApplauseDsl.g:405:3: lv_tail_1_0= ruleNestedObjectReference
                            {
                                currentNode = createCompositeNode(grammarAccess.getObjectReferenceAccess().getTailNestedObjectReferenceParserRuleCall_1_0(), currentNode);
                                pushFollow(FOLLOW_ruleNestedObjectReference_in_ruleObjectReference763);
                                lv_tail_1_0 = ruleNestedObjectReference();
                                _fsp--;
                                if (current == null) {
                                    current = factory.create(grammarAccess.getObjectReferenceRule().getType().getClassifier());
                                    associateNodeWithAstElement(currentNode.getParent(), current);
                                }
                                try {
                                    set(current, "tail", lv_tail_1_0, "NestedObjectReference", 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)

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