public String nextToken() {
        if(!hasMoreTokens()) {
            throw new RuntimeException("No Tokens left!");
        }
        int grade=0;
        for(int i=0;i<s.length();i++) {
            if(s.charAt(i)==')') {
                grade--;
            }
            else if(s.charAt(i)=='(') {
                grade++;
            }
            else if(grade==0) {
                boolean match=false;
                for(char c:split) {
                    if(c==s.charAt(i)) {
                        match=true;
                        lastSplitTrigger=c;
                        break;
                    }
                }
                if(match) {
                    String ret=s.substring(0,i);
                    s=s.substring(i+1);
                    return ret;
                }
            }
        }
        lastSplitTrigger=null;
        return flush();
    }