final static void parseGroup(char[] data,int i,int out,Term term,boolean icase,boolean skipspaces,
                               boolean unicode,boolean xml) throws PatternSyntaxException{
      Bitset sum=new Bitset();
      Bitset bs=new Bitset();
      int mode=ADD;
      char c;
      for(;i<out;){
         switch(c=data[i++]){
            case '+':
               mode=ADD;
               continue;
            case '-':
               mode=SUBTRACT;
               continue;
            case '&':
               mode=INTERSECT;
               continue;
            case '[':
               bs.reset();
               i=parseClass(data,i,out,bs,icase,skipspaces,unicode,xml);
               switch(mode){
                  case ADD:
                     sum.add(bs);
                     break;
                  case SUBTRACT:
                     sum.subtract(bs);
                     break;
                  case INTERSECT:
                     sum.intersect(bs);
                     break;
               }
               continue;
            case ')':
               throw new  PatternSyntaxException("unbalanced class group");
         }
      }
      Bitset.unify(sum,term);
   }