public Token next ( ) throws IOException { skipWhitespace ( ) ; int c = reader . read ( ) ; if ( c < 0 ) { return new Token ( Token . EOF ) ; } else if ( c == ' ' ) { return new Token ( Token . EOL ) ; } else if ( c == ' ' || c == ' ' ) { return munchString ( c ) ; } else if ( c == ' ' ) { return maybeComment ( ) ; } else if ( single . get ( c ) ) { return new Token ( Token . SINGLE , String . valueOf ( ( char ) c ) ) ; } else { reader . unread ( c ) ; return parseWord ( ) ; } }
Get the next Token in the stream .