use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleCreateTriggerStatement.
// $ANTLR end "entryRuleCreateTriggerStatement"
// $ANTLR start "ruleCreateTriggerStatement"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4061:1: ruleCreateTriggerStatement returns [EObject current=null] : (otherlv_0= 'create' ( (lv_temporary_1_0= 'temp' ) )? otherlv_2= 'trigger' ( (lv_name_3_0= RULE_ID ) ) ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )? ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) ) otherlv_12= 'on' ( (otherlv_13= RULE_ID ) ) ( (lv_forEachRow_14_0= 'for each row' ) )? (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )? otherlv_17= 'begin' ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )? otherlv_22= 'end' ) ;
public final EObject ruleCreateTriggerStatement() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token lv_temporary_1_0 = null;
Token otherlv_2 = null;
Token lv_name_3_0 = null;
Token lv_when_4_1 = null;
Token lv_when_4_2 = null;
Token lv_when_4_3 = null;
Token lv_eventType_5_0 = null;
Token lv_eventType_6_0 = null;
Token lv_eventType_7_0 = null;
Token otherlv_8 = null;
Token lv_updateColumnNames_9_0 = null;
Token otherlv_10 = null;
Token lv_updateColumnNames_11_0 = null;
Token otherlv_12 = null;
Token otherlv_13 = null;
Token lv_forEachRow_14_0 = null;
Token otherlv_15 = null;
Token otherlv_17 = null;
Token otherlv_19 = null;
Token otherlv_21 = null;
Token otherlv_22 = null;
EObject lv_whenExpression_16_0 = null;
EObject lv_statements_18_0 = null;
EObject lv_statements_20_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4064:28: ( (otherlv_0= 'create' ( (lv_temporary_1_0= 'temp' ) )? otherlv_2= 'trigger' ( (lv_name_3_0= RULE_ID ) ) ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )? ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) ) otherlv_12= 'on' ( (otherlv_13= RULE_ID ) ) ( (lv_forEachRow_14_0= 'for each row' ) )? (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )? otherlv_17= 'begin' ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )? otherlv_22= 'end' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4065:1: (otherlv_0= 'create' ( (lv_temporary_1_0= 'temp' ) )? otherlv_2= 'trigger' ( (lv_name_3_0= RULE_ID ) ) ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )? ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) ) otherlv_12= 'on' ( (otherlv_13= RULE_ID ) ) ( (lv_forEachRow_14_0= 'for each row' ) )? (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )? otherlv_17= 'begin' ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )? otherlv_22= 'end' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4065:1: (otherlv_0= 'create' ( (lv_temporary_1_0= 'temp' ) )? otherlv_2= 'trigger' ( (lv_name_3_0= RULE_ID ) ) ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )? ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) ) otherlv_12= 'on' ( (otherlv_13= RULE_ID ) ) ( (lv_forEachRow_14_0= 'for each row' ) )? (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )? otherlv_17= 'begin' ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )? otherlv_22= 'end' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4065:3: otherlv_0= 'create' ( (lv_temporary_1_0= 'temp' ) )? otherlv_2= 'trigger' ( (lv_name_3_0= RULE_ID ) ) ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )? ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) ) otherlv_12= 'on' ( (otherlv_13= RULE_ID ) ) ( (lv_forEachRow_14_0= 'for each row' ) )? (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )? otherlv_17= 'begin' ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )? otherlv_22= 'end'
{
otherlv_0 = (Token) match(input, 94, FOLLOW_94_in_ruleCreateTriggerStatement8802);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_0, grammarAccess.getCreateTriggerStatementAccess().getCreateKeyword_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4069:1: ( (lv_temporary_1_0= 'temp' ) )?
int alt69 = 2;
int LA69_0 = input.LA(1);
if ((LA69_0 == 95)) {
alt69 = 1;
}
switch(alt69) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4070:1: (lv_temporary_1_0= 'temp' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4070:1: (lv_temporary_1_0= 'temp' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4071:3: lv_temporary_1_0= 'temp'
{
lv_temporary_1_0 = (Token) match(input, 95, FOLLOW_95_in_ruleCreateTriggerStatement8820);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_temporary_1_0, grammarAccess.getCreateTriggerStatementAccess().getTemporaryTempKeyword_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "temporary", true, "temp");
}
}
}
break;
}
otherlv_2 = (Token) match(input, 98, FOLLOW_98_in_ruleCreateTriggerStatement8846);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getCreateTriggerStatementAccess().getTriggerKeyword_2());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4088:1: ( (lv_name_3_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4089:1: (lv_name_3_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4089:1: (lv_name_3_0= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4090:3: lv_name_3_0= RULE_ID
{
lv_name_3_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCreateTriggerStatement8863);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_3_0, grammarAccess.getCreateTriggerStatementAccess().getNameIDTerminalRuleCall_3_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "name", lv_name_3_0, "ID");
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4106:2: ( ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) ) )?
int alt71 = 2;
int LA71_0 = input.LA(1);
if (((LA71_0 >= 99 && LA71_0 <= 101))) {
alt71 = 1;
}
switch(alt71) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4107:1: ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4107:1: ( (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4108:1: (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4108:1: (lv_when_4_1= 'before' | lv_when_4_2= 'after' | lv_when_4_3= 'instead of' )
int alt70 = 3;
switch(input.LA(1)) {
case 99:
{
alt70 = 1;
}
break;
case 100:
{
alt70 = 2;
}
break;
case 101:
{
alt70 = 3;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 70, 0, input);
throw nvae;
}
switch(alt70) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4109:3: lv_when_4_1= 'before'
{
lv_when_4_1 = (Token) match(input, 99, FOLLOW_99_in_ruleCreateTriggerStatement8888);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_when_4_1, grammarAccess.getCreateTriggerStatementAccess().getWhenBeforeKeyword_4_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "when", lv_when_4_1, null);
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4121:8: lv_when_4_2= 'after'
{
lv_when_4_2 = (Token) match(input, 100, FOLLOW_100_in_ruleCreateTriggerStatement8917);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_when_4_2, grammarAccess.getCreateTriggerStatementAccess().getWhenAfterKeyword_4_0_1());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "when", lv_when_4_2, null);
}
}
break;
case 3:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4133:8: lv_when_4_3= 'instead of'
{
lv_when_4_3 = (Token) match(input, 101, FOLLOW_101_in_ruleCreateTriggerStatement8946);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_when_4_3, grammarAccess.getCreateTriggerStatementAccess().getWhenInsteadOfKeyword_4_0_2());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "when", lv_when_4_3, null);
}
}
break;
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4148:3: ( ( (lv_eventType_5_0= 'delete' ) ) | ( (lv_eventType_6_0= 'insert' ) ) | ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? ) )
int alt74 = 3;
switch(input.LA(1)) {
case 102:
{
alt74 = 1;
}
break;
case 103:
{
alt74 = 2;
}
break;
case 104:
{
alt74 = 3;
}
break;
default:
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 74, 0, input);
throw nvae;
}
switch(alt74) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4148:4: ( (lv_eventType_5_0= 'delete' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4148:4: ( (lv_eventType_5_0= 'delete' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4149:1: (lv_eventType_5_0= 'delete' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4149:1: (lv_eventType_5_0= 'delete' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4150:3: lv_eventType_5_0= 'delete'
{
lv_eventType_5_0 = (Token) match(input, 102, FOLLOW_102_in_ruleCreateTriggerStatement8982);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_eventType_5_0, grammarAccess.getCreateTriggerStatementAccess().getEventTypeDeleteKeyword_5_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "eventType", lv_eventType_5_0, "delete");
}
}
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4164:6: ( (lv_eventType_6_0= 'insert' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4164:6: ( (lv_eventType_6_0= 'insert' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4165:1: (lv_eventType_6_0= 'insert' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4165:1: (lv_eventType_6_0= 'insert' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4166:3: lv_eventType_6_0= 'insert'
{
lv_eventType_6_0 = (Token) match(input, 103, FOLLOW_103_in_ruleCreateTriggerStatement9019);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_eventType_6_0, grammarAccess.getCreateTriggerStatementAccess().getEventTypeInsertKeyword_5_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "eventType", lv_eventType_6_0, "insert");
}
}
}
}
break;
case 3:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4180:6: ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4180:6: ( ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )? )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4180:7: ( (lv_eventType_7_0= 'update' ) ) (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )?
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4180:7: ( (lv_eventType_7_0= 'update' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4181:1: (lv_eventType_7_0= 'update' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4181:1: (lv_eventType_7_0= 'update' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4182:3: lv_eventType_7_0= 'update'
{
lv_eventType_7_0 = (Token) match(input, 104, FOLLOW_104_in_ruleCreateTriggerStatement9057);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_eventType_7_0, grammarAccess.getCreateTriggerStatementAccess().getEventTypeUpdateKeyword_5_2_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "eventType", lv_eventType_7_0, "update");
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4195:2: (otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )* )?
int alt73 = 2;
int LA73_0 = input.LA(1);
if ((LA73_0 == 105)) {
alt73 = 1;
}
switch(alt73) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4195:4: otherlv_8= 'of' ( (lv_updateColumnNames_9_0= RULE_ID ) ) (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )*
{
otherlv_8 = (Token) match(input, 105, FOLLOW_105_in_ruleCreateTriggerStatement9083);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getCreateTriggerStatementAccess().getOfKeyword_5_2_1_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4199:1: ( (lv_updateColumnNames_9_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4200:1: (lv_updateColumnNames_9_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4200:1: (lv_updateColumnNames_9_0= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4201:3: lv_updateColumnNames_9_0= RULE_ID
{
lv_updateColumnNames_9_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCreateTriggerStatement9100);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_updateColumnNames_9_0, grammarAccess.getCreateTriggerStatementAccess().getUpdateColumnNamesIDTerminalRuleCall_5_2_1_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
addWithLastConsumed(current, "updateColumnNames", lv_updateColumnNames_9_0, "ID");
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4217:2: (otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) ) )*
loop72: do {
int alt72 = 2;
int LA72_0 = input.LA(1);
if ((LA72_0 == 22)) {
alt72 = 1;
}
switch(alt72) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4217:4: otherlv_10= ',' ( (lv_updateColumnNames_11_0= RULE_ID ) )
{
otherlv_10 = (Token) match(input, 22, FOLLOW_22_in_ruleCreateTriggerStatement9118);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getCreateTriggerStatementAccess().getCommaKeyword_5_2_1_2_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4221:1: ( (lv_updateColumnNames_11_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4222:1: (lv_updateColumnNames_11_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4222:1: (lv_updateColumnNames_11_0= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4223:3: lv_updateColumnNames_11_0= RULE_ID
{
lv_updateColumnNames_11_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCreateTriggerStatement9135);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_updateColumnNames_11_0, grammarAccess.getCreateTriggerStatementAccess().getUpdateColumnNamesIDTerminalRuleCall_5_2_1_2_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
addWithLastConsumed(current, "updateColumnNames", lv_updateColumnNames_11_0, "ID");
}
}
}
}
break;
default:
break loop72;
}
} while (true);
}
break;
}
}
}
break;
}
otherlv_12 = (Token) match(input, 89, FOLLOW_89_in_ruleCreateTriggerStatement9158);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getCreateTriggerStatementAccess().getOnKeyword_6());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4243:1: ( (otherlv_13= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4244:1: (otherlv_13= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4244:1: (otherlv_13= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4245:3: otherlv_13= RULE_ID
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
}
otherlv_13 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleCreateTriggerStatement9178);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_13, grammarAccess.getCreateTriggerStatementAccess().getTableTableDefinitionCrossReference_7_0());
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4256:2: ( (lv_forEachRow_14_0= 'for each row' ) )?
int alt75 = 2;
int LA75_0 = input.LA(1);
if ((LA75_0 == 106)) {
alt75 = 1;
}
switch(alt75) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4257:1: (lv_forEachRow_14_0= 'for each row' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4257:1: (lv_forEachRow_14_0= 'for each row' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4258:3: lv_forEachRow_14_0= 'for each row'
{
lv_forEachRow_14_0 = (Token) match(input, 106, FOLLOW_106_in_ruleCreateTriggerStatement9196);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_forEachRow_14_0, grammarAccess.getCreateTriggerStatementAccess().getForEachRowForEachRowKeyword_8_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getCreateTriggerStatementRule());
}
setWithLastConsumed(current, "forEachRow", lv_forEachRow_14_0, "for each row");
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4271:3: (otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) ) )?
int alt76 = 2;
int LA76_0 = input.LA(1);
if ((LA76_0 == 69)) {
alt76 = 1;
}
switch(alt76) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4271:5: otherlv_15= 'when' ( (lv_whenExpression_16_0= ruleSqlExpression ) )
{
otherlv_15 = (Token) match(input, 69, FOLLOW_69_in_ruleCreateTriggerStatement9223);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_15, grammarAccess.getCreateTriggerStatementAccess().getWhenKeyword_9_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4275:1: ( (lv_whenExpression_16_0= ruleSqlExpression ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4276:1: (lv_whenExpression_16_0= ruleSqlExpression )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4276:1: (lv_whenExpression_16_0= ruleSqlExpression )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4277:3: lv_whenExpression_16_0= ruleSqlExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getCreateTriggerStatementAccess().getWhenExpressionSqlExpressionParserRuleCall_9_1_0());
}
pushFollow(FOLLOW_ruleSqlExpression_in_ruleCreateTriggerStatement9244);
lv_whenExpression_16_0 = ruleSqlExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getCreateTriggerStatementRule());
}
set(current, "whenExpression", lv_whenExpression_16_0, "SqlExpression");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
otherlv_17 = (Token) match(input, 107, FOLLOW_107_in_ruleCreateTriggerStatement9258);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_17, grammarAccess.getCreateTriggerStatementAccess().getBeginKeyword_10());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4297:1: ( ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )* )?
int alt78 = 2;
int LA78_0 = input.LA(1);
if ((LA78_0 == 74 || (LA78_0 >= 102 && LA78_0 <= 104) || LA78_0 == 122)) {
alt78 = 1;
}
switch(alt78) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4297:2: ( (lv_statements_18_0= ruleDMLStatement ) ) otherlv_19= ';' ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )*
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4297:2: ( (lv_statements_18_0= ruleDMLStatement ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4298:1: (lv_statements_18_0= ruleDMLStatement )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4298:1: (lv_statements_18_0= ruleDMLStatement )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4299:3: lv_statements_18_0= ruleDMLStatement
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getCreateTriggerStatementAccess().getStatementsDMLStatementParserRuleCall_11_0_0());
}
pushFollow(FOLLOW_ruleDMLStatement_in_ruleCreateTriggerStatement9280);
lv_statements_18_0 = ruleDMLStatement();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getCreateTriggerStatementRule());
}
add(current, "statements", lv_statements_18_0, "DMLStatement");
afterParserOrEnumRuleCall();
}
}
}
otherlv_19 = (Token) match(input, 18, FOLLOW_18_in_ruleCreateTriggerStatement9292);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_19, grammarAccess.getCreateTriggerStatementAccess().getSemicolonKeyword_11_1());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4319:1: ( ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';' )*
loop77: do {
int alt77 = 2;
int LA77_0 = input.LA(1);
if ((LA77_0 == 74 || (LA77_0 >= 102 && LA77_0 <= 104) || LA77_0 == 122)) {
alt77 = 1;
}
switch(alt77) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4319:2: ( (lv_statements_20_0= ruleDMLStatement ) ) otherlv_21= ';'
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4319:2: ( (lv_statements_20_0= ruleDMLStatement ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4320:1: (lv_statements_20_0= ruleDMLStatement )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4320:1: (lv_statements_20_0= ruleDMLStatement )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4321:3: lv_statements_20_0= ruleDMLStatement
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getCreateTriggerStatementAccess().getStatementsDMLStatementParserRuleCall_11_2_0_0());
}
pushFollow(FOLLOW_ruleDMLStatement_in_ruleCreateTriggerStatement9314);
lv_statements_20_0 = ruleDMLStatement();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getCreateTriggerStatementRule());
}
add(current, "statements", lv_statements_20_0, "DMLStatement");
afterParserOrEnumRuleCall();
}
}
}
otherlv_21 = (Token) match(input, 18, FOLLOW_18_in_ruleCreateTriggerStatement9326);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_21, grammarAccess.getCreateTriggerStatementAccess().getSemicolonKeyword_11_2_1());
}
}
break;
default:
break loop77;
}
} while (true);
}
break;
}
otherlv_22 = (Token) match(input, 65, FOLLOW_65_in_ruleCreateTriggerStatement9342);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_22, grammarAccess.getCreateTriggerStatementAccess().getEndKeyword_12());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method entryRuleDatabaseBlock.
// $ANTLR end "ruleModel"
// $ANTLR start "entryRuleDatabaseBlock"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:129:1: entryRuleDatabaseBlock returns [EObject current=null] : iv_ruleDatabaseBlock= ruleDatabaseBlock EOF ;
public final EObject entryRuleDatabaseBlock() throws RecognitionException {
EObject current = null;
EObject iv_ruleDatabaseBlock = null;
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:130:2: (iv_ruleDatabaseBlock= ruleDatabaseBlock EOF )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:131:2: iv_ruleDatabaseBlock= ruleDatabaseBlock EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDatabaseBlockRule());
}
pushFollow(FOLLOW_ruleDatabaseBlock_in_entryRuleDatabaseBlock200);
iv_ruleDatabaseBlock = ruleDatabaseBlock();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleDatabaseBlock;
}
match(input, EOF, FOLLOW_EOF_in_entryRuleDatabaseBlock210);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleSingleSourceJoin.
// $ANTLR end "entryRuleSingleSourceJoin"
// $ANTLR start "ruleSingleSourceJoin"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3293:1: ruleSingleSourceJoin returns [EObject current=null] : (otherlv_0= '(' ( (lv_joinSource_1_0= ruleJoinSource ) ) otherlv_2= ')' ) ;
public final EObject ruleSingleSourceJoin() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_2 = null;
EObject lv_joinSource_1_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3296:28: ( (otherlv_0= '(' ( (lv_joinSource_1_0= ruleJoinSource ) ) otherlv_2= ')' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3297:1: (otherlv_0= '(' ( (lv_joinSource_1_0= ruleJoinSource ) ) otherlv_2= ')' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3297:1: (otherlv_0= '(' ( (lv_joinSource_1_0= ruleJoinSource ) ) otherlv_2= ')' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3297:3: otherlv_0= '(' ( (lv_joinSource_1_0= ruleJoinSource ) ) otherlv_2= ')'
{
otherlv_0 = (Token) match(input, 21, FOLLOW_21_in_ruleSingleSourceJoin7093);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_0, grammarAccess.getSingleSourceJoinAccess().getLeftParenthesisKeyword_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3301:1: ( (lv_joinSource_1_0= ruleJoinSource ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3302:1: (lv_joinSource_1_0= ruleJoinSource )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3302:1: (lv_joinSource_1_0= ruleJoinSource )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3303:3: lv_joinSource_1_0= ruleJoinSource
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSingleSourceJoinAccess().getJoinSourceJoinSourceParserRuleCall_1_0());
}
pushFollow(FOLLOW_ruleJoinSource_in_ruleSingleSourceJoin7114);
lv_joinSource_1_0 = ruleJoinSource();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSingleSourceJoinRule());
}
set(current, "joinSource", lv_joinSource_1_0, "JoinSource");
afterParserOrEnumRuleCall();
}
}
}
otherlv_2 = (Token) match(input, 23, FOLLOW_23_in_ruleSingleSourceJoin7126);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_2, grammarAccess.getSingleSourceJoinAccess().getRightParenthesisKeyword_2());
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleSelectList.
// $ANTLR end "entryRuleSelectList"
// $ANTLR start "ruleSelectList"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2779:1: ruleSelectList returns [EObject current=null] : ( ( (lv_resultColumns_0_0= ruleResultColumn ) ) (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )* ) ;
public final EObject ruleSelectList() throws RecognitionException {
EObject current = null;
Token otherlv_1 = null;
EObject lv_resultColumns_0_0 = null;
EObject lv_resultColumns_2_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2782:28: ( ( ( (lv_resultColumns_0_0= ruleResultColumn ) ) (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )* ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2783:1: ( ( (lv_resultColumns_0_0= ruleResultColumn ) ) (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )* )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2783:1: ( ( (lv_resultColumns_0_0= ruleResultColumn ) ) (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )* )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2783:2: ( (lv_resultColumns_0_0= ruleResultColumn ) ) (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )*
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2783:2: ( (lv_resultColumns_0_0= ruleResultColumn ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2784:1: (lv_resultColumns_0_0= ruleResultColumn )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2784:1: (lv_resultColumns_0_0= ruleResultColumn )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2785:3: lv_resultColumns_0_0= ruleResultColumn
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectListAccess().getResultColumnsResultColumnParserRuleCall_0_0());
}
pushFollow(FOLLOW_ruleResultColumn_in_ruleSelectList5944);
lv_resultColumns_0_0 = ruleResultColumn();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectListRule());
}
add(current, "resultColumns", lv_resultColumns_0_0, "ResultColumn");
afterParserOrEnumRuleCall();
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2801:2: (otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) ) )*
loop52: do {
int alt52 = 2;
int LA52_0 = input.LA(1);
if ((LA52_0 == 22)) {
alt52 = 1;
}
switch(alt52) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2801:4: otherlv_1= ',' ( (lv_resultColumns_2_0= ruleResultColumn ) )
{
otherlv_1 = (Token) match(input, 22, FOLLOW_22_in_ruleSelectList5957);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getSelectListAccess().getCommaKeyword_1_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2805:1: ( (lv_resultColumns_2_0= ruleResultColumn ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2806:1: (lv_resultColumns_2_0= ruleResultColumn )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2806:1: (lv_resultColumns_2_0= ruleResultColumn )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2807:3: lv_resultColumns_2_0= ruleResultColumn
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectListAccess().getResultColumnsResultColumnParserRuleCall_1_1_0());
}
pushFollow(FOLLOW_ruleResultColumn_in_ruleSelectList5978);
lv_resultColumns_2_0 = ruleResultColumn();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectListRule());
}
add(current, "resultColumns", lv_resultColumns_2_0, "ResultColumn");
afterParserOrEnumRuleCall();
}
}
}
}
break;
default:
break loop52;
}
} while (true);
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method entryRuleDropViewStatement.
// $ANTLR end "ruleDropTriggerStatement"
// $ANTLR start "entryRuleDropViewStatement"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4601:1: entryRuleDropViewStatement returns [EObject current=null] : iv_ruleDropViewStatement= ruleDropViewStatement EOF ;
public final EObject entryRuleDropViewStatement() throws RecognitionException {
EObject current = null;
EObject iv_ruleDropViewStatement = null;
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4602:2: (iv_ruleDropViewStatement= ruleDropViewStatement EOF )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4603:2: iv_ruleDropViewStatement= ruleDropViewStatement EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDropViewStatementRule());
}
pushFollow(FOLLOW_ruleDropViewStatement_in_entryRuleDropViewStatement9978);
iv_ruleDropViewStatement = ruleDropViewStatement();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleDropViewStatement;
}
match(input, EOF, FOLLOW_EOF_in_entryRuleDropViewStatement9988);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations