code: public function addPattern($pattern, $mode = 'accept')
      {
          if (! isset($this->regexes[$mode])) {
              $this->regexes[$mode] = new ParallelRegex($this->case);
          }
          $this->regexes[$mode]->addPattern($pattern);
          if (! isset($this->mode_handlers[$mode])) {
              $this->mode_handlers[$mode] = $mode;
          }
      }
docs: Adds a token search pattern for a particular parsing mode.
  The pattern does not change the current mode.
  
  @param string $pattern      Perl style regex, but ( and ) lose the usual meaning.
  @param string $mode         Should only apply this pattern when dealing with this type of
  input.