# File lib/rhc/vendor/okjson.rb, line 174
      def lex(s)
        ts = []
        while s.length > 0
          typ, lexeme, val = tok(s)
          if typ == nil
            raise Error, "invalid character at #{s[0,10].inspect}"
          end
          if typ != :space
            ts << [typ, lexeme, val]
          end
          s = s[lexeme.length..-1]
        end
        ts
      end