public String nextToken()
           throws Exception
   {
      // Skip blanks.
      while (Character.isWhitespace(ch))
      {
         nextChar();
      }

      while (ch == ';')
      {
         line = reader.readLine();
         nextChar();
      }

      // At EOF?
      if (ch == 0)
      {
         return null;
      }

      //build the string
      StringBuilder buffer = new StringBuilder();

      if ("'()".contains(Character.toString(ch)))
      {
         buffer.append(ch);
         nextChar();
         return buffer.toString();
      }

      while (!(" )".contains(Character.toString(ch))))
      {
         buffer.append(ch);  // build token string
         nextChar();
      }


      return buffer.toString();
   }