mς gγΈEc@sqdZdZdklZlZlZdklZdefd„ƒYZdefd„ƒYZ hZ d„Z d S( s0 This package contains Docutils Reader modules. treStructuredText(sutilssparserss Component(s universaltReadercBsVtZdZdZdZd„Zeed„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 three steps of a Reader's responsibility are defined: `scan()`, `parse()`, and `transform()`. Call `read()` to process a document. treadertreaderscCs#ti|ƒtititigS(N(t Componenttget_transformstselft universalt DecorationstExposeInternalst StripComments(R((t8/data/zmath/zope/lib/python/docutils/readers/__init__.pyR scCsD||_|djo|o|i|ƒ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(tparserRtNonet parser_namet set_parsertsourcetinput(RR R((R t__init__&s  cCsti|ƒ}|ƒ|_dS(sSet `self.parser` by name.N(tparserstget_parser_classRt parser_classRR (RRR((R R<scCsL||_|ip ||_n||_|iiƒ|_|iƒ|iS(N(RRR tsettingstreadRtparsetdocument(RRR R((R RAs     cCs=|iƒ|_}|ii|i|ƒd|_|_dS(s(Parse `self.input` into a document tree.N( Rt new_documentRR RRR tcurrent_sourcet current_line(RR((R RJscCsti|ii|iƒ}|S(s8Create and return a new empty document tree (root node).N(tutilsRRRt source_pathRR(RR((R RPs( t__name__t __module__t__doc__tcomponent_typetconfig_sectionRR RRRRR(((R Rs    tReReadercBstZdZd„ZRS(s• A reader which rereads an existing document tree (e.g. a deserializer). Often used in conjunction with `writers.UnfilteredWriter`. cCs ti|ƒS(N(RRR(R((R R_s(RR R!R(((R R$Vs cCsI|iƒ}ti|ƒot|}nt|tƒtƒƒ}|iS(s6Return the Reader class from the `reader_name` module.N( t reader_nametlowert_reader_aliasesthas_keyt __import__tglobalstlocalstmoduleR(R%R,((R tget_reader_classgs  N( R!t __docformat__tdocutilsRRRtdocutils.transformsRRR$R'R-( R-RRR.RR'RRR$((R t? s D