protected function parse()
    {
        $this->media    = array();
        $this->extras   = array();
        $this->sheet->resetContents();
        $this->acceptBom();

        while ( ! empty( $this->buffer ) )
        {
            $this->acceptEntry();
        }

        $extraContent = '';

        foreach ( $this->extras as $media => $extra )
        {
            if ( empty( $media ) )
            {
                $extraContent .= $extra;
            }
            else
            {
                $extraContent .= "@media $media\n{\n$extra\n}\n";
            }

            $extraContent .= "\n";
        }

        $this->sheet->setExtraContent( $extraContent );
    }