ó
:ÑpDc           @   s?   d  Z  d d l m Z m Z m Z d e j f d „  ƒ  YZ d S(   s#   Reader for existing document trees.iÿÿÿÿ(   t   readerst   utilst
   transformst   Readerc           B   s)   e  Z d  Z d Z d Z d Z d „  Z RS(   s  
    Adapt the Reader API for an existing document tree.

    The existing document tree must be passed as the ``source`` parameter to
    the `docutils.core.Publisher` initializer, wrapped in a
    `docutils.io.DocTreeInput` object::

        pub = docutils.core.Publisher(
            ..., source=docutils.io.DocTreeInput(document), ...)

    The original document settings are overridden; if you want to use the
    settings of the original document, pass ``settings=document.settings`` to
    the Publisher call above.
    t   doctrees   doctree readerR    c         C   sd   |  j  |  _ t j |  j ƒ |  j _ |  j |  j _ t j |  j j d d ƒ |  j j ƒ |  j _	 d S(   sp   
        No parsing to do; refurbish the document tree instead.
        Overrides the inherited method.
        t   sourcet    N(
   t   inputt   documentR   t   Transformert   transformert   settingsR   t   new_reportert   gett   reporter(   t   self(    (    s<   /usr/lib/python2.7/dist-packages/docutils/readers/doctree.pyt   parse    s
    (   R   (   s   readers(   t   __name__t
   __module__t   __doc__t	   supportedt   config_sectiont   config_section_dependenciesR   (    (    (    s<   /usr/lib/python2.7/dist-packages/docutils/readers/doctree.pyR   
   s
   N(   R   t   docutilsR    R   R   t   ReReaderR   (    (    (    s<   /usr/lib/python2.7/dist-packages/docutils/readers/doctree.pyt   <module>   s   