readRegex(regex) {
    const index = this.indexOf_(regex);
    if (this.atEnd() || index == null || index.position != this.position_) {
      return null;
    }

    this.position_ += index.length;
    return index.results;
  }
Reads the given regular expression from the parser.  This requires the
match to be at the current position; there is no need to include a head
anchor.
This requires that the regex have the global flag to be set so that it can
set lastIndex to start the search at the current position.  Returns null at
the end or if the regex does not match the current position.

@param {!RegExp} regex
@return {Array<string>}