use of org.eclipse.emf.ecore.EObject in project mechanoid by robotoworks.
the class InternalSqliteModelParser method ruleSelectExpression.
// $ANTLR end "entryRuleSelectExpression"
// $ANTLR start "ruleSelectExpression"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2595:1: ruleSelectExpression returns [EObject current=null] : ( () otherlv_1= 'select' ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )? ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) ) (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )? (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )? (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )? (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )? ) ;
public final EObject ruleSelectExpression() throws RecognitionException {
EObject current = null;
Token otherlv_1 = null;
Token lv_distinct_2_0 = null;
Token lv_all_3_0 = null;
Token lv_allColumns_4_0 = null;
Token otherlv_6 = null;
Token otherlv_8 = null;
Token otherlv_10 = null;
Token otherlv_12 = null;
EObject lv_selectList_5_0 = null;
EObject lv_source_7_0 = null;
EObject lv_where_9_0 = null;
EObject lv_groupBy_11_0 = null;
EObject lv_having_13_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2598:28: ( ( () otherlv_1= 'select' ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )? ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) ) (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )? (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )? (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )? (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )? ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2599:1: ( () otherlv_1= 'select' ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )? ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) ) (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )? (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )? (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )? (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )? )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2599:1: ( () otherlv_1= 'select' ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )? ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) ) (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )? (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )? (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )? (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )? )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2599:2: () otherlv_1= 'select' ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )? ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) ) (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )? (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )? (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )? (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )?
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2599:2: ()
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2600:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElement(grammarAccess.getSelectExpressionAccess().getSelectExpressionAction_0(), current);
}
}
otherlv_1 = (Token) match(input, 74, FOLLOW_74_in_ruleSelectExpression5577);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_1, grammarAccess.getSelectExpressionAccess().getSelectKeyword_1());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2609:1: ( ( (lv_distinct_2_0= 'distinct' ) ) | ( (lv_all_3_0= 'all' ) ) )?
int alt46 = 3;
int LA46_0 = input.LA(1);
if ((LA46_0 == 75)) {
alt46 = 1;
} else if ((LA46_0 == 76)) {
alt46 = 2;
}
switch(alt46) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2609:2: ( (lv_distinct_2_0= 'distinct' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2609:2: ( (lv_distinct_2_0= 'distinct' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2610:1: (lv_distinct_2_0= 'distinct' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2610:1: (lv_distinct_2_0= 'distinct' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2611:3: lv_distinct_2_0= 'distinct'
{
lv_distinct_2_0 = (Token) match(input, 75, FOLLOW_75_in_ruleSelectExpression5596);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_distinct_2_0, grammarAccess.getSelectExpressionAccess().getDistinctDistinctKeyword_2_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getSelectExpressionRule());
}
setWithLastConsumed(current, "distinct", true, "distinct");
}
}
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2625:6: ( (lv_all_3_0= 'all' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2625:6: ( (lv_all_3_0= 'all' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2626:1: (lv_all_3_0= 'all' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2626:1: (lv_all_3_0= 'all' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2627:3: lv_all_3_0= 'all'
{
lv_all_3_0 = (Token) match(input, 76, FOLLOW_76_in_ruleSelectExpression5633);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_all_3_0, grammarAccess.getSelectExpressionAccess().getAllAllKeyword_2_1_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getSelectExpressionRule());
}
setWithLastConsumed(current, "all", true, "all");
}
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2640:4: ( ( (lv_allColumns_4_0= '*' ) ) | ( (lv_selectList_5_0= ruleSelectList ) ) )
int alt47 = 2;
int LA47_0 = input.LA(1);
if ((LA47_0 == 27)) {
alt47 = 1;
} else if (((LA47_0 >= RULE_ID && LA47_0 <= RULE_NUMBER) || LA47_0 == 21 || LA47_0 == 32 || (LA47_0 >= 58 && LA47_0 <= 59) || (LA47_0 >= 61 && LA47_0 <= 63) || LA47_0 == 66 || LA47_0 == 68 || (LA47_0 >= 90 && LA47_0 <= 93))) {
alt47 = 2;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 47, 0, input);
throw nvae;
}
switch(alt47) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2640:5: ( (lv_allColumns_4_0= '*' ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2640:5: ( (lv_allColumns_4_0= '*' ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2641:1: (lv_allColumns_4_0= '*' )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2641:1: (lv_allColumns_4_0= '*' )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2642:3: lv_allColumns_4_0= '*'
{
lv_allColumns_4_0 = (Token) match(input, 27, FOLLOW_27_in_ruleSelectExpression5667);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(lv_allColumns_4_0, grammarAccess.getSelectExpressionAccess().getAllColumnsAsteriskKeyword_3_0_0());
}
if (state.backtracking == 0) {
if (current == null) {
current = createModelElement(grammarAccess.getSelectExpressionRule());
}
setWithLastConsumed(current, "allColumns", true, "*");
}
}
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2656:6: ( (lv_selectList_5_0= ruleSelectList ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2656:6: ( (lv_selectList_5_0= ruleSelectList ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2657:1: (lv_selectList_5_0= ruleSelectList )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2657:1: (lv_selectList_5_0= ruleSelectList )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2658:3: lv_selectList_5_0= ruleSelectList
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectExpressionAccess().getSelectListSelectListParserRuleCall_3_1_0());
}
pushFollow(FOLLOW_ruleSelectList_in_ruleSelectExpression5707);
lv_selectList_5_0 = ruleSelectList();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectExpressionRule());
}
set(current, "selectList", lv_selectList_5_0, "SelectList");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2674:3: (otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) ) )?
int alt48 = 2;
int LA48_0 = input.LA(1);
if ((LA48_0 == 77)) {
alt48 = 1;
}
switch(alt48) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2674:5: otherlv_6= 'from' ( (lv_source_7_0= ruleJoinSource ) )
{
otherlv_6 = (Token) match(input, 77, FOLLOW_77_in_ruleSelectExpression5721);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_6, grammarAccess.getSelectExpressionAccess().getFromKeyword_4_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2678:1: ( (lv_source_7_0= ruleJoinSource ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2679:1: (lv_source_7_0= ruleJoinSource )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2679:1: (lv_source_7_0= ruleJoinSource )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2680:3: lv_source_7_0= ruleJoinSource
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectExpressionAccess().getSourceJoinSourceParserRuleCall_4_1_0());
}
pushFollow(FOLLOW_ruleJoinSource_in_ruleSelectExpression5742);
lv_source_7_0 = ruleJoinSource();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectExpressionRule());
}
set(current, "source", lv_source_7_0, "JoinSource");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2696:4: (otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) ) )?
int alt49 = 2;
int LA49_0 = input.LA(1);
if ((LA49_0 == 78)) {
alt49 = 1;
}
switch(alt49) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2696:6: otherlv_8= 'where' ( (lv_where_9_0= ruleWhereExpressions ) )
{
otherlv_8 = (Token) match(input, 78, FOLLOW_78_in_ruleSelectExpression5757);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_8, grammarAccess.getSelectExpressionAccess().getWhereKeyword_5_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2700:1: ( (lv_where_9_0= ruleWhereExpressions ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2701:1: (lv_where_9_0= ruleWhereExpressions )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2701:1: (lv_where_9_0= ruleWhereExpressions )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2702:3: lv_where_9_0= ruleWhereExpressions
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectExpressionAccess().getWhereWhereExpressionsParserRuleCall_5_1_0());
}
pushFollow(FOLLOW_ruleWhereExpressions_in_ruleSelectExpression5778);
lv_where_9_0 = ruleWhereExpressions();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectExpressionRule());
}
set(current, "where", lv_where_9_0, "WhereExpressions");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2718:4: (otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) ) )?
int alt50 = 2;
int LA50_0 = input.LA(1);
if ((LA50_0 == 79)) {
alt50 = 1;
}
switch(alt50) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2718:6: otherlv_10= 'group by' ( (lv_groupBy_11_0= ruleGroupByExpressions ) )
{
otherlv_10 = (Token) match(input, 79, FOLLOW_79_in_ruleSelectExpression5793);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_10, grammarAccess.getSelectExpressionAccess().getGroupByKeyword_6_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2722:1: ( (lv_groupBy_11_0= ruleGroupByExpressions ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2723:1: (lv_groupBy_11_0= ruleGroupByExpressions )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2723:1: (lv_groupBy_11_0= ruleGroupByExpressions )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2724:3: lv_groupBy_11_0= ruleGroupByExpressions
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectExpressionAccess().getGroupByGroupByExpressionsParserRuleCall_6_1_0());
}
pushFollow(FOLLOW_ruleGroupByExpressions_in_ruleSelectExpression5814);
lv_groupBy_11_0 = ruleGroupByExpressions();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectExpressionRule());
}
set(current, "groupBy", lv_groupBy_11_0, "GroupByExpressions");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2740:4: (otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) ) )?
int alt51 = 2;
int LA51_0 = input.LA(1);
if ((LA51_0 == 80)) {
alt51 = 1;
}
switch(alt51) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2740:6: otherlv_12= 'having' ( (lv_having_13_0= ruleHavingExpressions ) )
{
otherlv_12 = (Token) match(input, 80, FOLLOW_80_in_ruleSelectExpression5829);
if (state.failed)
return current;
if (state.backtracking == 0) {
newLeafNode(otherlv_12, grammarAccess.getSelectExpressionAccess().getHavingKeyword_7_0());
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2744:1: ( (lv_having_13_0= ruleHavingExpressions ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2745:1: (lv_having_13_0= ruleHavingExpressions )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2745:1: (lv_having_13_0= ruleHavingExpressions )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2746:3: lv_having_13_0= ruleHavingExpressions
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSelectExpressionAccess().getHavingHavingExpressionsParserRuleCall_7_1_0());
}
pushFollow(FOLLOW_ruleHavingExpressions_in_ruleSelectExpression5850);
lv_having_13_0 = ruleHavingExpressions();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getSelectExpressionRule());
}
set(current, "having", lv_having_13_0, "HavingExpressions");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
}
}
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 entryRuleDefaultValue.
// $ANTLR end "ruleIndexedColumn"
// $ANTLR start "entryRuleDefaultValue"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5560:1: entryRuleDefaultValue returns [EObject current=null] : iv_ruleDefaultValue= ruleDefaultValue EOF ;
public final EObject entryRuleDefaultValue() throws RecognitionException {
EObject current = null;
EObject iv_ruleDefaultValue = null;
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5561:2: (iv_ruleDefaultValue= ruleDefaultValue EOF )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:5562:2: iv_ruleDefaultValue= ruleDefaultValue EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getDefaultValueRule());
}
pushFollow(FOLLOW_ruleDefaultValue_in_entryRuleDefaultValue12056);
iv_ruleDefaultValue = ruleDefaultValue();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleDefaultValue;
}
match(input, EOF, FOLLOW_EOF_in_entryRuleDefaultValue12066);
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 ruleNullCheckExpression.
// $ANTLR end "entryRuleNullCheckExpression"
// $ANTLR start "ruleNullCheckExpression"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1662:1: ruleNullCheckExpression returns [EObject current=null] : (this_PrimaryExpression_0= rulePrimaryExpression ( () ( (lv_right_2_0= ruleNullExpression ) ) )? ) ;
public final EObject ruleNullCheckExpression() throws RecognitionException {
EObject current = null;
EObject this_PrimaryExpression_0 = null;
EObject lv_right_2_0 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1665:28: ( (this_PrimaryExpression_0= rulePrimaryExpression ( () ( (lv_right_2_0= ruleNullExpression ) ) )? ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1666:1: (this_PrimaryExpression_0= rulePrimaryExpression ( () ( (lv_right_2_0= ruleNullExpression ) ) )? )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1666:1: (this_PrimaryExpression_0= rulePrimaryExpression ( () ( (lv_right_2_0= ruleNullExpression ) ) )? )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1667:5: this_PrimaryExpression_0= rulePrimaryExpression ( () ( (lv_right_2_0= ruleNullExpression ) ) )?
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getNullCheckExpressionAccess().getPrimaryExpressionParserRuleCall_0());
}
pushFollow(FOLLOW_rulePrimaryExpression_in_ruleNullCheckExpression3662);
this_PrimaryExpression_0 = rulePrimaryExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_PrimaryExpression_0;
afterParserOrEnumRuleCall();
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1675:1: ( () ( (lv_right_2_0= ruleNullExpression ) ) )?
int alt27 = 2;
int LA27_0 = input.LA(1);
if (((LA27_0 >= 55 && LA27_0 <= 57))) {
alt27 = 1;
}
switch(alt27) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1675:2: () ( (lv_right_2_0= ruleNullExpression ) )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1675:2: ()
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1676:5:
{
if (state.backtracking == 0) {
current = forceCreateModelElementAndSet(grammarAccess.getNullCheckExpressionAccess().getNullCheckExpressionLeftAction_1_0(), current);
}
}
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1681:2: ( (lv_right_2_0= ruleNullExpression ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1682:1: (lv_right_2_0= ruleNullExpression )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1682:1: (lv_right_2_0= ruleNullExpression )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:1683:3: lv_right_2_0= ruleNullExpression
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getNullCheckExpressionAccess().getRightNullExpressionParserRuleCall_1_1_0());
}
pushFollow(FOLLOW_ruleNullExpression_in_ruleNullCheckExpression3692);
lv_right_2_0 = ruleNullExpression();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
if (current == null) {
current = createModelElementForParent(grammarAccess.getNullCheckExpressionRule());
}
set(current, "right", lv_right_2_0, "NullExpression");
afterParserOrEnumRuleCall();
}
}
}
}
break;
}
}
}
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 ruleSingleSource.
// $ANTLR end "entryRuleSingleSource"
// $ANTLR start "ruleSingleSource"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3106:1: ruleSingleSource returns [EObject current=null] : (this_SingleSourceTable_0= ruleSingleSourceTable | this_SingleSourceSelectStatement_1= ruleSingleSourceSelectStatement | this_SingleSourceJoin_2= ruleSingleSourceJoin ) ;
public final EObject ruleSingleSource() throws RecognitionException {
EObject current = null;
EObject this_SingleSourceTable_0 = null;
EObject this_SingleSourceSelectStatement_1 = null;
EObject this_SingleSourceJoin_2 = null;
enterRule();
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3109:28: ( (this_SingleSourceTable_0= ruleSingleSourceTable | this_SingleSourceSelectStatement_1= ruleSingleSourceSelectStatement | this_SingleSourceJoin_2= ruleSingleSourceJoin ) )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3110:1: (this_SingleSourceTable_0= ruleSingleSourceTable | this_SingleSourceSelectStatement_1= ruleSingleSourceSelectStatement | this_SingleSourceJoin_2= ruleSingleSourceJoin )
{
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3110:1: (this_SingleSourceTable_0= ruleSingleSourceTable | this_SingleSourceSelectStatement_1= ruleSingleSourceSelectStatement | this_SingleSourceJoin_2= ruleSingleSourceJoin )
int alt56 = 3;
int LA56_0 = input.LA(1);
if ((LA56_0 == RULE_ID)) {
alt56 = 1;
} else if ((LA56_0 == 21)) {
int LA56_2 = input.LA(2);
if ((LA56_2 == 74)) {
alt56 = 2;
} else if ((LA56_2 == RULE_ID || LA56_2 == 21)) {
alt56 = 3;
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 56, 2, input);
throw nvae;
}
} else {
if (state.backtracking > 0) {
state.failed = true;
return current;
}
NoViableAltException nvae = new NoViableAltException("", 56, 0, input);
throw nvae;
}
switch(alt56) {
case 1:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3111:5: this_SingleSourceTable_0= ruleSingleSourceTable
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSingleSourceAccess().getSingleSourceTableParserRuleCall_0());
}
pushFollow(FOLLOW_ruleSingleSourceTable_in_ruleSingleSource6658);
this_SingleSourceTable_0 = ruleSingleSourceTable();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_SingleSourceTable_0;
afterParserOrEnumRuleCall();
}
}
break;
case 2:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3121:5: this_SingleSourceSelectStatement_1= ruleSingleSourceSelectStatement
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSingleSourceAccess().getSingleSourceSelectStatementParserRuleCall_1());
}
pushFollow(FOLLOW_ruleSingleSourceSelectStatement_in_ruleSingleSource6685);
this_SingleSourceSelectStatement_1 = ruleSingleSourceSelectStatement();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_SingleSourceSelectStatement_1;
afterParserOrEnumRuleCall();
}
}
break;
case 3:
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:3131:5: this_SingleSourceJoin_2= ruleSingleSourceJoin
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getSingleSourceAccess().getSingleSourceJoinParserRuleCall_2());
}
pushFollow(FOLLOW_ruleSingleSourceJoin_in_ruleSingleSource6712);
this_SingleSourceJoin_2 = ruleSingleSourceJoin();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = this_SingleSourceJoin_2;
afterParserOrEnumRuleCall();
}
}
break;
}
}
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 entryRuleHavingExpressions.
// $ANTLR end "ruleGroupByExpressions"
// $ANTLR start "entryRuleHavingExpressions"
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2931:1: entryRuleHavingExpressions returns [EObject current=null] : iv_ruleHavingExpressions= ruleHavingExpressions EOF ;
public final EObject entryRuleHavingExpressions() throws RecognitionException {
EObject current = null;
EObject iv_ruleHavingExpressions = null;
try {
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2932:2: (iv_ruleHavingExpressions= ruleHavingExpressions EOF )
// ../com.robotoworks.mechanoid.db/src-gen/com/robotoworks/mechanoid/db/parser/antlr/internal/InternalSqliteModel.g:2933:2: iv_ruleHavingExpressions= ruleHavingExpressions EOF
{
if (state.backtracking == 0) {
newCompositeNode(grammarAccess.getHavingExpressionsRule());
}
pushFollow(FOLLOW_ruleHavingExpressions_in_entryRuleHavingExpressions6234);
iv_ruleHavingExpressions = ruleHavingExpressions();
state._fsp--;
if (state.failed)
return current;
if (state.backtracking == 0) {
current = iv_ruleHavingExpressions;
}
match(input, EOF, FOLLOW_EOF_in_entryRuleHavingExpressions6244);
if (state.failed)
return current;
}
} catch (RecognitionException re) {
recover(input, re);
appendSkippedTokens();
} finally {
}
return current;
}
Aggregations