token (PDF::Reader::Buffer)

    # File lib/pdf/reader/buffer.rb, line 119
        def token
          ready_token

          i = @buffer.index(/[\[\]()<>{}\s\/]/) || @buffer.size

          token_chars =
            if i == 0 and @buffer[i,2] == "<<"    then 2
            elsif i == 0 and @buffer[i,2] == ">>" then 2
            elsif i == 0                          then 1
            else                                    i
            end

          strip_space = !(i == 0 and @buffer[0,1] == '(')
          tok = head(token_chars, strip_space)

          if tok == ""
            nil
          elsif tok[0,1] == "%"
            @buffer = ""
            token
          else
            tok
          end
        end