Search in sources :

Example 26 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalSqliteModelParser method entryRuleConfigBlock.

// $ANTLR end "ruleDatabaseBlock"
// $ANTLR start "entryRuleConfigBlock"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:234:1: entryRuleConfigBlock returns [EObject current=null] : iv_ruleConfigBlock= ruleConfigBlock EOF ;
public final EObject entryRuleConfigBlock() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleConfigBlock = null;
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:235:2: (iv_ruleConfigBlock= ruleConfigBlock EOF )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:236:2: iv_ruleConfigBlock= ruleConfigBlock EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getConfigBlockRule());
            }
            pushFollow(FOLLOW_ruleConfigBlock_in_entryRuleConfigBlock395);
            iv_ruleConfigBlock = ruleConfigBlock();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleConfigBlock;
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleConfigBlock405);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Example 27 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalSqliteModelParser method ruleCreateViewStatement.

// $ANTLR end "entryRuleCreateViewStatement"
// $ANTLR start "ruleCreateViewStatement"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3971:1: ruleCreateViewStatement returns [EObject current=null] : ( () otherlv_1= 'create' ( (lv_temporary_2_0= 'temp' ) )? otherlv_3= 'view' ( (lv_name_4_0= RULE_ID ) ) otherlv_5= 'as' ( (lv_selectStatement_6_0= ruleSelectStatement ) ) ) ;
public final EObject ruleCreateViewStatement() throws RecognitionException {
    EObject current = null;
    Token otherlv_1 = null;
    Token lv_temporary_2_0 = null;
    Token otherlv_3 = null;
    Token lv_name_4_0 = null;
    Token otherlv_5 = null;
    EObject lv_selectStatement_6_0 = null;
    enterRule();
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3974:28: ( ( () otherlv_1= 'create' ( (lv_temporary_2_0= 'temp' ) )? otherlv_3= 'view' ( (lv_name_4_0= RULE_ID ) ) otherlv_5= 'as' ( (lv_selectStatement_6_0= ruleSelectStatement ) ) ) )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3975:1: ( () otherlv_1= 'create' ( (lv_temporary_2_0= 'temp' ) )? otherlv_3= 'view' ( (lv_name_4_0= RULE_ID ) ) otherlv_5= 'as' ( (lv_selectStatement_6_0= ruleSelectStatement ) ) )
        {
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3975:1: ( () otherlv_1= 'create' ( (lv_temporary_2_0= 'temp' ) )? otherlv_3= 'view' ( (lv_name_4_0= RULE_ID ) ) otherlv_5= 'as' ( (lv_selectStatement_6_0= ruleSelectStatement ) ) )
            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3975:2: () otherlv_1= 'create' ( (lv_temporary_2_0= 'temp' ) )? otherlv_3= 'view' ( (lv_name_4_0= RULE_ID ) ) otherlv_5= 'as' ( (lv_selectStatement_6_0= ruleSelectStatement ) )
            {
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3975:2: ()
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3976:5: 
                {
                    if (state.backtracking == 0) {
                        current = forceCreateModelElement(grammarAccess.getCreateViewStatementAccess().getCreateViewStatementAction_0(), current);
                    }
                }
                otherlv_1 = (Token) match(input, 94, FOLLOW_94_in_ruleCreateViewStatement8620);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_1, grammarAccess.getCreateViewStatementAccess().getCreateKeyword_1());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3985:1: ( (lv_temporary_2_0= 'temp' ) )?
                int alt68 = 2;
                int LA68_0 = input.LA(1);
                if ((LA68_0 == 95)) {
                    alt68 = 1;
                }
                switch(alt68) {
                    case 1:
                        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3986:1: (lv_temporary_2_0= 'temp' )
                        {
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3986:1: (lv_temporary_2_0= 'temp' )
                            // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3987:3: lv_temporary_2_0= 'temp'
                            {
                                lv_temporary_2_0 = (Token) match(input, 95, FOLLOW_95_in_ruleCreateViewStatement8638);
                                if (state.failed)
                                    return current;
                                if (state.backtracking == 0) {
                                    newLeafNode(lv_temporary_2_0, grammarAccess.getCreateViewStatementAccess().getTemporaryTempKeyword_2_0());
                                }
                                if (state.backtracking == 0) {
                                    if (current == null) {
                                        current = createModelElement(grammarAccess.getCreateViewStatementRule());
                                    }
                                    setWithLastConsumed(current, "temporary", true, "temp");
                                }
                            }
                        }
                        break;
                }
                otherlv_3 = (Token) match(input, 97, FOLLOW_97_in_ruleCreateViewStatement8664);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_3, grammarAccess.getCreateViewStatementAccess().getViewKeyword_3());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4004:1: ( (lv_name_4_0= RULE_ID ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4005:1: (lv_name_4_0= RULE_ID )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4005:1: (lv_name_4_0= RULE_ID )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4006:3: lv_name_4_0= RULE_ID
                    {
                        lv_name_4_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCreateViewStatement8681);
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            newLeafNode(lv_name_4_0, grammarAccess.getCreateViewStatementAccess().getNameIDTerminalRuleCall_4_0());
                        }
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElement(grammarAccess.getCreateViewStatementRule());
                            }
                            setWithLastConsumed(current, "name", lv_name_4_0, "ID");
                        }
                    }
                }
                otherlv_5 = (Token) match(input, 67, FOLLOW_67_in_ruleCreateViewStatement8698);
                if (state.failed)
                    return current;
                if (state.backtracking == 0) {
                    newLeafNode(otherlv_5, grammarAccess.getCreateViewStatementAccess().getAsKeyword_5());
                }
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4026:1: ( (lv_selectStatement_6_0= ruleSelectStatement ) )
                // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4027:1: (lv_selectStatement_6_0= ruleSelectStatement )
                {
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4027:1: (lv_selectStatement_6_0= ruleSelectStatement )
                    // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4028:3: lv_selectStatement_6_0= ruleSelectStatement
                    {
                        if (state.backtracking == 0) {
                            newCompositeNode(grammarAccess.getCreateViewStatementAccess().getSelectStatementSelectStatementParserRuleCall_6_0());
                        }
                        pushFollow(FOLLOW_ruleSelectStatement_in_ruleCreateViewStatement8719);
                        lv_selectStatement_6_0 = ruleSelectStatement();
                        state._fsp--;
                        if (state.failed)
                            return current;
                        if (state.backtracking == 0) {
                            if (current == null) {
                                current = createModelElementForParent(grammarAccess.getCreateViewStatementRule());
                            }
                            set(current, "selectStatement", lv_selectStatement_6_0, "SelectStatement");
                            afterParserOrEnumRuleCall();
                        }
                    }
                }
            }
        }
        if (state.backtracking == 0) {
            leaveRule();
        }
    } 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)

