code: public static int[][] fieldsFromPositions (int offset, int... positions) {
          int fieldCount = positions.length - 1;
          int[][] fields = new int[fieldCount][2];
          int last = positions[0] - offset;
          for (int i = 0; i < fieldCount; ++i) {
              fields[i][0] = last;
              last = positions[i + 1] - offset;
              fields[i][1] = last;
          }
          return fields;
      }
docs: this method returns a field description array given a set of positions (assuming there are no
  pads in the intended string)
  @param offset The relative offset of the beginning of the line compared to the
  offsets in 'positions'. I find it easier to use my text editor to
  identify positions, and it counts the first column as '1', so I can
  set 'first' = 1, and then use the column number of the rest of the
  fields as reported by my text editor.
  @param positions An array of numbers indicating positions of fields in the data lines,
  starting at the first field.
  @return a two dimensional array of start and end positions for tokens