private static boolean isInputExhausted(StreamTokenizer input) throws ParseError {
  try {
    if (input.nextToken() == StreamTokenizer.TT_EOF) {
      return true;
    }
    input.pushBack();
    return false;
  }
 catch (  IOException e) {
    throw new ParseError(e.getMessage());
  }
}

private static boolean isInputExhausted ( StreamTokenizer input ) throws ParseError { try { if ( input . nextToken ( ) == StreamTokenizer . TT_EOF ) { return true ; } input . pushBack ( ) ; return false ; } catch ( IOException e ) { throw new ParseError ( e . getMessage ( ) ) ; } }
determines if the input is exhausted .
