public function parseParameters()
    {
        $this->reset();

        // Extract the scriptName
        $this->scriptName = array_shift($this->parameters);

        foreach ($this->parameters as $parameter) {
            $optionString = ltrim($parameter, '-');

            if (substr($parameter, 0, 2) === "--") {
                $this->parseOption($optionString);
            } elseif (substr($parameter, 0, 1) === "-") {
                $this->parseFlagOption($optionString);
            } else {
                $this->parseArgument($parameter);
            }
        }
        return $this;
    }