code: function markFrames(list, expr, value) {
          switch (expr) {
              case "all":
                  markInterval(list, 0, list.length - 1, 1, value);
                  break;
              case "none":
                  break;
              default:
                  expr.split(",").forEach(function (intervalDef) {
                      var interval = intervalDef.split(":").map(function (s) { return s.trim(); });
                      if (interval.length > 0) {
                          var first = interval[0] !== "" ? parseInt(interval[0]) - 1 : 0;
                          var last = interval[interval.length - 1] !== "" ? parseInt(interval[interval.length - 1]) - 1 : list.length - 1;
                          var second = interval.length > 2 && interval[1] !== "" ? parseInt(interval[1]) - 1 : first + 1;
                          if (!isNaN(first) && !isNaN(second) && !isNaN(last)) {
                              markInterval(list, first, last, second - first, value);
                          }
                      }
                  });
          }
      }
docs: /*
  Parse an expression and mark the corresponding frames with the given value.
  
  expr ::= interval ("," interval)*
  
  interval ::=
  INT                     // frame number
  | INT? ":" INT?           // first:last
  | INT? ":" INT? ":" INT?  // first:second:last
  
  If first is omitted, it is set to 1.
  If second is omitted, it is set to first + 1.
  If last is omitted, it is set to list.length.