public String readWord ( ) { skipWhitespace ( true ) ; int start = pos ; while ( pos < data . length ) { char c = data [ pos ] ; if ( ( c >= ' ' && c <= ' ' ) || ( c >= ' ' && c <= ' ' ) || ( c >= ' ' && c <= ' ' ) || ( c == ' ' ) || ( c == ' ' ) || ( c == ' ' ) ) { pos ++ ; } else { break ; } } if ( start == pos ) { throw unexpected ( "expected a word" ) ; } return new String ( data , start , pos - start ) ; }
Reads a non - empty word and returns it .