public String nextToken() throws ParserException {
        int start = pos;

        checkPosition();
        boolean done = false;

        while (!done && pos < s.length()) {
            int c = s.charAt(pos);
            if (c <= 31 //
                    || c == 127 //
                    || c == '(' //
                    || c == ')' //
                    || c == '<' //
                    || c == '>' //
                    || c == '@' //
                    || c == ',' //
                    || c == ';' //
                    || c == ':' //
                    || c == '\\' //
                    || c == '"' //
                    || c == '/' //
                    || c == '[' //
                    || c == ']' //
                    || c == '?' //
                    || c == '=' //
                    || c == '{' //
                    || c == '}' //
                    || Character.isWhitespace((char) c)) {
                done = true;
            } else {
                ++pos;
            }
        }

        if (start == pos) {
            throw new ParserException();
        }

        return s.substring(start, pos);
    }
public String nextToken ( ) throws ParserException { int start = pos ; checkPosition ( ) ; boolean done = false ; while ( ! done && pos < s . length ( ) ) { int c = s . charAt ( pos ) ; if ( c <= 31 || c == 127 || c == '(' || c == ')' || c == '<' || c == '>' || c == '@' || c == ',' || c == ';' || c == ':' || c == '\\' || c == '"' || c == '/' || c == '[' || c == ']' || c == '?' || c == '=' || c == '{' || c == '}' || Character . isWhitespace ( ( char ) c ) ) { done = true ; } else { ++ pos ; } } if ( start == pos ) { throw new ParserException ( ) ; } return s . substring ( start , pos ) ; }
Returns the next token in s. Throws a <code>ParserException</code> if
the next substring in s is not a token.

@return the next token in s
@throws ParserException