while (count>0 && (val[begin+count-1] == ' ' || val[begin+count-1] == '\t')) count--;
    public String getToken(String terminals)    {        skipWhiteSpace();        char[] val = value;        int cur = cursor;        int begin = cur;        for ( ;cur < max; cur++)        {            char c = val[cur];            if ((c == ' ') || (c == '\t') || (terminals.indexOf(c) != -1))            {                break;            }        }        cursor = cur;        int count = cur-begin;        if (count > 0)        {            skipWhiteSpace();            return(new String(val, begin, count));        }        return(null);    }