code: function parse (str, options) {
    var tokens = []
    var key = 0
    var index = 0
    var path = ''
    var defaultDelimiter = (options && options.delimiter) || DEFAULT_DELIMITER
    var delimiters = (options && options.delimiters) || DEFAULT_DELIMITERS
    var pathEscaped = false
    var res
  
    while ((res = PATH_REGEXP.exec(str)) !== null) {
      var m = res[0]
      var escaped = res[1]
      var offset = res.index
      path += str.slice(index, offset)
      index = offset + m.length
  
      // Ignore already escaped sequences.
      if (escaped) {
        path += escaped[1]
        pathEscaped = true
        continue
      }
  
      var prev = ''
      var next = str[index]
      var name = res[2]
      var capture = res[3]
      var group = res[4]
      var modifier = res[5]
  
      if (!pathEscaped && path.length) {
        var k = path.length - 1
  
        if (delimiters.indexOf(path[k]) > -1) {
          prev = path[k]
          path = path.slice(0, k)
        }
      }
  
      // Push the current path onto the tokens.
      if (path) {
        tokens.push(path)
        path = ''
        pathEscaped = false
      }
  
      var partial = prev !== '' && next !== undefined && next !== prev
      var repeat = modifier === '+' || modifier === '*'
      var optional = modifier === '?' || modifier === '*'
      var delimiter = prev || defaultDelimiter
      var pattern = capture || group
  
      tokens.push({
        name: name || key++,
        prefix: prev,
        delimiter: delimiter,
        optional: optional,
        repeat: repeat,
        partial: partial,
        pattern: pattern ? escapeGroup(pattern) : '[^' + escapeString(delimiter) + ']+?'
      })
    }
  
    // Push any remaining characters.
    if (path || index < str.length) {
      tokens.push(path + str.substr(index))
    }
  
    return tokens
  }
docs: Parse a string for the raw tokens.
  
  @param  {string}  str
  @param  {Object=} options
  @return {!Array}