public function setDocoptDefinition($doc) {
        if ($this->frozen)    throw new RuntimeException('Configuration of "'.get_class($this).'" is frozen');
        if (!is_string($doc)) throw new IllegalTypeException('Illegal type of parameter $doc: '.gettype($doc));

        $parser = new DocoptParser();
        $this->docoptResult = $parser->parse($doc);

        $this->docoptDefinition = $doc;
        return $this;
    }