InternalXtype.g:242:1: ruleJvmUpperBoundAnded : ( ( rule__JvmUpperBoundAnded__Group__0 ) ) ;
515493
public final void ruleJvmUpperBoundAnded() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtype.g:246:2: ( ( ( rule__JvmUpperBoundAnded__Group__0 ) ) )
            // InternalXtype.g:247:2: ( ( rule__JvmUpperBoundAnded__Group__0 ) )
            {
            // InternalXtype.g:247:2: ( ( rule__JvmUpperBoundAnded__Group__0 ) )
            // InternalXtype.g:248:3: ( rule__JvmUpperBoundAnded__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getJvmUpperBoundAndedAccess().getGroup()); 
            }
            // InternalXtype.g:249:3: ( rule__JvmUpperBoundAnded__Group__0 )
            // InternalXtype.g:249:4: rule__JvmUpperBoundAnded__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__JvmUpperBoundAnded__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getJvmUpperBoundAndedAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
339064
public final EObject ruleJvmUpperBound() throws RecognitionException {
        EObject current = null;

        Token otherlv_0=null;
        EObject lv_typeReference_1_0 = null;



        	enterRule();

        try {
            // InternalPureXbase.g:6442:2: ( (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) ) )
            // InternalPureXbase.g:6443:2: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )
            {
            // InternalPureXbase.g:6443:2: (otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) ) )
            // InternalPureXbase.g:6444:3: otherlv_0= 'extends' ( (lv_typeReference_1_0= ruleJvmTypeReference ) )
            {
            otherlv_0=(Token)match(input,82,FOLLOW_11); if (state.failed) return current;
            if ( state.backtracking==0 ) {

              			newLeafNode(otherlv_0, grammarAccess.getJvmUpperBoundAccess().getExtendsKeyword_0());
              		
            }
            // InternalPureXbase.g:6448:3: ( (lv_typeReference_1_0= ruleJvmTypeReference ) )
            // InternalPureXbase.g:6449:4: (lv_typeReference_1_0= ruleJvmTypeReference )
            {
            // InternalPureXbase.g:6449:4: (lv_typeReference_1_0= ruleJvmTypeReference )
            // InternalPureXbase.g:6450:5: lv_typeReference_1_0= ruleJvmTypeReference
            {
            if ( state.backtracking==0 ) {

              					newCompositeNode(grammarAccess.getJvmUpperBoundAccess().getTypeReferenceJvmTypeReferenceParserRuleCall_1_0());
              				
            }
            pushFollow(FOLLOW_2);
            lv_typeReference_1_0=ruleJvmTypeReference();

            state._fsp--;
            if (state.failed) return current;
            if ( state.backtracking==0 ) {

              					if (current==null) {
              						current = createModelElementForParent(grammarAccess.getJvmUpperBoundRule());
              					}
              					set(
              						current,
              						"typeReference",
              						lv_typeReference_1_0,
              						"org.eclipse.xtext.xbase.Xtype.JvmTypeReference");
              					afterParserOrEnumRuleCall();
              				
            }

            }


            }


            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
681593
public final EObject ruleConditionalBranch() throws RecognitionException {
        EObject current = null;

        Token otherlv_2=null;
        Token otherlv_4=null;
        EObject this_UnorderedGroup_0 = null;

        EObject lv_guardCondition_3_0 = null;

        EObject lv_elements_5_0 = null;



        	enterRule();

        try {
            // InternalXtext.g:1048:2: ( (this_UnorderedGroup_0= ruleUnorderedGroup | ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ ) ) )
            // InternalXtext.g:1049:2: (this_UnorderedGroup_0= ruleUnorderedGroup | ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ ) )
            {
            // InternalXtext.g:1049:2: (this_UnorderedGroup_0= ruleUnorderedGroup | ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ ) )
            int alt28=2;
            int LA28_0 = input.LA(1);

            if ( ((LA28_0>=RULE_STRING && LA28_0<=RULE_ID)||LA28_0==15||LA28_0==34||(LA28_0>=39 && LA28_0<=40)||(LA28_0>=42 && LA28_0<=43)) ) {
                alt28=1;
            }
            else if ( (LA28_0==27) ) {
                alt28=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 28, 0, input);

                throw nvae;
            }
            switch (alt28) {
                case 1 :
                    // InternalXtext.g:1050:3: this_UnorderedGroup_0= ruleUnorderedGroup
                    {

                    			newCompositeNode(grammarAccess.getConditionalBranchAccess().getUnorderedGroupParserRuleCall_0());
                    		
                    pushFollow(FollowSets000.FOLLOW_2);
                    this_UnorderedGroup_0=ruleUnorderedGroup();

                    state._fsp--;


                    			current = this_UnorderedGroup_0;
                    			afterParserOrEnumRuleCall();
                    		

                    }
                    break;
                case 2 :
                    // InternalXtext.g:1059:3: ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ )
                    {
                    // InternalXtext.g:1059:3: ( () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+ )
                    // InternalXtext.g:1060:4: () otherlv_2= '<' ( (lv_guardCondition_3_0= ruleDisjunction ) ) otherlv_4= '>' ( (lv_elements_5_0= ruleAbstractToken ) )+
                    {
                    // InternalXtext.g:1060:4: ()
                    // InternalXtext.g:1061:5: 
                    {

                    					current = forceCreateModelElement(
                    						grammarAccess.getConditionalBranchAccess().getGroupAction_1_0(),
                    						current);
                    				

                    }

                    otherlv_2=(Token)match(input,27,FollowSets000.FOLLOW_26); 

                    				newLeafNode(otherlv_2, grammarAccess.getConditionalBranchAccess().getLessThanSignKeyword_1_1());
                    			
                    // InternalXtext.g:1071:4: ( (lv_guardCondition_3_0= ruleDisjunction ) )
                    // InternalXtext.g:1072:5: (lv_guardCondition_3_0= ruleDisjunction )
                    {
                    // InternalXtext.g:1072:5: (lv_guardCondition_3_0= ruleDisjunction )
                    // InternalXtext.g:1073:6: lv_guardCondition_3_0= ruleDisjunction
                    {

                    						newCompositeNode(grammarAccess.getConditionalBranchAccess().getGuardConditionDisjunctionParserRuleCall_1_2_0());
                    					
                    pushFollow(FollowSets000.FOLLOW_27);
                    lv_guardCondition_3_0=ruleDisjunction();

                    state._fsp--;


                    						if (current==null) {
                    							current = createModelElementForParent(grammarAccess.getConditionalBranchRule());
                    						}
                    						set(
                    							current,
                    							"guardCondition",
                    							lv_guardCondition_3_0,
                    							"org.eclipse.xtext.Xtext.Disjunction");
                    						afterParserOrEnumRuleCall();
                    					

                    }


                    }

                    otherlv_4=(Token)match(input,28,FollowSets000.FOLLOW_28); 

                    				newLeafNode(otherlv_4, grammarAccess.getConditionalBranchAccess().getGreaterThanSignKeyword_1_3());
                    			
                    // InternalXtext.g:1094:4: ( (lv_elements_5_0= ruleAbstractToken ) )+
                    int cnt27=0;
                    loop27:
                    do {
                        int alt27=2;
                        int LA27_0 = input.LA(1);

                        if ( ((LA27_0>=RULE_STRING && LA27_0<=RULE_ID)||LA27_0==15||LA27_0==34||(LA27_0>=39 && LA27_0<=40)||(LA27_0>=42 && LA27_0<=43)) ) {
                            alt27=1;
                        }


                        switch (alt27) {
                    	case 1 :
                    	    // InternalXtext.g:1095:5: (lv_elements_5_0= ruleAbstractToken )
                    	    {
                    	    // InternalXtext.g:1095:5: (lv_elements_5_0= ruleAbstractToken )
                    	    // InternalXtext.g:1096:6: lv_elements_5_0= ruleAbstractToken
                    	    {

                    	    						newCompositeNode(grammarAccess.getConditionalBranchAccess().getElementsAbstractTokenParserRuleCall_1_4_0());
                    	    					
                    	    pushFollow(FollowSets000.FOLLOW_29);
                    	    lv_elements_5_0=ruleAbstractToken();

                    	    state._fsp--;


                    	    						if (current==null) {
                    	    							current = createModelElementForParent(grammarAccess.getConditionalBranchRule());
                    	    						}
                    	    						add(
                    	    							current,
                    	    							"elements",
                    	    							lv_elements_5_0,
                    	    							"org.eclipse.xtext.Xtext.AbstractToken");
                    	    						afterParserOrEnumRuleCall();
                    	    					

                    	    }


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt27 >= 1 ) break loop27;
                                EarlyExitException eee =
                                    new EarlyExitException(27, input);
                                throw eee;
                        }
                        cnt27++;
                    } while (true);


                    }


                    }
                    break;

            }


            }


            	leaveRule();

        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
89636
public final void ruleAbstractTokenWithCardinality() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:458:2: ( ( ( rule__AbstractTokenWithCardinality__Group__0 ) ) )
            // InternalXtext.g:459:2: ( ( rule__AbstractTokenWithCardinality__Group__0 ) )
            {
            // InternalXtext.g:459:2: ( ( rule__AbstractTokenWithCardinality__Group__0 ) )
            // InternalXtext.g:460:3: ( rule__AbstractTokenWithCardinality__Group__0 )
            {
             before(grammarAccess.getAbstractTokenWithCardinalityAccess().getGroup()); 
            // InternalXtext.g:461:3: ( rule__AbstractTokenWithCardinality__Group__0 )
            // InternalXtext.g:461:4: rule__AbstractTokenWithCardinality__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__AbstractTokenWithCardinality__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getAbstractTokenWithCardinalityAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
607120
void reportBoundError(UndetVar uv, InferenceBound ib1, InferenceBound ib2) {
        reportInferenceError(
                String.format("incompatible.%s.%s.bounds",
                        StringUtils.toLowerCase(ib1.name()),
                        StringUtils.toLowerCase(ib2.name())),
                uv.qtype,
                uv.getBounds(ib1),
                uv.getBounds(ib2));
    }
262439
@SuppressWarnings("fallthrough")
    boolean isUnboundMemberRef() {
        int pos = 0, depth = 0;
        outer: for (Token t = S.token(pos) ; ; t = S.token(++pos)) {
            switch (t.kind) {
                case IDENTIFIER: case UNDERSCORE: case QUES: case EXTENDS: case SUPER:
                case DOT: case RBRACKET: case LBRACKET: case COMMA:
                case BYTE: case SHORT: case INT: case LONG: case FLOAT:
                case DOUBLE: case BOOLEAN: case CHAR:
                case MONKEYS_AT:
                    break;

                case LPAREN:
                    // skip annotation values
                    int nesting = 0;
                    for (; ; pos++) {
                        TokenKind tk2 = S.token(pos).kind;
                        switch (tk2) {
                            case EOF:
                                return false;
                            case LPAREN:
                                nesting++;
                                break;
                            case RPAREN:
                                nesting--;
                                if (nesting == 0) {
                                    continue outer;
                                }
                                break;
                        }
                    }

                case LT:
                    depth++; break;
                case GTGTGT:
                    depth--;
                case GTGT:
                    depth--;
                case GT:
                    depth--;
                    if (depth == 0) {
                        TokenKind nextKind = S.token(pos + 1).kind;
                        return
                            nextKind == TokenKind.DOT ||
                            nextKind == TokenKind.LBRACKET ||
                            nextKind == TokenKind.COLCOL;
                    }
                    break;
                default:
                    return false;
            }
        }
    }
18388
public final void ruleTerminalToken() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:1183:2: ( ( ( rule__TerminalToken__Group__0 ) ) )
            // InternalXtext.g:1184:2: ( ( rule__TerminalToken__Group__0 ) )
            {
            // InternalXtext.g:1184:2: ( ( rule__TerminalToken__Group__0 ) )
            // InternalXtext.g:1185:3: ( rule__TerminalToken__Group__0 )
            {
             before(grammarAccess.getTerminalTokenAccess().getGroup()); 
            // InternalXtext.g:1186:3: ( rule__TerminalToken__Group__0 )
            // InternalXtext.g:1186:4: rule__TerminalToken__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__TerminalToken__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getTerminalTokenAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
459913
public final void ruleParserRule() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:241:2: ( ( ( rule__ParserRule__Group__0 ) ) )
            // InternalXtext.g:242:2: ( ( rule__ParserRule__Group__0 ) )
            {
            // InternalXtext.g:242:2: ( ( rule__ParserRule__Group__0 ) )
            // InternalXtext.g:243:3: ( rule__ParserRule__Group__0 )
            {
             before(grammarAccess.getParserRuleAccess().getGroup()); 
            // InternalXtext.g:244:3: ( rule__ParserRule__Group__0 )
            // InternalXtext.g:244:4: rule__ParserRule__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__ParserRule__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getParserRuleAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1355224
public final void ruleXCatchClause() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1521:2: ( ( ( rule__XCatchClause__Group__0 ) ) )
            // InternalXbase.g:1522:2: ( ( rule__XCatchClause__Group__0 ) )
            {
            // InternalXbase.g:1522:2: ( ( rule__XCatchClause__Group__0 ) )
            // InternalXbase.g:1523:3: ( rule__XCatchClause__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXCatchClauseAccess().getGroup()); 
            }
            // InternalXbase.g:1524:3: ( rule__XCatchClause__Group__0 )
            // InternalXbase.g:1524:4: rule__XCatchClause__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XCatchClause__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXCatchClauseAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
501494
public final void mGROUP() throws RecognitionException {
		try {
			int _type = GROUP;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:31:7: ( 'group' )
			// hql.g:31:9: 'group'
			{
			match("group"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
127604
private void primUpdateMembers(EntityGroupImpl egi, Connection conn) throws SQLException {
        String groupKey = egi.getLocalKey();
        String memberKey, isGroup, serviceName = null;
        try {
            if (egi.hasDeletes()) {
                List deletedGroups = new ArrayList();
                List deletedEntities = new ArrayList();
                Iterator deletes = egi.getRemovedMembers().values().iterator();
                while (deletes.hasNext()) {
                    IGroupMember gm = (IGroupMember) deletes.next();
                    if (gm.isGroup()) {
                        deletedGroups.add(gm);
                    } else {
                        deletedEntities.add(gm);
                    }
                }

                if (!deletedGroups.isEmpty()) {
                    PreparedStatement psDeleteMemberGroup =
                            conn.prepareStatement(getDeleteMemberGroupSql());

                    try {
                        for (Iterator groups = deletedGroups.iterator(); groups.hasNext(); ) {
                            IEntityGroup removedGroup = (IEntityGroup) groups.next();
                            memberKey = removedGroup.getLocalKey();
                            isGroup = MEMBER_IS_GROUP;
                            serviceName = removedGroup.getServiceName().toString();

                            psDeleteMemberGroup.setString(1, groupKey);
                            psDeleteMemberGroup.setString(2, serviceName);
                            psDeleteMemberGroup.setString(3, memberKey);

                            if (LOG.isDebugEnabled())
                                LOG.debug(
                                        "RDBMEntityGroupStore.primUpdateMembers(): "
                                                + psDeleteMemberGroup
                                                + "("
                                                + groupKey
                                                + ", "
                                                + serviceName
                                                + ", "
                                                + memberKey
                                                + ", isGroup = T)");

                            psDeleteMemberGroup.executeUpdate();
                        } // for
                    } // try
                    finally {
                        psDeleteMemberGroup.close();
                    }
                } // if ( ! deletedGroups.isEmpty() )

                if (!deletedEntities.isEmpty()) {
                    PreparedStatement psDeleteMemberEntity =
                            conn.prepareStatement(getDeleteMemberEntitySql());

                    try {
                        for (Iterator entities = deletedEntities.iterator(); entities.hasNext(); ) {
                            IGroupMember removedEntity = (IGroupMember) entities.next();
                            memberKey = removedEntity.getUnderlyingEntityIdentifier().getKey();
                            isGroup = MEMBER_IS_ENTITY;

                            psDeleteMemberEntity.setString(1, groupKey);
                            psDeleteMemberEntity.setString(2, memberKey);

                            if (LOG.isDebugEnabled())
                                LOG.debug(
                                        "RDBMEntityGroupStore.primUpdateMembers(): "
                                                + psDeleteMemberEntity
                                                + "("
                                                + groupKey
                                                + ", "
                                                + memberKey
                                                + ", "
                                                + "isGroup = F)");

                            psDeleteMemberEntity.executeUpdate();
                        } // for
                    } // try
                    finally {
                        psDeleteMemberEntity.close();
                    }
                } //  if ( ! deletedEntities.isEmpty() )
            }

            if (egi.hasAdds()) {
                PreparedStatement psAdd = conn.prepareStatement(getInsertMemberSql());

                try {
                    Iterator adds = egi.getAddedMembers().values().iterator();
                    while (adds.hasNext()) {
                        IGroupMember addedGM = (IGroupMember) adds.next();
                        memberKey = addedGM.getKey();
                        if (addedGM.isGroup()) {
                            IEntityGroup addedGroup = (IEntityGroup) addedGM;
                            isGroup = MEMBER_IS_GROUP;
                            serviceName = addedGroup.getServiceName().toString();
                            memberKey = addedGroup.getLocalKey();
                        } else {
                            isGroup = MEMBER_IS_ENTITY;
                            serviceName = egi.getServiceName().toString();
                            memberKey = addedGM.getUnderlyingEntityIdentifier().getKey();
                        }

                        psAdd.setString(1, groupKey);
                        psAdd.setString(2, serviceName);
                        psAdd.setString(3, memberKey);
                        psAdd.setString(4, isGroup);

                        if (LOG.isDebugEnabled())
                            LOG.debug(
                                    "RDBMEntityGroupStore.primUpdateMembers(): "
                                            + psAdd
                                            + "("
                                            + groupKey
                                            + ", "
                                            + memberKey
                                            + ", "
                                            + isGroup
                                            + ")");

                        psAdd.executeUpdate();
                    }
                } finally {
                    psAdd.close();
                }
            }

        } catch (SQLException sqle) {
            LOG.error("Error inserting/deleting membership rows.", sqle);
            throw sqle;
        }
    }
117084
public final void ruleJvmLowerBoundAnded() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1829:2: ( ( ( rule__JvmLowerBoundAnded__Group__0 ) ) )
            // InternalXbase.g:1830:2: ( ( rule__JvmLowerBoundAnded__Group__0 ) )
            {
            // InternalXbase.g:1830:2: ( ( rule__JvmLowerBoundAnded__Group__0 ) )
            // InternalXbase.g:1831:3: ( rule__JvmLowerBoundAnded__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getJvmLowerBoundAndedAccess().getGroup()); 
            }
            // InternalXbase.g:1832:3: ( rule__JvmLowerBoundAnded__Group__0 )
            // InternalXbase.g:1832:4: rule__JvmLowerBoundAnded__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__JvmLowerBoundAnded__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getJvmLowerBoundAndedAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
57246
public final void ruleDisjunction() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:633:2: ( ( ( rule__Disjunction__Group__0 ) ) )
            // InternalXtext.g:634:2: ( ( rule__Disjunction__Group__0 ) )
            {
            // InternalXtext.g:634:2: ( ( rule__Disjunction__Group__0 ) )
            // InternalXtext.g:635:3: ( rule__Disjunction__Group__0 )
            {
             before(grammarAccess.getDisjunctionAccess().getGroup()); 
            // InternalXtext.g:636:3: ( rule__Disjunction__Group__0 )
            // InternalXtext.g:636:4: rule__Disjunction__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__Disjunction__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getDisjunctionAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
1172882
public final void ruleUntilToken() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXtext.g:1308:2: ( ( ( rule__UntilToken__Group__0 ) ) )
            // InternalXtext.g:1309:2: ( ( rule__UntilToken__Group__0 ) )
            {
            // InternalXtext.g:1309:2: ( ( rule__UntilToken__Group__0 ) )
            // InternalXtext.g:1310:3: ( rule__UntilToken__Group__0 )
            {
             before(grammarAccess.getUntilTokenAccess().getGroup()); 
            // InternalXtext.g:1311:3: ( rule__UntilToken__Group__0 )
            // InternalXtext.g:1311:4: rule__UntilToken__Group__0
            {
            pushFollow(FollowSets000.FOLLOW_2);
            rule__UntilToken__Group__0();

            state._fsp--;


            }

             after(grammarAccess.getUntilTokenAccess().getGroup()); 

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
123936
public final AntlrDatatypeRuleToken ruleOpMulti() throws RecognitionException {
        AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();

        Token kw=null;


        	enterRule();

        try {
            // InternalPureXbase.g:1975:2: ( (kw= '*' | kw= '**' | kw= '/' | kw= '%' ) )
            // InternalPureXbase.g:1976:2: (kw= '*' | kw= '**' | kw= '/' | kw= '%' )
            {
            // InternalPureXbase.g:1976:2: (kw= '*' | kw= '**' | kw= '/' | kw= '%' )
            int alt35=4;
            switch ( input.LA(1) ) {
            case 46:
                {
                alt35=1;
                }
                break;
            case 47:
                {
                alt35=2;
                }
                break;
            case 48:
                {
                alt35=3;
                }
                break;
            case 49:
                {
                alt35=4;
                }
                break;
            default:
                if (state.backtracking>0) {state.failed=true; return current;}
                NoViableAltException nvae =
                    new NoViableAltException("", 35, 0, input);

                throw nvae;
            }

            switch (alt35) {
                case 1 :
                    // InternalPureXbase.g:1977:3: kw= '*'
                    {
                    kw=(Token)match(input,46,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAccess().getAsteriskKeyword_0());
                      		
                    }

                    }
                    break;
                case 2 :
                    // InternalPureXbase.g:1983:3: kw= '**'
                    {
                    kw=(Token)match(input,47,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAccess().getAsteriskAsteriskKeyword_1());
                      		
                    }

                    }
                    break;
                case 3 :
                    // InternalPureXbase.g:1989:3: kw= '/'
                    {
                    kw=(Token)match(input,48,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAccess().getSolidusKeyword_2());
                      		
                    }

                    }
                    break;
                case 4 :
                    // InternalPureXbase.g:1995:3: kw= '%'
                    {
                    kw=(Token)match(input,49,FOLLOW_2); if (state.failed) return current;
                    if ( state.backtracking==0 ) {

                      			current.merge(kw);
                      			newLeafNode(kw, grammarAccess.getOpMultiAccess().getPercentSignKeyword_3());
                      		
                    }

                    }
                    break;

            }


            }

            if ( state.backtracking==0 ) {

              	leaveRule();

            }
        }

            catch (RecognitionException re) {
                recover(input,re);
                appendSkippedTokens();
            }
        finally {
        }
        return current;
    }
661153
public final void ruleXBlockExpression() throws RecognitionException {

        		int stackSize = keepStackSize();
        	
        try {
            // InternalXbase.g:1071:2: ( ( ( rule__XBlockExpression__Group__0 ) ) )
            // InternalXbase.g:1072:2: ( ( rule__XBlockExpression__Group__0 ) )
            {
            // InternalXbase.g:1072:2: ( ( rule__XBlockExpression__Group__0 ) )
            // InternalXbase.g:1073:3: ( rule__XBlockExpression__Group__0 )
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXBlockExpressionAccess().getGroup()); 
            }
            // InternalXbase.g:1074:3: ( rule__XBlockExpression__Group__0 )
            // InternalXbase.g:1074:4: rule__XBlockExpression__Group__0
            {
            pushFollow(FOLLOW_2);
            rule__XBlockExpression__Group__0();

            state._fsp--;
            if (state.failed) return ;

            }

            if ( state.backtracking==0 ) {
               after(grammarAccess.getXBlockExpressionAccess().getGroup()); 
            }

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {

            	restoreStackSize(stackSize);

        }
        return ;
    }
630718
public void doFilter(JsonRule jsonRule, EnumBuilderType type) throws FilterException {
        if (jsonRule.isGroup()) {
            IGroup group = jsonRule.toGroup();
            if (CollectionUtils.isEmpty(group.getRules())) {
                throw new FilterException("group's rules can not be empty for: " + group);
            }
        } else {
            IRule rule = jsonRule.toRule();
            // field
            if (StringUtils.isEmpty(rule.getField())) {
                throw new FilterException("rule's field can not be empty for:" + rule);
            }
            // operator
            if (StringUtils.isEmpty(rule.getOperator())) {
                throw new FilterException("rule's operator can not be empty for:" + rule);
            }
            // type
            if (StringUtils.isEmpty(rule.getType())) {
                throw new FilterException("rule's type can not be empty for:" + rule);
            }
            // equal
            if (EnumOperator.EQUAL.equals(rule.getOperator())) {
                if (rule.getValue() instanceof List) {
                    List<Object> list = (List<Object>) rule.getValue();
                    if (list.size() > 1) {
                        throw new FilterException("Operator \"equal\" cannot accept multiple values for:" + rule);
                    }
                    rule.setValue(list.get(0));
                }
            }

            // must be list
            if (EnumOperator.IN.equals(rule.getOperator()) || EnumOperator.NOT_IN.equals(rule.getOperator())
                    || EnumOperator.BETWEEN.equals(rule.getOperator()) || EnumOperator.NOT_BETWEEN.equals(rule.getOperator())) {
                // list
                if (!(rule.getValue() instanceof List)) {
                    throw new FilterException("rule's value must be Array for:" + rule);
                }

                // size
                if (EnumOperator.BETWEEN.equals(rule.getOperator()) || EnumOperator.NOT_BETWEEN.equals(rule.getOperator())) {
                    List list = (List) rule.getValue();
                    if (list.size() != 2) {
                        throw new FilterException("rule's value size must be 2 for:" + rule);
                    }
                }
            }
        }
    }