use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleColumnDef.
// $ANTLR end "entryRuleColumnDef"
// $ANTLR start "ruleColumnDef"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4851:1: ruleColumnDef returns [EObject current=null] : ( () ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= ruleColumnType ) ) ( (lv_constraints_3_0= ruleColumnConstraint ) )* ) ;
public final EObject ruleColumnDef() throws RecognitionException {
EObject current = null;
Token lv_name_1_0 = null;
Enumerator lv_type_2_0 = null;
EObject lv_constraints_3_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4854:28: ( ( () ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= ruleColumnType ) ) ( (lv_constraints_3_0= ruleColumnConstraint ) )* ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4855:1: ( () ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= ruleColumnType ) ) ( (lv_constraints_3_0= ruleColumnConstraint ) )* )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4855:1: ( () ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= ruleColumnType ) ) ( (lv_constraints_3_0= ruleColumnConstraint ) )* )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4855:2: () ( (lv_name_1_0= RULE_ID ) ) ( (lv_type_2_0= ruleColumnType ) ) ( (lv_constraints_3_0= ruleColumnConstraint ) )*
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4855:2: ()
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4856:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getColumnDefAccess().getColumnDefAction_0(), current);
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4861:2: ( (lv_name_1_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4862:1: (lv_name_1_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4862:1: (lv_name_1_0= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4863:3: lv_name_1_0= RULE_ID
{
lv_name_1_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleColumnDef10595);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_1_0, grammarAccess.getColumnDefAccess().getNameIDTerminalRuleCall_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getColumnDefRule());
}
setWithLastConsumed(current, "name", lv_name_1_0, "ID");
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4879:2: ( (lv_type_2_0= ruleColumnType ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4880:1: (lv_type_2_0= ruleColumnType )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4880:1: (lv_type_2_0= ruleColumnType )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4881:3: lv_type_2_0= ruleColumnType
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getColumnDefAccess().getTypeColumnTypeEnumRuleCall_2_0());
}
pushFollow(FOLLOW_ruleColumnType_in_ruleColumnDef10621);
lv_type_2_0 = ruleColumnType();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getColumnDefRule());
}
set(current, "type", lv_type_2_0, "ColumnType");
afterParserOrEnumRuleCall();
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4897:2: ( (lv_constraints_3_0= ruleColumnConstraint ) )*
loop85: do {
int alt85 = 2;
int LA85_0 = input.LA(1);
if ((LA85_0 == 56 || LA85_0 == 113 || LA85_0 == 115 || (LA85_0 >= 117 && LA85_0 <= 118))) {
alt85 = 1;
}
switch(alt85) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4898:1: (lv_constraints_3_0= ruleColumnConstraint )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4898:1: (lv_constraints_3_0= ruleColumnConstraint )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:4899:3: lv_constraints_3_0= ruleColumnConstraint
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getColumnDefAccess().getConstraintsColumnConstraintParserRuleCall_3_0());
}
pushFollow(FOLLOW_ruleColumnConstraint_in_ruleColumnDef10642);
lv_constraints_3_0 = ruleColumnConstraint();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getColumnDefRule());
}
add(current, "constraints", lv_constraints_3_0, "ColumnConstraint");
afterParserOrEnumRuleCall();
}
}
}
break;
default:
break loop85;
}
} while (true);
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleInsertStatement.
// $ANTLR end "entryRuleInsertStatement"
// $ANTLR start "ruleInsertStatement"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5818:1: ruleInsertStatement returns [EObject current=null] : ( ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' ) otherlv_4= 'into' ( (otherlv_5= RULE_ID ) ) (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )? ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) ) ) ;
public final EObject ruleInsertStatement() throws RecognitionException {
EObject current = null;
Token otherlv_0 = null;
Token otherlv_1 = null;
Token otherlv_3 = null;
Token otherlv_4 = null;
Token otherlv_5 = null;
Token otherlv_6 = null;
Token otherlv_7 = null;
Token otherlv_8 = null;
Token otherlv_9 = null;
Token otherlv_10 = null;
Token otherlv_11 = null;
Token otherlv_12 = null;
Token otherlv_14 = null;
Token otherlv_16 = null;
Token otherlv_18 = null;
Token otherlv_19 = null;
Enumerator lv_conflictResolution_2_0 = null;
EObject lv_expressions_13_0 = null;
EObject lv_expressions_15_0 = null;
EObject lv_selectStatement_17_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5821:28: ( ( ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' ) otherlv_4= 'into' ( (otherlv_5= RULE_ID ) ) (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )? ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) ) ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:1: ( ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' ) otherlv_4= 'into' ( (otherlv_5= RULE_ID ) ) (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )? ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:1: ( ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' ) otherlv_4= 'into' ( (otherlv_5= RULE_ID ) ) (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )? ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:2: ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' ) otherlv_4= 'into' ( (otherlv_5= RULE_ID ) ) (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )? ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:2: ( (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? ) | otherlv_3= 'replace' )
int alt103 = 2;
int LA103_0 = input.LA(1);
if ((LA103_0 == 103)) {
alt103 = 1;
} else if ((LA103_0 == 122)) {
alt103 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 103, 0, input);
throw nvae;
}
switch(alt103) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:3: (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:3: (otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )? )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5822:5: otherlv_0= 'insert' (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )?
{
otherlv_0 = (Token) match(input, 103, FOLLOW_103_in_ruleInsertStatement12710);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_0, grammarAccess.getInsertStatementAccess().getInsertKeyword_0_0_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5826:1: (otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) ) )?
int alt102 = 2;
int LA102_0 = input.LA(1);
if ((LA102_0 == 54)) {
alt102 = 1;
}
switch(alt102) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5826:3: otherlv_1= 'or' ( (lv_conflictResolution_2_0= ruleConflictResolution ) )
{
otherlv_1 = (Token) match(input, 54, FOLLOW_54_in_ruleInsertStatement12723);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getInsertStatementAccess().getOrKeyword_0_0_1_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5830:1: ( (lv_conflictResolution_2_0= ruleConflictResolution ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5831:1: (lv_conflictResolution_2_0= ruleConflictResolution )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5831:1: (lv_conflictResolution_2_0= ruleConflictResolution )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5832:3: lv_conflictResolution_2_0= ruleConflictResolution
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInsertStatementAccess().getConflictResolutionConflictResolutionEnumRuleCall_0_0_1_1_0());
}
pushFollow(FOLLOW_ruleConflictResolution_in_ruleInsertStatement12744);
lv_conflictResolution_2_0 = ruleConflictResolution();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInsertStatementRule());
}
set(current, "conflictResolution", lv_conflictResolution_2_0, "ConflictResolution");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5849:7: otherlv_3= 'replace'
{
otherlv_3 = (Token) match(input, 122, FOLLOW_122_in_ruleInsertStatement12765);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_3, grammarAccess.getInsertStatementAccess().getReplaceKeyword_0_1());
}
}
break;
}
otherlv_4 = (Token) match(input, 123, FOLLOW_123_in_ruleInsertStatement12778);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_4, grammarAccess.getInsertStatementAccess().getIntoKeyword_1());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5857:1: ( (otherlv_5= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5858:1: (otherlv_5= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5858:1: (otherlv_5= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5859:3: otherlv_5= RULE_ID
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInsertStatementRule());
}
}
otherlv_5 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleInsertStatement12798);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_5, grammarAccess.getInsertStatementAccess().getTableTableDefinitionCrossReference_2_0());
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5870:2: (otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')' )?
int alt105 = 2;
int LA105_0 = input.LA(1);
if ((LA105_0 == 21)) {
alt105 = 1;
}
switch(alt105) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5870:4: otherlv_6= '(' ( (otherlv_7= RULE_ID ) ) (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )* otherlv_10= ')'
{
otherlv_6 = (Token) match(input, 21, FOLLOW_21_in_ruleInsertStatement12811);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getInsertStatementAccess().getLeftParenthesisKeyword_3_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5874:1: ( (otherlv_7= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5875:1: (otherlv_7= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5875:1: (otherlv_7= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5876:3: otherlv_7= RULE_ID
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInsertStatementRule());
}
}
otherlv_7 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleInsertStatement12831);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_7, grammarAccess.getInsertStatementAccess().getColumnNamesColumnDefCrossReference_3_1_0());
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5887:2: (otherlv_8= ',' ( (otherlv_9= RULE_ID ) ) )*
loop104: do {
int alt104 = 2;
int LA104_0 = input.LA(1);
if ((LA104_0 == 22)) {
alt104 = 1;
}
switch(alt104) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5887:4: otherlv_8= ',' ( (otherlv_9= RULE_ID ) )
{
otherlv_8 = (Token) match(input, 22, FOLLOW_22_in_ruleInsertStatement12844);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getInsertStatementAccess().getCommaKeyword_3_2_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5891:1: ( (otherlv_9= RULE_ID ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5892:1: (otherlv_9= RULE_ID )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5892:1: (otherlv_9= RULE_ID )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5893:3: otherlv_9= RULE_ID
{
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getInsertStatementRule());
}
}
otherlv_9 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleInsertStatement12864);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_9, grammarAccess.getInsertStatementAccess().getColumnNamesColumnDefCrossReference_3_2_1_0());
}
}
}
}
break;
default:
break loop104;
}
} while (true);
otherlv_10 = (Token) match(input, 23, FOLLOW_23_in_ruleInsertStatement12878);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getInsertStatementAccess().getRightParenthesisKeyword_3_3());
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:3: ( ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) ) | (otherlv_18= 'default' otherlv_19= 'values' ) )
int alt108 = 2;
int LA108_0 = input.LA(1);
if ((LA108_0 == 74 || LA108_0 == 124)) {
alt108 = 1;
} else if ((LA108_0 == 117)) {
alt108 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 108, 0, input);
throw nvae;
}
switch(alt108) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:4: ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:4: ( (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' ) | ( (lv_selectStatement_17_0= ruleSelectStatement ) ) )
int alt107 = 2;
int LA107_0 = input.LA(1);
if ((LA107_0 == 124)) {
alt107 = 1;
} else if ((LA107_0 == 74)) {
alt107 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 107, 0, input);
throw nvae;
}
switch(alt107) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:5: (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:5: (otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5908:7: otherlv_11= 'values' otherlv_12= '(' ( (lv_expressions_13_0= ruleSqlExpression ) ) (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )* otherlv_16= ')'
{
otherlv_11 = (Token) match(input, 124, FOLLOW_124_in_ruleInsertStatement12895);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_11, grammarAccess.getInsertStatementAccess().getValuesKeyword_4_0_0_0());
}
otherlv_12 = (Token) match(input, 21, FOLLOW_21_in_ruleInsertStatement12907);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getInsertStatementAccess().getLeftParenthesisKeyword_4_0_0_1());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5916:1: ( (lv_expressions_13_0= ruleSqlExpression ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5917:1: (lv_expressions_13_0= ruleSqlExpression )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5917:1: (lv_expressions_13_0= ruleSqlExpression )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5918:3: lv_expressions_13_0= ruleSqlExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInsertStatementAccess().getExpressionsSqlExpressionParserRuleCall_4_0_0_2_0());
}
pushFollow(FOLLOW_ruleSqlExpression_in_ruleInsertStatement12928);
lv_expressions_13_0 = ruleSqlExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInsertStatementRule());
}
add(current, "expressions", lv_expressions_13_0, "SqlExpression");
afterParserOrEnumRuleCall();
}
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5934:2: (otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) ) )*
loop106: do {
int alt106 = 2;
int LA106_0 = input.LA(1);
if ((LA106_0 == 22)) {
alt106 = 1;
}
switch(alt106) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5934:4: otherlv_14= ',' ( (lv_expressions_15_0= ruleSqlExpression ) )
{
otherlv_14 = (Token) match(input, 22, FOLLOW_22_in_ruleInsertStatement12941);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_14, grammarAccess.getInsertStatementAccess().getCommaKeyword_4_0_0_3_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5938:1: ( (lv_expressions_15_0= ruleSqlExpression ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5939:1: (lv_expressions_15_0= ruleSqlExpression )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5939:1: (lv_expressions_15_0= ruleSqlExpression )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5940:3: lv_expressions_15_0= ruleSqlExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInsertStatementAccess().getExpressionsSqlExpressionParserRuleCall_4_0_0_3_1_0());
}
pushFollow(FOLLOW_ruleSqlExpression_in_ruleInsertStatement12962);
lv_expressions_15_0 = ruleSqlExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInsertStatementRule());
}
add(current, "expressions", lv_expressions_15_0, "SqlExpression");
afterParserOrEnumRuleCall();
}
}
}
}
break;
default:
break loop106;
}
} while (true);
otherlv_16 = (Token) match(input, 23, FOLLOW_23_in_ruleInsertStatement12976);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_16, grammarAccess.getInsertStatementAccess().getRightParenthesisKeyword_4_0_0_4());
}
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5961:6: ( (lv_selectStatement_17_0= ruleSelectStatement ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5961:6: ( (lv_selectStatement_17_0= ruleSelectStatement ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5962:1: (lv_selectStatement_17_0= ruleSelectStatement )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5962:1: (lv_selectStatement_17_0= ruleSelectStatement )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5963:3: lv_selectStatement_17_0= ruleSelectStatement
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getInsertStatementAccess().getSelectStatementSelectStatementParserRuleCall_4_0_1_0());
}
pushFollow(FOLLOW_ruleSelectStatement_in_ruleInsertStatement13004);
lv_selectStatement_17_0 = ruleSelectStatement();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getInsertStatementRule());
}
set(current, "selectStatement", lv_selectStatement_17_0, "SelectStatement");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5980:6: (otherlv_18= 'default' otherlv_19= 'values' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5980:6: (otherlv_18= 'default' otherlv_19= 'values' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5980:8: otherlv_18= 'default' otherlv_19= 'values'
{
otherlv_18 = (Token) match(input, 117, FOLLOW_117_in_ruleInsertStatement13024);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_18, grammarAccess.getInsertStatementAccess().getDefaultKeyword_4_1_0());
}
otherlv_19 = (Token) match(input, 124, FOLLOW_124_in_ruleInsertStatement13036);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_19, grammarAccess.getInsertStatementAccess().getValuesKeyword_4_1_1());
}
}
}
break;
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.
the class InternalSharedPreferencesModelParser method rulePreference.
// $ANTLR end "entryRulePreference"
// $ANTLR start "rulePreference"
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:207:1: rulePreference returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( (lv_type_2_0= rulePreferenceType ) ) (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )? ) ;
public final EObject rulePreference() throws RecognitionException {
EObject current = null;
Token lv_name_0_0 = null;
Token otherlv_1 = null;
Token otherlv_3 = null;
Enumerator lv_type_2_0 = null;
EObject lv_defaultValue_4_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:210:28: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( (lv_type_2_0= rulePreferenceType ) ) (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )? ) )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:211:1: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( (lv_type_2_0= rulePreferenceType ) ) (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )? )
{
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:211:1: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( (lv_type_2_0= rulePreferenceType ) ) (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )? )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:211:2: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( (lv_type_2_0= rulePreferenceType ) ) (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )?
{
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:211:2: ( (lv_name_0_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:212:1: (lv_name_0_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:212:1: (lv_name_0_0= RULE_ID )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:213:3: lv_name_0_0= RULE_ID
{
lv_name_0_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_rulePreference403);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_name_0_0, grammarAccess.getPreferenceAccess().getNameIDTerminalRuleCall_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getPreferenceRule());
}
setWithLastConsumed(current, "name", lv_name_0_0, "ID");
}
}
}
otherlv_1 = (Token) match(input, 16, FOLLOW_16_in_rulePreference420);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getPreferenceAccess().getColonKeyword_1());
}
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:233:1: ( (lv_type_2_0= rulePreferenceType ) )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:234:1: (lv_type_2_0= rulePreferenceType )
{
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:234:1: (lv_type_2_0= rulePreferenceType )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:235:3: lv_type_2_0= rulePreferenceType
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPreferenceAccess().getTypePreferenceTypeEnumRuleCall_2_0());
}
pushFollow(FOLLOW_rulePreferenceType_in_rulePreference441);
lv_type_2_0 = rulePreferenceType();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getPreferenceRule());
}
set(current, "type", lv_type_2_0, "PreferenceType");
afterParserOrEnumRuleCall();
}
}
}
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:251:2: (otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) ) )?
int alt2 = 2;
int LA2_0 = input.LA(1);
if ((LA2_0 == 17)) {
alt2 = 1;
}
switch(alt2) {
case 1:
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:251:4: otherlv_3= '=' ( (lv_defaultValue_4_0= ruleLiteral ) )
{
otherlv_3 = (Token) match(input, 17, FOLLOW_17_in_rulePreference454);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_3, grammarAccess.getPreferenceAccess().getEqualsSignKeyword_3_0());
}
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:255:1: ( (lv_defaultValue_4_0= ruleLiteral ) )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:256:1: (lv_defaultValue_4_0= ruleLiteral )
{
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:256:1: (lv_defaultValue_4_0= ruleLiteral )
// ../com.robotoworks.mechanoid.sharedprefs/src-gen/com/robotoworks/mechanoid/sharedprefs/parser/antlr/internal/InternalSharedPreferencesModel.g:257:3: lv_defaultValue_4_0= ruleLiteral
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getPreferenceAccess().getDefaultValueLiteralParserRuleCall_3_1_0());
}
pushFollow(FOLLOW_ruleLiteral_in_rulePreference475);
lv_defaultValue_4_0 = ruleLiteral();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getPreferenceRule());
}
set(current, "defaultValue", lv_defaultValue_4_0, "Literal");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
}
}
if (state.backtracking == 0) {
leaveRule();
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.
the class InternalNetModelParser method ruleHttpMethodType.
// $ANTLR end "ruleSignedNumber"
// $ANTLR start "ruleHttpMethodType"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2357:1: ruleHttpMethodType returns [Enumerator current=null] : ( (enumLiteral_0= 'get' ) | (enumLiteral_1= 'put' ) | (enumLiteral_2= 'post' ) | (enumLiteral_3= 'delete' ) | (enumLiteral_4= 'patch' ) ) ;
public final Enumerator ruleHttpMethodType() throws RecognitionException {
Enumerator current = null;
Token enumLiteral_0 = null;
Token enumLiteral_1 = null;
Token enumLiteral_2 = null;
Token enumLiteral_3 = null;
Token enumLiteral_4 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2359:28: ( ( (enumLiteral_0= 'get' ) | (enumLiteral_1= 'put' ) | (enumLiteral_2= 'post' ) | (enumLiteral_3= 'delete' ) | (enumLiteral_4= 'patch' ) ) )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2360:1: ( (enumLiteral_0= 'get' ) | (enumLiteral_1= 'put' ) | (enumLiteral_2= 'post' ) | (enumLiteral_3= 'delete' ) | (enumLiteral_4= 'patch' ) )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2360:1: ( (enumLiteral_0= 'get' ) | (enumLiteral_1= 'put' ) | (enumLiteral_2= 'post' ) | (enumLiteral_3= 'delete' ) | (enumLiteral_4= 'patch' ) )
int alt39 = 5;
switch(input.LA(1)) {
case 36:
{
alt39 = 1;
}
break;
case 37:
{
alt39 = 2;
}
break;
case 38:
{
alt39 = 3;
}
break;
case 39:
{
alt39 = 4;
}
break;
case 40:
{
alt39 = 5;
}
break;
default:
NoViableAltException nvae = new NoViableAltException("", 39, 0, input);
throw nvae;
}
switch(alt39) {
case 1:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2360:2: (enumLiteral_0= 'get' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2360:2: (enumLiteral_0= 'get' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2360:4: enumLiteral_0= 'get'
{
enumLiteral_0 = (Token) match(input, 36, FOLLOW_36_in_ruleHttpMethodType5403);
current = grammarAccess.getHttpMethodTypeAccess().getGetEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_0, grammarAccess.getHttpMethodTypeAccess().getGetEnumLiteralDeclaration_0());
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2366:6: (enumLiteral_1= 'put' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2366:6: (enumLiteral_1= 'put' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2366:8: enumLiteral_1= 'put'
{
enumLiteral_1 = (Token) match(input, 37, FOLLOW_37_in_ruleHttpMethodType5420);
current = grammarAccess.getHttpMethodTypeAccess().getPutEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_1, grammarAccess.getHttpMethodTypeAccess().getPutEnumLiteralDeclaration_1());
}
}
break;
case 3:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2372:6: (enumLiteral_2= 'post' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2372:6: (enumLiteral_2= 'post' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2372:8: enumLiteral_2= 'post'
{
enumLiteral_2 = (Token) match(input, 38, FOLLOW_38_in_ruleHttpMethodType5437);
current = grammarAccess.getHttpMethodTypeAccess().getPostEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_2, grammarAccess.getHttpMethodTypeAccess().getPostEnumLiteralDeclaration_2());
}
}
break;
case 4:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2378:6: (enumLiteral_3= 'delete' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2378:6: (enumLiteral_3= 'delete' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2378:8: enumLiteral_3= 'delete'
{
enumLiteral_3 = (Token) match(input, 39, FOLLOW_39_in_ruleHttpMethodType5454);
current = grammarAccess.getHttpMethodTypeAccess().getDeleteEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_3, grammarAccess.getHttpMethodTypeAccess().getDeleteEnumLiteralDeclaration_3());
}
}
break;
case 5:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2384:6: (enumLiteral_4= 'patch' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2384:6: (enumLiteral_4= 'patch' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:2384:8: enumLiteral_4= 'patch'
{
enumLiteral_4 = (Token) match(input, 40, FOLLOW_40_in_ruleHttpMethodType5471);
current = grammarAccess.getHttpMethodTypeAccess().getPatchEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
newLeafNode(enumLiteral_4, grammarAccess.getHttpMethodTypeAccess().getPatchEnumLiteralDeclaration_4());
}
}
break;
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
use of org.eclipse.emf.common.util.Enumerator in project mechanoid by robotoworks.
the class InternalNetModelParser method ruleHttpMethod.
// $ANTLR end "entryRuleHttpMethod"
// $ANTLR start "ruleHttpMethod"
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:441:1: ruleHttpMethod returns [EObject current=null] : ( ( (lv_type_0_0= ruleHttpMethodType ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_path_2_0= rulePath ) )? otherlv_3= '{' ( (lv_blocks_4_0= ruleHttpMethodBlock ) )* otherlv_5= '}' ) ;
public final EObject ruleHttpMethod() throws RecognitionException {
EObject current = null;
Token lv_name_1_0 = null;
Token otherlv_3 = null;
Token otherlv_5 = null;
Enumerator lv_type_0_0 = null;
EObject lv_path_2_0 = null;
EObject lv_blocks_4_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:444:28: ( ( ( (lv_type_0_0= ruleHttpMethodType ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_path_2_0= rulePath ) )? otherlv_3= '{' ( (lv_blocks_4_0= ruleHttpMethodBlock ) )* otherlv_5= '}' ) )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:445:1: ( ( (lv_type_0_0= ruleHttpMethodType ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_path_2_0= rulePath ) )? otherlv_3= '{' ( (lv_blocks_4_0= ruleHttpMethodBlock ) )* otherlv_5= '}' )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:445:1: ( ( (lv_type_0_0= ruleHttpMethodType ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_path_2_0= rulePath ) )? otherlv_3= '{' ( (lv_blocks_4_0= ruleHttpMethodBlock ) )* otherlv_5= '}' )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:445:2: ( (lv_type_0_0= ruleHttpMethodType ) ) ( (lv_name_1_0= RULE_ID ) ) ( (lv_path_2_0= rulePath ) )? otherlv_3= '{' ( (lv_blocks_4_0= ruleHttpMethodBlock ) )* otherlv_5= '}'
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:445:2: ( (lv_type_0_0= ruleHttpMethodType ) )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:446:1: (lv_type_0_0= ruleHttpMethodType )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:446:1: (lv_type_0_0= ruleHttpMethodType )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:447:3: lv_type_0_0= ruleHttpMethodType
{
newCompositeNode(grammarAccess.getHttpMethodAccess().getTypeHttpMethodTypeEnumRuleCall_0_0());
pushFollow(FOLLOW_ruleHttpMethodType_in_ruleHttpMethod963);
lv_type_0_0 = ruleHttpMethodType();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getHttpMethodRule());
}
set(current, "type", lv_type_0_0, "HttpMethodType");
afterParserOrEnumRuleCall();
}
}
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:463:2: ( (lv_name_1_0= RULE_ID ) )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:464:1: (lv_name_1_0= RULE_ID )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:464:1: (lv_name_1_0= RULE_ID )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:465:3: lv_name_1_0= RULE_ID
{
lv_name_1_0 = (Token) match(input, RULE_ID, FOLLOW_RULE_ID_in_ruleHttpMethod980);
newLeafNode(lv_name_1_0, grammarAccess.getHttpMethodAccess().getNameIDTerminalRuleCall_1_0());
if (current == null) {
current = createModelElement(grammarAccess.getHttpMethodRule());
}
setWithLastConsumed(current, "name", lv_name_1_0, "ID");
}
}
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:481:2: ( (lv_path_2_0= rulePath ) )?
int alt7 = 2;
int LA7_0 = input.LA(1);
if ((LA7_0 == 19)) {
alt7 = 1;
}
switch(alt7) {
case 1:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:482:1: (lv_path_2_0= rulePath )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:482:1: (lv_path_2_0= rulePath )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:483:3: lv_path_2_0= rulePath
{
newCompositeNode(grammarAccess.getHttpMethodAccess().getPathPathParserRuleCall_2_0());
pushFollow(FOLLOW_rulePath_in_ruleHttpMethod1006);
lv_path_2_0 = rulePath();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getHttpMethodRule());
}
set(current, "path", lv_path_2_0, "Path");
afterParserOrEnumRuleCall();
}
}
break;
}
otherlv_3 = (Token) match(input, 14, FOLLOW_14_in_ruleHttpMethod1019);
newLeafNode(otherlv_3, grammarAccess.getHttpMethodAccess().getLeftCurlyBracketKeyword_3());
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:503:1: ( (lv_blocks_4_0= ruleHttpMethodBlock ) )*
loop8: do {
int alt8 = 2;
int LA8_0 = input.LA(1);
if ((LA8_0 == 16 || LA8_0 == 21 || (LA8_0 >= 23 && LA8_0 <= 24))) {
alt8 = 1;
}
switch(alt8) {
case 1:
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:504:1: (lv_blocks_4_0= ruleHttpMethodBlock )
{
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:504:1: (lv_blocks_4_0= ruleHttpMethodBlock )
// ../com.robotoworks.mechanoid.net/src-gen/com/robotoworks/mechanoid/net/parser/antlr/internal/InternalNetModel.g:505:3: lv_blocks_4_0= ruleHttpMethodBlock
{
newCompositeNode(grammarAccess.getHttpMethodAccess().getBlocksHttpMethodBlockParserRuleCall_4_0());
pushFollow(FOLLOW_ruleHttpMethodBlock_in_ruleHttpMethod1040);
lv_blocks_4_0 = ruleHttpMethodBlock();
state._fsp--;
if (current == null) {
current = createModelElementForParent(grammarAccess.getHttpMethodRule());
}
add(current, "blocks", lv_blocks_4_0, "HttpMethodBlock");
afterParserOrEnumRuleCall();
}
}
break;
default:
break loop8;
}
} while (true);
otherlv_5 = (Token) match(input, 15, FOLLOW_15_in_ruleHttpMethod1053);
newLeafNode(otherlv_5, grammarAccess.getHttpMethodAccess().getRightCurlyBracketKeyword_5());
}
}
leaveRule();
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations