ó V!¶\c@s¥dZdZddlZddlmZmZmZddlmZej dkrfddl m Z nd efd „ƒYZ d e fd „ƒYZ iZd „ZdS(s0 This package contains Docutils Reader modules. treStructuredTextiÿÿÿÿN(tutilstparserst Component(t universalii(t __import__tReadercBsVeZdZdZdZd„Zd d d„Zd„Zd„Z d„Z d„Z RS( sù Abstract base class for docutils Readers. Each reader module or package must export a subclass also called 'Reader'. The two steps of a Reader's responsibility are `scan()` and `parse()`. Call `read()` to process a document. treadertreaderscCs#tj|ƒtjtjtjgS(N(Rtget_transformsRt DecorationstExposeInternalst StripComments(tself((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyR !s cCsA||_|dkr+|r+|j|ƒnd|_d|_dS(s· Initialize the Reader instance. Several instance attributes are defined with dummy initial values. Subclasses may use these attributes as they wish. N(tparsertNonet set_parsertsourcetinput(R Rt parser_name((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyt__init__'s    cCstj|ƒ}|ƒ|_dS(sSet `self.parser` by name.N(Rtget_parser_classR(R Rt parser_class((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyR=scCsJ||_|js||_n||_|jjƒ|_|jƒ|jS(N(RRtsettingstreadRtparsetdocument(R RRR((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyRBs     cCs=|jƒ|_}|jj|j|ƒd|_|_dS(s(Parse `self.input` into a document tree.N(t new_documentRRRRRtcurrent_sourcet current_line(R R((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyRKscCstj|jj|jƒ}|S(s8Create and return a new empty document tree (root node).(RRRt source_pathR(R R((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyRQsN( t__name__t __module__t__doc__tcomponent_typetconfig_sectionR RRRRRR(((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyRs    tReReadercBseZdZd„ZRS(s• A reader which rereads an existing document tree (e.g. a deserializer). Often used in conjunction with `writers.UnfilteredWriter`. cCs tj|ƒS(N(RR (R ((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyR `s(RR R!R (((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyR$WscCs€|jƒ}|tkr%t|}ny"t|tƒtƒddƒ}Wn/tk rxt|tƒtƒddƒ}nX|jS(s6Return the Reader class from the `reader_name` module.tlevelii(tlowert_reader_aliasesRtglobalstlocalst ImportErrorR(t reader_nametmodule((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pytget_reader_classhs   " "(ii(R!t __docformat__tsystdocutilsRRRtdocutils.transformsRt version_infotdocutils._compatRRR$R'R-(((s=/tmp/pip-install-usGedi/docutils/docutils/readers/__init__.pyts D