Example 28 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalSqliteModelParser method entryRuleSingleSourceTable.

// $ANTLR end "ruleSingleSource"
// $ANTLR start "entryRuleSingleSourceTable"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3147:1: entryRuleSingleSourceTable returns [EObject current=null] : iv_ruleSingleSourceTable= ruleSingleSourceTable EOF ;
public final EObject entryRuleSingleSourceTable() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleSingleSourceTable = null;
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3148:2: (iv_ruleSingleSourceTable= ruleSingleSourceTable EOF )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3149:2: iv_ruleSingleSourceTable= ruleSingleSourceTable EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getSingleSourceTableRule());
            }
            pushFollow(FOLLOW_ruleSingleSourceTable_in_entryRuleSingleSourceTable6747);
            iv_ruleSingleSourceTable = ruleSingleSourceTable();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleSingleSourceTable;
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleSingleSourceTable6757);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Example 29 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalSqliteModelParser method entryRuleWhereExpressions.

// $ANTLR end "ruleSelectList"
// $ANTLR start "entryRuleWhereExpressions"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2831:1: entryRuleWhereExpressions returns [EObject current=null] : iv_ruleWhereExpressions= ruleWhereExpressions EOF ;
public final EObject entryRuleWhereExpressions() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleWhereExpressions = null;
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2832:2: (iv_ruleWhereExpressions= ruleWhereExpressions EOF )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2833:2: iv_ruleWhereExpressions= ruleWhereExpressions EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getWhereExpressionsRule());
            }
            pushFollow(FOLLOW_ruleWhereExpressions_in_entryRuleWhereExpressions6016);
            iv_ruleWhereExpressions = ruleWhereExpressions();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleWhereExpressions;
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleWhereExpressions6026);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Example 30 with EObject

use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.

the class InternalSqliteModelParser method entryRuleInitBlock.

// $ANTLR end "ruleConfigBlock"
// $ANTLR start "entryRuleInitBlock"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:291:1: entryRuleInitBlock returns [EObject current=null] : iv_ruleInitBlock= ruleInitBlock EOF ;
public final EObject entryRuleInitBlock() throws RecognitionException {
    EObject current = null;
    EObject iv_ruleInitBlock = null;
    try {
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:292:2: (iv_ruleInitBlock= ruleInitBlock EOF )
        // ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:293:2: iv_ruleInitBlock= ruleInitBlock EOF
        {
            if (state.backtracking == 0) {
                newCompositeNode(grammarAccess.getInitBlockRule());
            }
            pushFollow(FOLLOW_ruleInitBlock_in_entryRuleInitBlock533);
            iv_ruleInitBlock = ruleInitBlock();
            state._fsp--;
            if (state.failed)
                return current;
            if (state.backtracking == 0) {
                current = iv_ruleInitBlock;
            }
            match(input, EOF, FOLLOW_EOF_in_entryRuleInitBlock543);
            if (state.failed)
                return current;
        }
    } catch (RecognitionException re) {
        recover(input, re);
        appendSkippedTokens();
    } finally {
    }
    return current;
}
Also used : EObject(org.eclipse.emf.ecore.EObject)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)416 AntlrDatatypeRuleToken (org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken)121 TableDefinition (com.robotoworks.mechanoid.db.sqliteModel.TableDefinition)16 Enumerator (org.eclipse.emf.common.util.Enumerator)16 Point (org.eclipse.draw2d.geometry.Point)14 IParser (org.eclipse.gmf.runtime.common.ui.services.parser.IParser)14 IParserEditStatus (org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus)14 EObjectAdapter (org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter)14 ISemanticParser (org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser)14 ICellEditorValidator (org.eclipse.jface.viewers.ICellEditorValidator)14 Resource (org.eclipse.emf.ecore.resource.Resource)9 DDLStatement (com.robotoworks.mechanoid.db.sqliteModel.DDLStatement)8 ArrayList (java.util.ArrayList)8 List (java.util.List)8 HashMap (java.util.HashMap)7 Iterator (java.util.Iterator)7 BusinessItem (org.talend.designer.business.model.business.BusinessItem)7 IOException (java.io.IOException)6 URI (org.eclipse.emf.common.util.URI)6 View (org.eclipse.gmf.runtime.notation.View)6