protected Object unit(){
  Object p=next();
  if (p == EOF)   return EOF;
  if (p == LP) {
    Object r;
    Vector l=new Vector(2,4);
    while (true) {
      r=unit();
      if (r == RP)       return l;
      if (r == EOF)       return EOF;
      l.addElement(r);
    }
  }
  return p;
}

protected Object unit ( ) { Object p = next ( ) ; if ( p == EOF ) return EOF ; if ( p == LP ) { Object r ; Vector l = new Vector ( 2 , 4 ) ; while ( true ) { r = unit ( ) ; if ( r == RP ) return l ; if ( r == EOF ) return EOF ; l . addElement ( r ) ; } } return p ; }
break the next token into an object , with some addition semantic functionality to interpret eof and parenthesis .
