public Object[] parseSet(String sets) {
        sets = sets.trim();
        HashSet set = new HashSet();
        boolean aa = false;

        if (!sets.contains(",") && !sets.contains("[")) {
            shell.evaluate("___ = " + sets.trim());
            set.add(shell.get("___"));
            return set.toArray();
        }

        for (int i = 0; i < sets.length(); i++) {

            if (sets.charAt(i) == '[') {
                String t = sets.substring(i);
                int j = eatExtraBracket(t, 0);
                set.add(parseSet(sets.substring(i + 1
                        , i + j)));
                if (!sets.substring(i + 1).contains(","))
                    aa = true;
                i = i + j;

                aa = true;
            }

            if (sets.charAt(i) == ',') {
                if (sets.substring(0, i).contains(",")) {
                    String s = "___ = "
                            + sets.substring
                            (
                                    sets.substring(0, i).lastIndexOf(',') + 1
                                    , i).trim();
                    shell.evaluate(s);
                } else {
                    String s1 = "___ = "
                            + sets.substring(0
                            , i).trim();
                    shell.evaluate(s1);
                }
                set.add(shell.get("___"));
            }
        }
        if (!aa) {
            String iii = sets.substring(sets.lastIndexOf(",") + 1);
            shell.evaluate("___ = " + iii.trim());
            set.add(shell.get("___"));
        }
        return set.toArray();
    }